[virt-tools-list] [ [PATCH 1/3] cli: disk: add pr.managed=, pr.type=, pr.path= and pr.mode= support

Lin Ma lma at suse.com
Tue Oct 9 02:46:09 UTC 2018


On 10/2/18 11:00 PM, Cole Robinson wrote:
> On 09/25/2018 05:12 AM, Lin Ma wrote:
>> Enable the managed or unmanaged PR configuration to enable SCSI 
>> persistent
>> reservation for LUN Passthrough.
>>
>> Signed-off-by: Lin Ma <lma at suse.com>
>> ---
>>   man/virt-install.pod                                | 13 +++++++++++++
>>   .../compare/virt-install-many-devices.xml           |  9 +++++++++
>>   tests/clitest.py                                    |  1 +
>>   virtinst/cli.py                                     |  5 +++++
>>   virtinst/devices/disk.py                            |  5 +++++
>>   5 files changed, 33 insertions(+)
>>
>> diff --git a/man/virt-install.pod b/man/virt-install.pod
>> index 657ef8cb..abb9d40d 100644
>> --- a/man/virt-install.pod
>> +++ b/man/virt-install.pod
>> @@ -739,6 +739,19 @@ Defines default behavior of the disk during disk 
>> snapshots.  See possible
>>   values in L<https://www.libvirt.org/formatdomain.html#elementsDisks>,
>>   "snapshot" attribute of the <disk> element.
>>   +=item B<pr.managed, pr.type, pr.path and pr.mode>
>> +
>> +It enables SCSI persistent reservations for LUN passthrough disks.
>> +For possible values, Please refer toPlease refer
>> +L<http://www.libvirt.org/formatdomain.html#elementsDisks>,
>> +"reservations" attribute of the <source> element.
>> +
>> +e.g.
>> +
>> +--disk /dev/sdb,device=lun,bus=scsi,pr.managed=yes
>> +
>> +--disk 
>> /dev/sdc,device=lun,bus=scsi,pr.managed=no,pr.type=unix,pr.path=/tmp/pr-helper0.sock,pr.mode=client
>> +
>>   =back
>>
>
> I don't think this needs to be documented in the manpage. It's 
> poweruser enough that users can figure it out on the command line via 
> --disk help output. So please drop this bit
>
> For new options I'm trying to get closer to the libvirt XML naming, so 
> it's more discoverable and predictable. So I'd like the command line 
> ot be
>
> --disk 
> reservations.managed=no,reservations.source.type=unix,reservations.source.path=/tmp/pr-helper0.sock,reservations.source.mode=client

For virt-install, I want to drop the reservations.source.type, 
reservations.source.path and reservations.source.mode as well,
only support "--disk reservations.managed=yes", Would you agree?

Thanks for your review,
Lin




More information about the virt-tools-list mailing list