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

[libvirt-users] Problems moving qemu machine to libvirt

Hi all,

I have a qemu-system-arm machine that I am currently starting using:

    qemu-system-arm -M versatilepb -nographic \
      -hda img.qcow2 \
      -net vde,vlan=0,sock=/var/run/qemu-vde.ctl \
      -net nic,vlan=0,macaddr=52:54:00:12:34:22  \
      -kernel vmlinuz-2.6.18-6-versatile \
      -initrd initrd.img-2.6.18-6-versatile \
      -append "root=/dev/sda1 console=ttyAMA0,115200n8"

I converted the above to a virsh XML file using:

    virsh domxml-from-native qemu-argv run.argc > arm32.xml

which resulted in this (minor modifications to provide full paths):

    <domain type='qemu'>
        <type arch='arm' machine='versatilepb'>hvm</type>
      <clock offset='utc'/>
        <disk type='file' device='disk'>
          <source file='/kvm/arm32/img.qcow2'/>
          <target dev='hda' bus='ide'/>
          <address type='drive' controller='0' bus='0' unit='0'/>
        <controller type='ide' index='0'/>
        <serial type='pty'>
          <target port='0'/>
        <console type='pty'>
          <target port='0'/>

Since libvirt doesn't support VDE networking I use a wrapper around
qemu-system-arm (/kvm/arm32/arm32.sh) containing:

    exec /usr/bin/qemu-system-arm $@ \
	-net nic,vlan=0,macaddr=52:54:00:12:34:22 \
	-net vde,vlan=0,group=vde2-net,mode=0770,sock=/var/run/qemu-vde.ctl \
	-append "root=/dev/sda1 console=ttyAMA0,115200n8"

However, doing this I get the following error when I attempt to start
the VM:

    error: Failed to start domain arm32
    error: internal error Process exited while reading console log output:
           char device redirected to /dev/pts/10
    qemu: could not open disk image console=ttyAMA0,115200n8\"":
           No such file or directory

The first problem (console log output) is probably due to the second,
where it seems that this:

    <cmdline>root=/dev/sda1 console=ttyAMA0,115200n8</cmdline>

is not being passed to qemu correctly. I have tried quoting the command
line but that doesn't help.

Anyone have any clues?

Erik de Castro Lopo

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