Cole Robinson | 12 Aug 23:05
Favicon

[PATCH] virt-install cli options for managed storage

Per Dan's advice, I've changed the previously proposed
virt-install cli options for specifying libvirt managed
storage.

This patch does not change any possible semantics of
--file or --cdrom: they remain strictly for specifying
local media. In this way they are basically deprecated.

A new cli option is added: --disk. The format is:

--disk  path:///some/file/path[:device=cdrom|floppy][:permissions=ro|sh]
--disk  vol:///poolname/volname[:device=cdrom|floppy][:permissions=ro|sh]
--disk  pool:///poolname[:device=cdrom|floppy][:permissions=ro|sh]

The changes from Dan's proposal are:

 - use of path:/// instead of file:///, since this will
   hopefully clear up any confusion users previously had
   with specifying block devices.
 - For vol:///, I used / as a delimiter vs. ':' between
   the pool and vol name, to avoid any extra collisions
   (since I assume '/' is not part of a legal pool name).
 - Explictly list what type of extra option we are
   appending (device, permissions). This adds clarity
   to the command line, reduces chance of name collision,
   and is similar to the approach used by qemu.

The --disk option is quite useful even for the local case,
since users can now add cdrom and floppy drives (and eventually
other device types) via the cli. This could also be expanded
(Continue reading)

Cole Robinson | 14 Aug 03:52
Favicon

Re: [PATCH] virt-install cli options for managed storage

Cole Robinson wrote:
> Per Dan's advice, I've changed the previously proposed
> virt-install cli options for specifying libvirt managed
> storage.
>
> This patch does not change any possible semantics of
> --file or --cdrom: they remain strictly for specifying
> local media. In this way they are basically deprecated.
>
> A new cli option is added: --disk. The format is:
>
> --disk  path:///some/file/path[:device=cdrom|floppy][:permissions=ro|sh]
> --disk  vol:///poolname/volname[:device=cdrom|floppy][:permissions=ro|sh]
> --disk  pool:///poolname[:device=cdrom|floppy][:permissions=ro|sh]
>
> The changes from Dan's proposal are:
>
>  - use of path:/// instead of file:///, since this will
>    hopefully clear up any confusion users previously had
>    with specifying block devices.
>  - For vol:///, I used / as a delimiter vs. ':' between
>    the pool and vol name, to avoid any extra collisions
>    (since I assume '/' is not part of a legal pool name).
>  - Explictly list what type of extra option we are
>    appending (device, permissions). This adds clarity
>    to the command line, reduces chance of name collision,
>    and is similar to the approach used by qemu.
>
> The --disk option is quite useful even for the local case,
> since users can now add cdrom and floppy drives (and eventually
(Continue reading)

Daniel P. Berrange | 14 Aug 10:16
Favicon

Re: [PATCH] virt-install cli options for managed storage

On Wed, Aug 13, 2008 at 09:52:18PM -0400, Cole Robinson wrote:
> Cole Robinson wrote:
> Hmm. I've hit a problem in testing this. Using the URI syntax, bash doesn't
> seem to register it should auto complete paths. Basically, if you start
> entering '--disk path:///' tab autocompletetion doesn't work at all.
> 
> I suggest changing this syntax then to use
> 
> --disk path=/some/path

Or just "--disk /some/path" - ie treat a leading '/' as a path, unless
you want to allow relative paths ?

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 :|
Daniel P. Berrange | 14 Aug 10:17
Favicon

Re: [PATCH] virt-install cli options for managed storage

On Tue, Aug 12, 2008 at 05:06:38PM -0400, Cole Robinson wrote:
> Per Dan's advice, I've changed the previously proposed
> virt-install cli options for specifying libvirt managed
> storage.
> 
> This patch does not change any possible semantics of
> --file or --cdrom: they remain strictly for specifying
> local media. In this way they are basically deprecated.
> 
> A new cli option is added: --disk. The format is:
> 
> --disk  path:///some/file/path[:device=cdrom|floppy][:permissions=ro|sh]
> --disk  vol:///poolname/volname[:device=cdrom|floppy][:permissions=ro|sh]
> --disk  pool:///poolname[:device=cdrom|floppy][:permissions=ro|sh]
> 
> The changes from Dan's proposal are:
> 
>  - use of path:/// instead of file:///, since this will
>    hopefully clear up any confusion users previously had
>    with specifying block devices.
>  - For vol:///, I used / as a delimiter vs. ':' between
>    the pool and vol name, to avoid any extra collisions
>    (since I assume '/' is not part of a legal pool name).
>  - Explictly list what type of extra option we are
>    appending (device, permissions). This adds clarity
>    to the command line, reduces chance of name collision,
>    and is similar to the approach used by qemu.
> 
> The --disk option is quite useful even for the local case,
> since users can now add cdrom and floppy drives (and eventually
(Continue reading)

Cole Robinson | 14 Aug 15:36
Favicon

Re: [PATCH] virt-install cli options for managed storage

Daniel P. Berrange wrote:
> On Tue, Aug 12, 2008 at 05:06:38PM -0400, Cole Robinson wrote:
>> Per Dan's advice, I've changed the previously proposed
>> virt-install cli options for specifying libvirt managed
>> storage.
>>
>> This patch does not change any possible semantics of
>> --file or --cdrom: they remain strictly for specifying
>> local media. In this way they are basically deprecated.
>>
>> A new cli option is added: --disk. The format is:
>>
>> --disk  path:///some/file/path[:device=cdrom|floppy][:permissions=ro|sh]
>> --disk  vol:///poolname/volname[:device=cdrom|floppy][:permissions=ro|sh]
>> --disk  pool:///poolname[:device=cdrom|floppy][:permissions=ro|sh]
>>
>> The changes from Dan's proposal are:
>>
>>  - use of path:/// instead of file:///, since this will
>>    hopefully clear up any confusion users previously had
>>    with specifying block devices.
>>  - For vol:///, I used / as a delimiter vs. ':' between
>>    the pool and vol name, to avoid any extra collisions
>>    (since I assume '/' is not part of a legal pool name).
>>  - Explictly list what type of extra option we are
>>    appending (device, permissions). This adds clarity
>>    to the command line, reduces chance of name collision,
>>    and is similar to the approach used by qemu.
>>
>> The --disk option is quite useful even for the local case,
(Continue reading)

Cole Robinson | 14 Aug 18:28
Favicon

Re: [PATCH] virt-install cli options for managed storage

Cole Robinson wrote:
> Per Dan's advice, I've changed the previously proposed
> virt-install cli options for specifying libvirt managed
> storage.
> 
> This patch does not change any possible semantics of
> --file or --cdrom: they remain strictly for specifying
> local media. In this way they are basically deprecated.
> 

Here's the second cut. Format for the cli options is

--disk path=/some/path[,device=cdrom|floppy][,permissions=ro|sh]
--disk pool=poolname[,device=cdrom|floppy][,permissions=ro|sh]
--disk vol=poolname/volname[,device=cdrom|floppy][,permissions=ro|sh]

Hopefully this will simplify things and fix the issues encountered.

Once this is committed I'll be writing up the man pages and
creating a wiki page detailing how this can all fit together
for remote installs.

Thanks,
Cole
diff -r bd9e79483f70 virt-install
--- a/virt-install	Mon Aug 11 18:20:28 2008 -0400
+++ b/virt-install	Thu Aug 14 12:22:09 2008 -0400
@@ -44,26 +44,101 @@
(Continue reading)

Daniel P. Berrange | 14 Aug 18:47
Favicon

Re: [PATCH] virt-install cli options for managed storage

On Thu, Aug 14, 2008 at 12:28:24PM -0400, Cole Robinson wrote:
> Cole Robinson wrote:
> > Per Dan's advice, I've changed the previously proposed
> > virt-install cli options for specifying libvirt managed
> > storage.
> > 
> > This patch does not change any possible semantics of
> > --file or --cdrom: they remain strictly for specifying
> > local media. In this way they are basically deprecated.
> > 
> 
> Here's the second cut. Format for the cli options is
> 
> --disk path=/some/path[,device=cdrom|floppy][,permissions=ro|sh]
> --disk pool=poolname[,device=cdrom|floppy][,permissions=ro|sh]
> --disk vol=poolname/volname[,device=cdrom|floppy][,permissions=ro|sh]
> 
> Hopefully this will simplify things and fix the issues encountered.

Ok, this looks good to me now, though shorten 'permissions' to 'perms'
because I'm lazy typing.

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 :|
Cole Robinson | 14 Aug 23:58
Favicon

Re: [PATCH] virt-install cli options for managed storage

Daniel P. Berrange wrote:
> On Thu, Aug 14, 2008 at 12:28:24PM -0400, Cole Robinson wrote:
>> Cole Robinson wrote:
>>> Per Dan's advice, I've changed the previously proposed
>>> virt-install cli options for specifying libvirt managed
>>> storage.
>>>
>>> This patch does not change any possible semantics of
>>> --file or --cdrom: they remain strictly for specifying
>>> local media. In this way they are basically deprecated.
>>>
>> Here's the second cut. Format for the cli options is
>>
>> --disk path=/some/path[,device=cdrom|floppy][,permissions=ro|sh]
>> --disk pool=poolname[,device=cdrom|floppy][,permissions=ro|sh]
>> --disk vol=poolname/volname[,device=cdrom|floppy][,permissions=ro|sh]
>>
>> Hopefully this will simplify things and fix the issues encountered.
> 
> Ok, this looks good to me now, though shorten 'permissions' to 'perms'
> because I'm lazy typing.
> 
> Daniel

Thanks, I've committed this with the suggested 'perms' fix:

http://hg.et.redhat.com/virt/applications/virtinst--devel?cs=354ea4aa8fda

- Cole
(Continue reading)


Gmane