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

Problems starting qemu vm using virsh / *.xml-file



Hi folks,

after having started and got running my vexpress A15 machine on my
Cubietruck with jessie for armhf now fine using the qemu-system-arm
commandline:

qemu-system-arm
-enable-kvm                                                     \
-smp 1                                                          \
-m 256                                                          \
-M vexpress-a15                                                 \
-cpu host                                                       \
-kernel /home/guido/kvm-arm/vexpress-zImage                     \
-dtb /home/guido/kvm-arm/vexpress-v2p-ca15-tc1.dtb              \
-append "root=/dev/vda console=ttyAMA0 rootwait"                \
-drive if=none,id=rootfs,file=/home/guido/kvm-arm/debootstr.img \
-device virtio-blk-device,drive=rootfs                          \
-net nic                                                        \
-net tap                                                        \
-monitor null                                                   \
-serial stdio                                                   \
-nographic

aI tried to port it to a libvirt *.xml file. Well, after hours of
searching the web and trying some configs I found that this job is a
pain. My first problem is, no value corresponding to the libvirt
documentations is accepted for "vcpu", see below:

-----------------------------------------------------------------------

<domain id='1' type='kvm
        xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'>
   ...
   <vcpu placement='static'>1</vcpu>
   ...
</domain>

root@hydra-tmp:/srv/kvm# virsh create ./test.xml
error: Failed to create domain from ./test.xml
error: internal error: early end of file from monitor: possible problem:
kvm_init_vcpu failed: Invalid argument

-----------------------------------------------------------------------

<domain id='1' type='kvm
        xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'>
   ...
   <vcpu placement='static'>2</vcpu>
   ...
</domain>

virsh create ./test.xml
error: Failed to create domain from ./test.xml
error: internal error: early end of file from monitor: possible problem:
kvm_init_vcpu failed: Invalid argument

-----------------------------------------------------------------------

<domain id='1' type='kvm
        xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'>
  ...
  <vcpu>2</vcpu>
  ...
</domain>

virsh create ./test.xml
error: Failed to create domain from ./test.xml
error: internal error: early end of file from monitor: possible problem:
kvm_init_vcpu failed: Invalid argument

-----------------------------------------------------------------------

<domain id='1' type='kvm
        xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'>
  ...
  <vcpu>1</vcpu>
  ...
</domain>

virsh create ./test.xml
error: Failed to create domain from ./test.xml
error: internal error: early end of file from monitor: possible problem:
kvm_init_vcpu failed: Invalid argument

-----------------------------------------------------------------------

On

  https://bugzilla.redhat.com/show_bug.cgi?id=1171501
  http://lists.nongnu.org/archive/html/qemu-devel/2014-12/msg01093.html

I found this to be a qemu related error, but starting qemu vm without
libvirt native the vm runs fines and accpeted the values passed over by
the command:

  qemu-system-arm -enable-kvm -smp 1 ...
  qemu-system-arm -enable-kvm -smp 2 ...

I have the following versions of libvirt and tools installed:

ii  libvirt-bin            1.2.9-9  armhf  programs for the libvirt
                                           library
ii  libvirt-clients        1.2.9-9  armhf  programs for the libvirt
                                           library
ii  libvirt-daemon         1.2.9-9  armhf  programs for the libvirt
                                           library
ii  libvirt-daemon-system  1.2.9-9  armhf  Libvirt daemon configuration
                                           files
ii  libvirt0               1.2.9-9  armhf  library for interfacing with
                                           different virtualization
                                           systems
ii  python-libvirt         1.2.9-1  armhf  libvirt Python bindings


If there is no solution I just need a way to start multiple qemu vm's
on boot. Sadly, qemu-system-arm option -daemonize doesn't work together
with the options -serial stdio or -nographic .

May be, anybody has a hint, a solution or a working .xml file for me.

Many thanks in advance and greetinx

Guido


Reply to: