Perhaps this is a foolish question, but searching for answers proved fruitless as so many of the search terms come up in this domain anyway, but here goes:

Is it possible to have a graphical OS (e.g. say Ubuntu Desktop or Win7) running under KVM hosted where the host OS is non-graphical (e.g. Ubuntu Server)?

I always assumed this wasn't possible (since how would the output for the graphical OS be drawn?) but as it would make a difference to the hardware I invest in, I thought I'd try some in-depth investigation now. I suppose it might just be possible somehow if one were to remotely access the guest OS from another PC.

Many thanks, Neil


Absolutely yes. I do this all the time using headless servers to host windows or other graphical desktops that get used across the network or internet. Since the "hardware" your graphical-os is running on is virtual, it can be hooked up to magic things like null devices. There is no requirement that the output from the graphical os goes anywhere or is physically attatched to anything.

The question is, then how do you use it? There are lots of answers. The most common is using remote access controls built into the guest OS. This can be a VNC server, terminal services (RDP) server, NS server, X window server or any other kind of graphical remote access system. Using things kind of tools almost any graphical OS that will run on a virtual host can be accessed remotely.

Another way is by using the virtualization software to provide this access. I have not done this on KVM, bit using VirtualBox I can get direct access to the virtual graphics card of the gust using RDP. On a remote computer using a terminal services client I can pull up a window that shows the output all the way from the bios screen, through booting the os to the final desktop. I know other virtualization platforms provide this either via rdp or vnc.

Edit: It looks like KVM specifically uses VNC for this, providing you remote access to the graphic device provided to your guest os. See the virt-viewer command for connecting to remotely to the console of a KVM machine.

  • Thanks Caleb - thanks a lot for the detailed and helpful response - am v pleased as what you say is what I was hoping for but thought might be too optimistic! I've already found virtualising things really useful for server applications, but now the graphical options are open it's a whole new world.
    – Neil
    Oct 16 '10 at 11:23
  • 1
    KVM also implements SPICE - a much better solution than VNC, especially for VMs that need to utilise higher end graphics than simple applications. You can watch movies and youtube videos, work with photoshop etc.
    – dyasny
    Nov 3 '10 at 21:46
  • Very interesting. I hadn't even heard of SPICE until you mentioned it, I'll keep an eye out a chance to put it through the paces.
    – Caleb
    Nov 5 '10 at 8:43


From the qemu/kvm manpage:

-vnc display[,option[,option[,...]]]

       Normally, QEMU uses SDL to display the VGA output.  With this
       option, you can have QEMU listen on VNC display display and
       redirect the VGA display over the VNC session.

Use libvirt virsh/virt-manager, they will make your life easier.


Yes. X11 applications can run on a non-GUI server and make use of the display services on a workstation with an X11 display.

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.