[et-mgmt-tools] [PATCH 4/6] Make VirtualDisk libvirt storage aware
Daniel P. Berrange
berrange at redhat.com
Thu Aug 7 10:20:00 UTC 2008
On Wed, Aug 06, 2008 at 12:24:01PM -0400, Cole Robinson wrote:
> The following patch fixes up VirtualDisk validation and
> adds options for specifying libvirt managed storage.
>
> The whole validation mechanism is fixed to allow setting
> properties outside of object init time and still having
> useful validation. A lot of documentation is added as well.
>
> The main interface changes are as follows (ripped from the
> code docs):
>
> ===========================
>
> If creating a disk object from an existing local block
> device or file, a path is all that should be required. If you want to
> create a local file, a size also needs to be specified.
>
> The remote case is a bit more complex. The options are:
> 1. A libvirt virStorageVol instance (passed as 'volObject') for an
> existing storage volume.
> 2. A virtinst L{StorageVolume} instance for creating a volume (passed
> as 'volInstall').
> 3. An active connection ('conn') and a path to a storage volume on
> that connection.
> 4. An active connection and a tuple of the form ("poolname",
> "volumename") (passed as 'volName')
>
> For the last two cases, the lookup will be performed, and 'vol_object'
> will be set to the returned virStorageVol. All the above cases also
> work on a local connection as well, the only difference being that
> option 3 won't neccessarily error out if the volume isn't found.
>
> ===========================
>
> This is a pretty ugly patch, I was changing several things
> at once, sorry. I've tried to test all new and old use cases
> and the code seems to be pretty solid.
If existing virt-install, virt-clone & virt-manager guest creation works
then that has covered most existing use cases. The other out of tree
user I know of it Koan - probably worth pinging Michael and asking him
to test this doesn't break Koan once we've committed this series of
patches, but before we release it.
Daniel
--
|: Red Hat, Engineering, London -o- http://people.redhat.com/berrange/ :|
|: http://libvirt.org -o- http://virt-manager.org -o- http://ovirt.org :|
|: http://autobuild.org -o- http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|
More information about the et-mgmt-tools
mailing list