You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cloudstack.apache.org by DE Clay <de...@zeromachine.net> on 2012/11/26 15:32:08 UTC

libvirt XML settings for KVM guests

I would like to be able to change and persist libvirt XML settings
for guests (similar to the way that VMware allows you to edit/change the
VMX file).  

Example use cases would be to change the default drivers to virtio and
also change qemu disk settings to other caching policies.

It seems that now when I manually edit (via virsh edit), I lose those
changes when the instance is stopped/restarted. 

Is there a way to do this now?

--Daron
-- 
*****************************************
Daron E. Clay, CTO
ZeroMachine.net LLC
Information Technology Architect
VMware Certified Professional

-----------------------------------------
Specializing in Cloud Computing Services
and x86 Virtual Infrastructure Solutions
-----------------------------------------

Phone: 970-769-4805
Email: declay@zeromachine.net
Web: http://zeromachine.net
*****************************************


RE: libvirt XML settings for KVM guests

Posted by Edison Su <Ed...@citrix.com>.
Libvirt itself supports hook(http://libvirt.org/hooks.html), but seems it doesn't support change VM XML spec file.
I am thinking about adding a plugin system in kvm agent, before starting vm, kvm agent will call a python script, which can change vm xml file on the fly, then send the modified xml file to libvirt.

> -----Original Message-----
> From: DE Clay [mailto:declay@zeromachine.net]
> Sent: Monday, November 26, 2012 6:32 AM
> To: cloudstack-dev@incubator.apache.org
> Subject: libvirt XML settings for KVM guests
> 
> I would like to be able to change and persist libvirt XML settings for guests
> (similar to the way that VMware allows you to edit/change the VMX file).
> 
> Example use cases would be to change the default drivers to virtio and also
> change qemu disk settings to other caching policies.
> 
> It seems that now when I manually edit (via virsh edit), I lose those changes
> when the instance is stopped/restarted.
> 
> Is there a way to do this now?
> 
> --Daron
> --
> *****************************************
> Daron E. Clay, CTO
> ZeroMachine.net LLC
> Information Technology Architect
> VMware Certified Professional
> 
> -----------------------------------------
> Specializing in Cloud Computing Services and x86 Virtual Infrastructure
> Solutions
> -----------------------------------------
> 
> Phone: 970-769-4805
> Email: declay@zeromachine.net
> Web: http://zeromachine.net
> *****************************************


Re: libvirt XML settings for KVM guests

Posted by Marcus Sorensen <sh...@gmail.com>.
I believe the way its done now is handled by which OS option you choose. If
you wanted to make the XML persistent it would need to reside on all hosts.
Perhaps you can request an enhancement for user defined OS settings with
KVM that allows you to save a small set of parameters like caching, nic
type, etc. Or simply create your own branch and add in the settings you
prefer.
On Nov 26, 2012 7:32 AM, "DE Clay" <de...@zeromachine.net> wrote:

> I would like to be able to change and persist libvirt XML settings
> for guests (similar to the way that VMware allows you to edit/change the
> VMX file).
>
> Example use cases would be to change the default drivers to virtio and
> also change qemu disk settings to other caching policies.
>
> It seems that now when I manually edit (via virsh edit), I lose those
> changes when the instance is stopped/restarted.
>
> Is there a way to do this now?
>
> --Daron
> --
> *****************************************
> Daron E. Clay, CTO
> ZeroMachine.net LLC
> Information Technology Architect
> VMware Certified Professional
>
> -----------------------------------------
> Specializing in Cloud Computing Services
> and x86 Virtual Infrastructure Solutions
> -----------------------------------------
>
> Phone: 970-769-4805
> Email: declay@zeromachine.net
> Web: http://zeromachine.net
> *****************************************
>
>