[et-mgmt-tools] [PATCH 6/6] update virt-install options for specifying managed storage
Cole Robinson
crobinso at redhat.com
Tue Aug 12 14:41:02 UTC 2008
Daniel P. Berrange wrote:
> On Wed, Aug 06, 2008 at 12:26:48PM -0400, Cole Robinson wrote:
>> The attached patch updates virt-install to allow specifying
>> libvirt managed storage.
>>
>> --file can specified managed storage using:
>>
>> - An absolute path to a managed volume
>> - A volume passed as --file volume:poolname:volname
>> - A pool to create storage on, using --file pool:poolname
>>
>> --cdrom can use the first of the above two options (doesn't
>> make sense to create install media).
>>
>> There is an obvious problem with this approach though:
>> Specifying pool:foo or volume:foo:bar could collide
>> with existing file names, and volume:foo:bar would
>> fail if the specified pool had a colon in it. This
>> was mostly my quick solution so I could test it all
>> out, i'm open to suggestions how to change it. Once an
>> interface is decided on I'll update the docs.
>
> The other option would be to leave --file & --cdrom as they
> already are, and instead use a more sensibly named option
> like --disk. People are often confused thinging that can't
> pass a block device to --file already.
>
>
> The --cdrom arg also allows specifying a URI, in which case it
> downloads the ISO image from the install tree for booting.
>
> So I'd suggest using URI syntax
>
> --disk file:///some/file/path[:cdrom|floppy][:ro|sh]
> --disk vol:///poolname:volname[:cdrom|floppy][:ro|sh]
> --disk pool:///poolname[:cdrom|floppy][:ro|sh]
Hmm, I think this may be the way to go. Specifying all these options
doesn't fit into the current model. The one issue I see with this,
if we don't alter the --cdrom option, is how the user specifies
they want to install off cdrom media.
I guess if the user doesn't specify --pxe or --location we can
check to see if they passed a cdrom (or floppy!) and try to use
that.
>
> So this defaults to creating a harddisk, writable, but lets you annotate
> the arg to specify that its a cdrom, or floppy, and optionally readonly
> or read-write shared. In the future I expect we'll have more disk types
> like Flash, or USB massstorage, etc, so better to have a single --disk
> arg, than adding --floppy --usbmsd, --flash etc.
>
Agreed, I'll start working on this.
Thanks,
Cole
More information about the et-mgmt-tools
mailing list