On 08/29/2011 08:09 PM, Kevins Thoughts wrote:
When I look in /var/log/libvirt/qemu/Test.log I see the VM is started
with the command (edited down to the relevant parts):
//usr/bin/qemu-kvm -S -m 1024 -smp 2 -name Test,process=qemu:Test
-nographics -boot c -drive file=/kvms/test1.img,if=none,boot=on
/This has two problems:
1) The "-S" is keeping the system from booting
This is intentional. Libvirt has to make some changes via the monitor,
since qemu does not expose all functionality from the command line, so
libvirt blindly starts qemu with -S, makes subsequent monitor changes,
and then released the vcpus via monitor command (unless you used the
VIR_DOMAIN_START_PAUSED flag to keep things paused). There is no XML to
control this, nor does there need to be, given the existence of
virDomainCreateWithFlags().
2) the "if=none" needs to be "if=virtio"
Have you tried 'virsh domxml-from-native qemu-argv /path/to/args' for a
shell-style command line containing the qemu command you want to run?
It's not perfect, but may give you some hints on this regard.
Meanwhile, according to the documentation, <target dev=...
bus='virtio'/> inside your <drive> xml appears to be the right way to
request a virtio drive. Paste the actual XML you are trying to use, so
we can offer suggestions relative to your questions.
I've confirmed both by changing -nographics to -curses and watching what
happens. For #1, its a big fat nothing (no surprise since -S turns off
the CPUs), for #2 grub loads and the kernel boots, but my /dev/vda3
isn't found so "init" can't start.
I'm anticipating a 3rd problem: I don't see where to specify that I
want the VM to use "tap5" of my bridged network.
Does the documentation help?
http://libvirt.org/formatdomain.html#elementsNICS
--
Eric Blake eblake(a)redhat.com +1-801-349-2682
Libvirt virtualization library
http://libvirt.org