Hi recently configured a brand new server for testing purpose:
- debian jessie (8.3)
- xen 4.4 (xl toolstack)
- virtinst
I created and started a new domU through virt-install:
virt-install \
--network=bridge:br0 \
--name=test1 \
--disk path=/home/xen/tests/test1.qcow2,format=qcow2 \
--boot hd \
--ram 512 \
--vcpus=1 \
--check-cpu \
--hvm \
--graphics vnc,listen=0.0.0.0,port=5901,password="secret" \
--noautoconsole
The creation works properly and VM starts as expected but the domU is not accessible via VNC.
Following the XML created by virt-install:
<domain type='xen'>
<name>test1</name>
<uuid>53cf8b9b-9fa8-4751-8bea-6c2bf8519b96</uuid>
<memory unit='KiB'>524288</memory>
<currentMemory unit='KiB'>524288</currentMemory>
<vcpu placement='static'>1</vcpu>
<os>
<type arch='x86_64' machine='xenfv'>hvm</type>
<loader type='rom'>/usr/lib/xen/boot/hvmloader</loader>
<boot dev='hd'/>
</os>
<features>
<acpi/>
<apic/>
<pae/>
</features>
<clock offset='utc'/>
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
<on_crash>restart</on_crash>
<devices>
<emulator>/usr/lib64/xen/bin/qemu-dm</emulator>
<disk type='file' device='disk'>
<source file='/home/xen/tests/test1.qcow2'/>
<target dev='hda' bus='ide'/>
<address type='drive' controller='0' bus='0' target='0' unit='0'/>
</disk>
<controller type='ide' index='0'/>
<interface type='bridge'>
<mac address='00:16:3e:8f:a2:59'/>
<source bridge='br0'/>
</interface>
<serial type='pty'>
<target port='0'/>
</serial>
<console type='pty'>
<target type='serial' port='0'/>
</console>
<input type='mouse' bus='ps2'/>
<input type='keyboard' bus='ps2'/>
<graphics type='vnc' port='5901' autoport='no' listen='0.0.0.0' keymap='it' passwd='secret'>
<listen type='address' address='0.0.0.0'/>
</graphics>
<video>
<model type='cirrus' vram='16384' heads='1'/>
</video>
</devices>
By looking into the processes list I find:
root 17576 70.1 6.1 468588 26788 ? SLsl 03:23 0:14 /usr/bin/qemu-system-i386 -xen-domid 73 -chardev socket,id=libxl-cmd,path=/var/run/xen/qmp-libxl-73,server,nowait -mon chardev=libxl-cmd,mode=control -nodefaults -name test1 -vnc 0.0.0.0:1 -display none -serial pty -device cirrus-vga -global vga.vram_size_mb=8 -boot order=c -device rtl8139,id=nic0,netdev=net0,mac=00:16:3e:8f:a2:59 -netdev type=tap,id=net0,ifname=vif73.0-emu,script=no,downscript=no -machine xenfv -m 504 -drive file=/home/xen/tests/test1.qcow2,if=ide,index=0,media=disk,format=raw,cache=writeback
If I create exactly the same machine using KVM instead of XEN with
--connect=qemu:///system
the VNC connection works smoothly and I can easily authenticate to the guest VM.
I think the problem lies on VNC not being started with password parameter but I really don't know where to look at.
Note:
- same XML configuration works properly on debian wheezy 7.5 (with xen instead of xl toolstack)
- looking into the process list the domU created using KVM has "-vnc 0.0.0.0:1,password" while the one with XEN has "-vnc 0.0.0.0:1" (it seems really odd to me)
- domUs are managed via virsh
Is it an issue of new xen toolstack (xl) and virsh in debian Jessie? Someone had this same issue or something similar?
Let me know if I can add some missing details to better understand the situation.