Velvet Star Monitor

Standout celebrity highlights with iconic style.

news

I am facing problems loading and running the KVM due to the virt-manager on kali linux in windows 10

Writer Andrew Mclaughlin

I used

''' sudo apt-get install qemu-kvm libvirt0 virt-manager libguestfs-tools '''

While trying to install metasploitable 2 and the surrounding functions from but when i typed

''' virt-manager '''

to open the virtual machine manager this is what i get

''' Unable to init server: Could not connect: Connection refused ''' ''' Unable to init server: Could not connect: Connection refused ''' ''' Unable to init server: Could not connect: Connection refused '''

''' (virt-manager:21766): Gtk-WARNING **: 23:39:47.100: cannot open display: '''

what do I need to do ?

1 Answer

virt-manager is a GUI program. It absolutely needs a compartible display device to draw its interface. The error message "cannot open display" means it can't find any display into which to draw.

You need to run virt-manager from the shell that has DISPLAY variable correctly set. Correctly, I mean, it should specify the actual working X server. When you run this from the local Linux GUI session, this variable is already set by that session manager and there will be no such problem.

If you are trying to run it from ssh session, you need to use X11 forwarding in that ssh session, so it forwards a picture to your local X server and sends control actions back to the remote application. In OpenSSH, this is achieved with -Y command line parameter (it both instantiates a data pipe within a connection and sets a environment variable in the remote session for applications to use that pipe).

Also, for this to work, you have to run actual X server locally; this means, when you connect to ssh server from e.g. Windows (using PuTTY or Windows's bundled SSH client) you aren't able to display remote GUI programs easily. You need an X server for Windows do do this. Or, you can twist and setup some VNC- or NX-based solution, like x2go to run remote Linux GUI applications from Windows.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy