Skip to contentSkip to conversation

Does Libvirt(1.0.2) support ‘device_model_version’options to create xen virtual machine ?

DISCUSSION bob 1 participant 1 message Mar 5, 2013

lore
Share & tools
lore

bob

author
#0 lore raw

Hi, everyon
Does Libvirt(1.0.2) support ‘device_model_version’options to create xen virtual machine ?

In order to create VM to supported virtual desktop( view by spice client) I have created 3 VMs, the first VM(VM1) use xl config file, and the other(VM2 and VM3) use xml config file .
VM1: I assigned the 'device_model_version' parmeter to 'qemu-xen', start success and can accessed by spice client!
( Xen4.2.0 support two device model: qemu-xen-traditional and qemu-xen. qemu-xen-traditional: default, and use the historical Xen fork of Qemu. qemu-xen : use the upstream Qemu . only 'qemu-xen' device model support spice protocol. refer to url http://xenbits.xen.org/docs/4.2-testing/man/xl.cfg.5.html#device_model_options).

VM2: xml config file. converted from VM1 by libvirt command 'virsh domxml-from-native xen-xm vd'. I Founed that 'device_model_version' and 'spice' realated parameters ared disappered !
Afeter "virsh create vd.xml " to create VM2, the domain crashed, libvirtd exist, coming the fellow error :

# virsh create vd.xml
error: Failed to create domain from vd.xml
error: End of file while reading data: Input/output error
error: Failed to reconnect to the hypervisor
# xl list
Name                                        ID   Mem VCPUs      State   Time(s)
Domain-0                                     0  1024     2     r-----      70.3
tty_vd                                      12   503     1     --p---       0.0
# virsh list
error: failed to connect to the hypervisor
error: no valid connection
error: Failed to connect socket to '/var/run/libvirt/libvirt-sock': Connection refused

#ps -ax |grep qemu
Warning: bad syntax, perhaps a bogus '-'? See /usr/share/doc/procps-3.2.8/FAQ

 3082 ?        Sl     0:00 /usr/lib/xen/bin/qemu-system-i386 -xen-domid 0 -xen-attach -name dom0 -nographic -M xenpv -daemonize -monitor /dev/null -pidfile /var/run/qemu-dom0.pid
 6590 pts/1    S+     0:00 grep qemu

VM3: xml file is similar to VM2, only add "<emulator>/usr/lib/xen/bin/qemu-system-i386</emulator> " in attribute "<devices>" . has the same error with VM2

the xl config file of VM1

# cat vd
kernel = "/usr/lib/xen/boot/hvmloader"
builder='hvm'
memory = 512
vcpus=1
name = "tty_vd"
vif = [ 'mac=00:16:3e:42:63:72, bridge=eth0' ]
disk= [ 'file:/home/ttylinux.img,ioemu:hda,w' ]
device_model_override='/usr/lib/xen/bin/qemu-system-i386'
device_model_version ='qemu-xen'
boot="dca"
sdl=0
vnc=0
videoheads=1
videoram = 64
spice=1
spicehost='0.0.0.0'
spiceport=10000
spicedisable_ticketing=1

xml file of VM2 and VM3 :
#cat vd.xml
<domain type='xen'>
<name>tty_vd</name> <uuid>ebd54e65-e8bc-5803-cd9d-0809ddbf2cda</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>/usr/lib/xen/boot/hvmloader</loader>
    <boot dev='cdrom'/>
    <boot dev='cdrom'/>
    <boot dev='cdrom'/>

</os>
<clock offset='variable' adjustment='0' basis='utc'/> <on_poweroff>destroy</on_poweroff> <on_reboot>restart</on_reboot> <on_crash>restart</on_crash>
<devices>
# <emulator>/usr/lib/xen/bin/qemu-system-i386</emulator> only VM3 add this parameter

    <disk type='file' device='disk'>
      <driver name='file'/>
      <source file='/home/ttylinux.img'/>
      <target dev='hda' bus='ide'/>
    </disk>
    <interface type='bridge'>
      <mac address='00:16:3e:42:63:72'/>
      <source bridge='eth0'/>
    </interface>

</devices>
</domain>

My question are :
1. Does libvirt(1.0.2) use default device model 'qemu-xen-traditional' ? Any method to specify the device model to "qemu-xen"? Does libvirt support 'spice' realated parameters? howto ?

2. Why VM2 and VM3 crashed? any suggests ?

Dom0 : CentOS6.2, kernel 2.6.32.50-1.el6xen.x86_64
Xen4.2.0 + Libvirt1.0.2 compile from source code.

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel