
On Sun, Apr 25, 2010 at 01:03:42AM +1000, Erik de Castro Lopo wrote:
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'> <name>arm32</name> <uuid>e433002b-107f-5b16-415b-7afb3e3a4d84</uuid> <memory>262144</memory> <currentMemory>262144</currentMemory> <vcpu>1</vcpu> <os> <type arch='arm' machine='versatilepb'>hvm</type> <kernel>/kvm/arm32/vmlinuz-2.6.18-6-versatile</kernel> <initrd>/kvm/arm32/initrd.img-2.6.18-6-versatile</initrd> </os> <features> <acpi/> </features> <clock offset='utc'/> <on_poweroff>destroy</on_poweroff> <on_reboot>restart</on_reboot> <on_crash>destroy</on_crash> <devices> <emulator>/kvm/arm32/arm32.sh</emulator> <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'/> </disk> <controller type='ide' index='0'/> <serial type='pty'> <target port='0'/> </serial> <console type='pty'> <target port='0'/> </console> </devices> </domain>
Since libvirt doesn't support VDE networking I use a wrapper around qemu-system-arm (/kvm/arm32/arm32.sh) containing:
#!/bin/bash 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.
In your wrapper I think you need "$@" instead of $@ Daniel -- |: Red Hat, Engineering, London -o- http://people.redhat.com/berrange/ :| |: http://libvirt.org -o- http://virt-manager.org -o- http://deltacloud.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|