Description of problem: virt-v2 should support convert a domain with using domain's UUID instead of domain name Version-Release number of selected component (if applicable): virt-v2v-1.27.45-1.1.el7.x86_64 libguestfs-1.27.45-1.1.el7.x86_64 How reproducible: 100% Steps to Reproduce: 1. Prepare a health guest on xen server. # virsh -c xen+ssh://10.66.106.64 dumpxml rhel6.6-pv-x64-test <domain type='xen'> <name>rhel6.6-pv-x64-test</name> <uuid>1be6394a-de41-c664-e3c6-86fc2c158b93</uuid> <memory>524288</memory> <currentMemory>524288</currentMemory> <vcpu>1</vcpu> <bootloader>/usr/bin/pygrub</bootloader> <os> <type arch='x86_64' machine='xenpv'>linux</type> </os> <clock offset='utc'/> <on_poweroff>destroy</on_poweroff> <on_reboot>restart</on_reboot> <on_crash>restart</on_crash> <devices> <disk type='file' device='disk'> <driver name='tap' type='aio'/> <source file='/var/lib/xen/images/rhel6.6-pv-x64-test.img'/> <target dev='xvda' bus='xen'/> </disk> <interface type='bridge'> <mac address='00:16:3e:7b:e3:58'/> <source bridge='xenbr0'/> <script path='vif-bridge'/> </interface> <console type='pty'> <target port='0'/> </console> <input type='mouse' bus='xen'/> <graphics type='vnc' port='-1' autoport='yes' keymap='en-us'/> </devices> </domain> 2. when converting a guest from xen server, using -ic xen+ssh://root@xen [...] # ssh-keygen # ssh-copy-id -i /root/.ssh/id_rsa.pub root@$xenserver # eval `ssh-agent` # ssh-add using domain's uuid instead of domain's name. # virt-v2v -ic xen+ssh://10.66.106.64 -os /var/tmp 1be6394a-de41-c664-e3c6-86fc2c158b93 [ 0.0] Opening the source -i libvirt -ic xen+ssh://10.66.106.64 1be6394a-de41-c664-e3c6-86fc2c158b93 libvirt: Xen Driver error : Domain not found: xenUnifiedDomainLookupByName virt-v2v: error: internal error: invalid argument: cannot find libvirt domain '1be6394a-de41-c664-e3c6-86fc2c158b93' If reporting bugs, run virt-v2v with debugging enabled and include the complete output: virt-v2v -v -x [...] result: conversion failed. Actual results: virt-v2v cannot support convert a domain with using domain's UUID instead of domain name Expected results: virt-v2 should support convert a domain with using domain's UUID instead of domain name Additional info:
Upstream fix: https://github.com/libguestfs/libguestfs/commit/a417287e0abe09f00bd9160f5b4336d493d0924c https://github.com/libguestfs/libguestfs/commit/47251a3599b1477d7c3749912b404c756e613be6
Try to verify with new build: libguestfs-1.27.46-1.1.el7.x86_64 virt-v2v-1.27.46-1.1.el7.x86_64 steps: Using domain's UUID when converting a domain from xen server: # virsh -c xen+ssh://10.66.106.64 dominfo rhel6.6-pv-x64-test Id: - Name: rhel6.6-pv-x64-test UUID: 1be6394a-de41-c664-e3c6-86fc2c158b93 State: shut off CPU(s): 1 Max memory: 524288 KiB Used memory: 524288 KiB Persistent: yes Autostart: disable Managed save: unknown # virt-v2v -ic xen+ssh://10.66.106.64 -os default 1be6394a-de41-c664-e3c6-86fc2c158b93 [ 0.0] Opening the source -i libvirt -ic xen+ssh://10.66.106.64 1be6394a-de41-c664-e3c6-86fc2c158b93 [ 16.0] Creating an overlay to protect the source from being modified [ 30.0] Opening the overlay [ 49.0] Initializing the target -o libvirt -os default [ 49.0] Inspecting the overlay [ 53.0] Checking for sufficient free disk space in the guest [ 53.0] Estimating space required on target for each disk [ 53.0] Converting Red Hat Enterprise Linux Server release 6.6 Beta (Santiago) to run on KVM [ 90.0] Mapping filesystem data to avoid copying unused and blank areas [ 91.0] Closing the overlay [ 91.0] Copying disk 1/1 to /var/lib/libvirt/images/rhel6.6-pv-x64-test-sda (raw) (100.00/100%) [ 166.0] Creating output metadata Pool default refreshed Domain rhel6.6-pv-x64-test defined from /tmp/v2vlibvirt87020b.xml [ 166.0] Finishing off since using a domain's uuid when conversion works well, move this bug from ON_QA to verified.
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-2015-0303.html