[et-mgmt-tools] Support for kvm/qemu cache mode

Cole Robinson crobinso at redhat.com
Thu Feb 26 04:03:49 UTC 2009


Ben Kochie wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Libvirt now supports an xml bit to select qemu cache types.
> 
> <disk type='block' device='disk'>
>   <driver name='qemu' cache='writethrough'/>
>   <source dev='/path/to/dev'/>
>   <target dev='vda' bus='virtio'/>
> </disk>
> 
> It would be nice to select this with -disk in virt-install.

Cool! Sounds good.

> started looking at the VirtualDisk.py source to see where something like
> that would go.  If anyone is working on this, or has ideas, please let
> me know.
> 

Following existing convention should be sufficient. Add cache as a
VirtualDisk __init__ parameter, setup a simple set_*/get_* property, and
if it's present, encorporate it the xml in get_config_xml.

You could also add some validation tests in tests/validation.py.

> I was thinking the virt-install command would look like:
> 
> virt-install -disk "path=/path/to/dev,cache=writethrough"

Looks good to me. Please be sure to include documentation in
man/en/virt-install.pod (don't worry about actually generating the man
page).

Thanks,
Cole




More information about the et-mgmt-tools mailing list