Bug 1657652

Summary: Change categories of "Guest Operating system management by VIX API" in v2v man page
Product: Red Hat Enterprise Linux 8 Reporter: mxie <mxie>
Component: libguestfsAssignee: Libvirt Maintainers <libvirt-maint>
Status: CLOSED CURRENTRELEASE QA Contact: Virtualization Bugs <virt-bugs>
Severity: low Docs Contact:
Priority: low    
Version: 8.0CC: juzhou, mxie, mzhan, ptoscano, rjones, tzheng, xiaodwan, zili
Target Milestone: rcKeywords: Reopened
Target Release: 8.0   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: V2V
Fixed In Version: libguestfs-1.38.4-9.module+el8+2655+d5607577 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1530967 Environment:
Last Closed: 2019-06-14 01:02:37 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1530967    
Bug Blocks:    

Comment 1 Pino Toscano 2018-12-13 15:41:47 UTC
Fixed upstream with
https://github.com/libguestfs/libguestfs/commit/37955f14aa628bedbe0c06bddb5f8fa4f508cc62
which is in libguestfs >= 1.39.15.

Comment 3 mxie@redhat.com 2018-12-18 04:02:00 UTC
Verify the bug with below builds:
virt-v2v-1.38.4-8.module+el8+2564+79985af8.x86_64
libguestfs-1.38.4-8.module+el8+2564+79985af8.x86_64

Steps:
1.Check "VCENTER: NON-ADMINISTRATOR ROLE" info in v2v man page
 VCENTER: NON-ADMINISTRATOR ROLE
       Instead of using the vCenter Administrator role, you can create a
       custom non-administrator role to perform the conversion.  You will
       however need to give it a minimum set of permissions as follows (using
       VMware vCenter 6.5):

       1.  Create a custom role in vCenter.

       2.  Enable (check) the following objects:

            Datastore:
             - Browse datastore
             - Low level file operations

            Sessions:
             - Validate session

            Virtual Machine:
              Interaction:
                - Guest operating system management by VIX API
              Provisioning:
                - Allow disk access
                - Allow read-only disk access
                - Allow virtual machine download

Hi Pino,

    Categories of "Guest Operating system management by VIX API" is correct now in v2v man page, but I see add new permission "Allow virtual machine download" in Provisioning, is it necessary? Thanks!

Comment 4 Pino Toscano 2018-12-19 07:21:36 UTC
(In reply to mxie from comment #3)
>     Categories of "Guest Operating system management by VIX API" is correct
> now in v2v man page, but I see add new permission "Allow virtual machine
> download" in Provisioning, is it necessary?

I tested with VMware vCenter 6.5, and this was needed to properly download the vmx file of the guest (done by the libvirt esx driver).

Comment 5 mxie@redhat.com 2018-12-20 02:27:54 UTC
(In reply to Pino Toscano from comment #4)
> (In reply to mxie from comment #3)
> >     Categories of "Guest Operating system management by VIX API" is correct
> > now in v2v man page, but I see add new permission "Allow virtual machine
> > download" in Provisioning, is it necessary?
> 
> I tested with VMware vCenter 6.5, and this was needed to properly download
> the vmx file of the guest (done by the libvirt esx driver).

Hi Pino,

   As we discussed in RC, I can dump the guest xml from vCenter6.5 by virsh using non-admin account without " Allow virtual machine download" permission", so I think the permission "Allow virtual machine download" is not necessary, could you please help to confirm? Thanks!

# virsh -c  vpx://vsphere.local%5cmxie.lab.eng.brq.redhat.com/DC1/ptoscano-vmware01.tpb.lab.eng.brq.redhat.com/?no_verify=1
Enter vsphere.local\mxie's password for ptoscano-vcsa.tpb.lab.eng.brq.redhat.com: 
Welcome to virsh, the virtualization interactive terminal.

Type:  'help' for help with commands
       'quit' to quit

virsh # dumpxml 'Windows 8'
<domain type='vmware' xmlns:vmware='http://libvirt.org/schemas/domain/vmware/1.0'>
  <name>Windows 8</name>
  <uuid>423855dc-f08e-cdbf-337a-92377f181666</uuid>
  <memory unit='KiB'>4194304</memory>
  <currentMemory unit='KiB'>4194304</currentMemory>
  <vcpu placement='static'>2</vcpu>
  <cputune>
    <shares>2000</shares>
  </cputune>
  <os>
    <type arch='x86_64'>hvm</type>
  </os>
  <clock offset='utc'/>
  <on_poweroff>destroy</on_poweroff>
  <on_reboot>restart</on_reboot>
  <on_crash>destroy</on_crash>
  <devices>
    <disk type='file' device='disk'>
      <source file='[ds1] Windows 8/Windows 8.vmdk'/>
      <target dev='sda' bus='scsi'/>
      <address type='drive' controller='0' bus='0' target='0' unit='0'/>
    </disk>
    <controller type='scsi' index='0' model='lsisas1068'/>
    <interface type='bridge'>
      <mac address='00:50:56:b8:b7:9f'/>
      <source bridge='VM Network'/>
      <model type='vmxnet3'/>
    </interface>
    <video>
      <model type='vmvga' vram='8192' primary='yes'/>
    </video>
  </devices>
  <vmware:datacenterpath>DC1</vmware:datacenterpath>
  <vmware:moref>vm-57</vmware:moref>
</domain>

Comment 6 Pino Toscano 2019-01-07 11:33:15 UTC
OK, it seems to work fine also without the "Allow virtual machine download" permission:
https://github.com/libguestfs/libguestfs/commit/5e5896752ef06872696f1da05b414fc9eca94015

Comment 7 mxie@redhat.com 2019-01-15 10:39:31 UTC
Verify the bug with below builds:
virt-v2v-1.38.4-9.module+el8+2655+d5607577.x86_64
libguestfs-1.38.4-9.module+el8+2655+d5607577.x86_64

Steps:
1.Check "VCENTER: NON-ADMINISTRATOR ROLE" info in v2v man page
#man virt-v2v
....
 VCENTER: NON-ADMINISTRATOR ROLE
       Instead of using the vCenter Administrator role, you can create a
       custom non-administrator role to perform the conversion.  You will
       however need to give it a minimum set of permissions as follows (using
       VMware vCenter 6.5):

       1.  Create a custom role in vCenter.

       2.  Enable (check) the following objects:

            Datastore:
             - Browse datastore
             - Low level file operations

            Sessions:
             - Validate session

            Virtual Machine:
              Interaction:
                - Guest operating system management by VIX API
              Provisioning:
                - Allow disk access
                - Allow read-only disk access
           
Result:
    The Categories of "Guest Operating system management by VIX API" is correct in v2v man page now, so move the bug from ON_QA to VERIFIED