Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.

Bug 1305489

Summary: vpx: Include dcpath output in libvirt XML
Product: Red Hat Enterprise Linux 7 Reporter: Marcel Kolaja <mkolaja>
Component: libvirtAssignee: Michal Privoznik <mprivozn>
Status: CLOSED ERRATA QA Contact: Virtualization Bugs <virt-bugs>
Severity: high Docs Contact:
Priority: high    
Version: 7.3CC: dyuan, gklein, jdenemar, jherrman, jsuchane, juzhou, michal.skrivanek, mprivozn, mxie, rbalakri, rjones, sherold, snagar, tzheng
Target Milestone: rcKeywords: ZStream
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: libvirt-1.2.17-13.el7_2.4 Doc Type: Enhancement
Doc Text:
The virt-v2v utility now processes the "<vmware:datacenterpath>" tag, newly added to the domain XML file by the libvirt library, and maps the paths to the disk image on a VMware vCenter server. This feature enables accessing disk images on the VMware vCenter server without the need for the "--dcpath" command-line option.
Story Points: ---
Clone Of: 1263574 Environment:
Last Closed: 2016-03-31 22:08:17 UTC Type: ---
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: 1263574, 1292437    
Bug Blocks:    

Description Marcel Kolaja 2016-02-08 12:12:54 UTC
This bug has been copied from bug #1263574 and has been proposed
to be backported to 7.2 z-stream (EUS).

Comment 6 mxie@redhat.com 2016-03-04 02:32:49 UTC
Verify the bug with the build:
libvirt-1.2.17-13.el7_2.4.x86_64
kernel-3.10.0-229.29.1.el7
qemu-kvm-1.5.3-105.el7_2.3.x86_64
libguestfs-winsupport-7.2-1.el7.x86_64
virtio-win-1.8.0-4.el7.noarch
virt-v2v-1.28.1-1.55.el7_2.1.x86_64
libguestfs-1.28.1-1.55.el7_2.1.x86_64

Steps:
1. Setting up some folder structure in vCenter.  In vCenter I added this:

  v2v-vcenter
  -> Folder(my is called mxie)
     -> Datacenter(my is called mxie-data)
        -> Cluster(my is called mxie-cluster)
           -> vmware [ESXi node]

2.Check the dcpath of guest rhel6.7-mxie in via vCenter server's web address, eg: https://vcenter/folder

2.1 Read the underlying disk image,the URL is :https://10.66.145.47/folder/rhel6%2e7%2dmxie?dcPath=mxie%252fmxie%252ddata&dsName=datastore1

2.2 encode URL,dcpath=mxie/mxie-data


3.Check dcpath in libvirt xml:

3.1 #virsh -c vpx://root.145.47/mxie/mxie-data/mxie-cluster/10.66.144.40/?no_verify=1 
Enter root's password for 10.66.145.47: 
Welcome to virsh, the virtualization interactive terminal.

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

virsh # list --all
 Id    Name                           State
----------------------------------------------------
 164   VMware-vcenter-server-app      running
 -     app_vcenter600                 shut off
 -     Auto-esx6.0-win7-efi           shut off
 -     bug1260689-win2008R2-GPO-Macfee shut off
 -     rhel6.7-mxie                    shut off
 [etc]

3.2 Check dcpath in guest xml
virsh # dumpxml rhel6.7-mxie
<domain type='vmware' xmlns:vmware='http://libvirt.org/schemas/domain/vmware/1.0'>
  <name>rhel6.7-mxie</name>
  <uuid>423f07c2-18f5-6830-09bd-bff8e75c2f9b</uuid>
  <memory unit='KiB'>2097152</memory>
  <currentMemory unit='KiB'>2097152</currentMemory>
  <vcpu placement='static'>1</vcpu>
  <cputune>
    <shares>1000</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='[datastore1] rhel6.7-mxie/rhel6.7-mxie.vmdk'/>
      <target dev='sda' bus='scsi'/>
      <address type='drive' controller='0' bus='0' target='0' unit='0'/>
    </disk>
    <controller type='scsi' index='0' model='vmpvscsi'/>
    <interface type='bridge'>
      <mac address='00:50:56:bf:c1:73'/>
      <source bridge='VM Network'/>
      <model type='vmxnet3'/>
    </interface>
    <video>
      <model type='vmvga' vram='8192'/>
    </video>
  </devices>
  <vmware:datacenterpath>mxie/mxie-data</vmware:datacenterpath>
</domain>

Result now:
dcpath "<vmware:datacenterpath>mxie/mxie-data</vmware:datacenterpath>" has added in libvirt xml and match with the above one encoded from URL


So move the bug from ON_QA to VERIFIED

Comment 8 errata-xmlrpc 2016-03-31 22:08:17 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2016-0555.html