Ady Wahyudi Paundu
2014-Nov-25 03:46 UTC
[libvirt-users] how to modify virsh vm start script
I use libvirt to manage a QEMU/KVM system. Starting a VM only by using > virsh start vmname What I want to know is how to add an option to virsh vm's start script, in my case I want to add QEMU logging option (-d and -D). I can see from > ps aux | grep qemu that current VM started using virsh not including those options ~ady
Martin Kletzander
2014-Nov-25 07:54 UTC
Re: [libvirt-users] how to modify virsh vm start script
On Tue, Nov 25, 2014 at 12:46:41PM +0900, Ady Wahyudi Paundu wrote:>I use libvirt to manage a QEMU/KVM system. Starting a VM only by using > > virsh start vmname >What I want to know is how to add an option to virsh vm's start >script, in my case I want to add QEMU logging option (-d and -D). I >can see from > > ps aux | grep qemu >that current VM started using virsh not including those options >This is not supported in our XML, but you can use passthrough of arbitrary options: http://libvirt.org/drvqemu.html E.g.: <domain type='qemu' xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'> ... <qemu:commandline> <qemu:arg value='-d'/> <qemu:arg value='cpu'/> </qemu:commandline> ... </domain> Martin
Ady Wahyudi Paundu
2014-Nov-26 04:55 UTC
Re: [libvirt-users] how to modify virsh vm start script
Hi Martin, it works \(^o^)/ thank you. Best regards, AdyWP On 11/25/14, Martin Kletzander <mkletzan@redhat.com> wrote:> On Tue, Nov 25, 2014 at 12:46:41PM +0900, Ady Wahyudi Paundu wrote: >>I use libvirt to manage a QEMU/KVM system. Starting a VM only by using >> > virsh start vmname >>What I want to know is how to add an option to virsh vm's start >>script, in my case I want to add QEMU logging option (-d and -D). I >>can see from >> > ps aux | grep qemu >>that current VM started using virsh not including those options >> > > This is not supported in our XML, but you can use passthrough of > arbitrary options: > > http://libvirt.org/drvqemu.html > > E.g.: > > <domain type='qemu' > xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'> > ... > <qemu:commandline> > <qemu:arg value='-d'/> > <qemu:arg value='cpu'/> > </qemu:commandline> > ... > </domain> > > Martin >