[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] Does Libvirt(1.0.2) support ‘device_model_version’options to create xen virtual machine ?



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"
memory = 512
name = "tty_vd"
vif = [ 'mac=00:16:3e:42:63:72, bridge=eth0' ]
disk= [ 'file:/home/ttylinux.img,ioemu:hda,w' ]
device_model_version ='qemu-xen'
videoram = 64

xml file of VM2 and VM3 :
#cat vd.xml
<domain type='xen'>
  <memory unit='KiB'>524288</memory>
  <currentMemory unit='KiB'>524288</currentMemory>
  <vcpu placement='static'>1</vcpu>
    <type arch='x86_64' machine='xenfv'>hvm</type>
    <boot dev='cdrom'/>
    <boot dev='cdrom'/>
    <boot dev='cdrom'/>
  <clock offset='variable' adjustment='0' basis='utc'/>
#    <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'/>
    <interface type='bridge'>
      <mac address='00:16:3e:42:63:72'/>
      <source bridge='eth0'/>

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
Xen4.2.0 + Libvirt1.0.2 compile from source code.


Xen-devel mailing list



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.