Installing Windows 2012 KVM Guest on Ubuntu 14.10 - unable to VNC into guest
Solution 1
There are 2 sorts of VM VNC,
- VNC provided by hypervisor (aka. qemu).
- And VNC provided by the VM self.
Obviously , libvirt and qemu have no idea of 'VNC provided by the VM self', the cmd 'virsh vncdisplay' actually extract vnc bind info from 'VNC provided by hypervisor', while your virt-install cmd line didn't instruct libvirt to do so.
So, your case is irrevalant with guest network info, and @Michael Hampton is right , you should specify 'vnc bind info' while you builing the VM.
If you want to keep your current VM but need to append 'vnc bind info' to it, here it is:
EDITOR=vim virsh edit ${your domain} and a section like this:
<graphics type='vnc' port='-1' autoport='yes' listen='0.0.0.0' keymap='en-us'>
<listen type='address' address='0.0.0.0'/>
</graphics>
then shutoff the vm and start it again. You will be able to 'virsh vncdisplay' then , I hope. :)
Solution 2
I would explicitly specify --graphics vnc
here, just to be sure. And be sure to change it to SPICE when you install the SPICE guest tools.
Also, you chose Windows 2008 as the OS you're installing. Why not 2012 R2? --os-variant win2k12r2
Related videos on Youtube
victorhooi
Updated on September 18, 2022Comments
-
victorhooi almost 2 years
I have a Ubuntu 14.10 (x64) host, and I am using KVM to setup a Windows 2012 R2 guest VM on it.
I am using the
virt-install
command to set things up.I have setup a bridge network in
/etc/network/interfaces
as follows:# The primary network interface auto br0 iface br0 inet dhcp bridge_ports eth0 bridge_stp off bridge_maxwait 0 bridge_fd 0
My
virt-install
command-line is:virt-install --connect qemu:///system --arch=x86_64 -n win2012 --ram 4096 --cpu host --vcpus=2 --hvm --disk size=80,sparse=false,format=raw,bus=virtio - -cdrom /srv/sunix/en_windows_server_2012_r2_with_update_x64_dvd_6052708.iso --os-type=windows --os-variant=win2k8 --network bridge=br0,model=virtio --noautoconsole Starting install... Allocating 'win2012-1.img' | 80 GB 00:00 Creating domain... | 0 B 00:01 Domain installation still in progress. Waiting for installation to complete.
It seems to be waiting at that point for quite some time. I thought of using vnc to connect to the box to see what's going on.
Even though I've used
--noautoconsole
, my understanding is that the VNC display should still get created by default. However, this is the output ofvncdisplay
:virsh vncdisplay win2012 error: Failed to get VNC port. Is this domain using VNC?
This is the output of
domiflist
:virsh domiflist win2012 Interface Type Source Model MAC ------------------------------------------------------- vnet0 bridge br0 virtio 52:54:00:1d:dd:ab
However, according to my local DHCP server, that device hasn't tried to claim a DHCP lease yet.
I am thinking this might be because of the
virtio
network drive I've selected, and that Windows 2012 R2 doesn't support it out of the box.However, is there any way to still connect to the box?
Also, are there any issues you can see in the way I'm setting up this guest?
-
David Corsalini over 9 yearsI'd use the graphical mode, create the guest using virt-manager and follow the setup through in a graphical console directly. virt-install has it's issues
-