Bug 1141631
| Summary: | [RFE] virt-v2v should support convert a guest to a dir-pool with using pool's uuid | ||||||
|---|---|---|---|---|---|---|---|
| Product: | Red Hat Enterprise Linux 7 | Reporter: | zhoujunqin <juzhou> | ||||
| Component: | libguestfs | Assignee: | Richard W.M. Jones <rjones> | ||||
| Status: | CLOSED ERRATA | QA Contact: | Virtualization Bugs <virt-bugs> | ||||
| Severity: | medium | Docs Contact: | |||||
| Priority: | medium | ||||||
| Version: | 7.1 | CC: | dyuan, kuwei, mbooth, mxie, mzhan, ptoscano, rjones, sherold, tzheng | ||||
| Target Milestone: | rc | Keywords: | FutureFeature | ||||
| Target Release: | --- | ||||||
| Hardware: | Unspecified | ||||||
| OS: | Unspecified | ||||||
| Whiteboard: | V2V | ||||||
| Fixed In Version: | libguestfs-1.36.1-1.el7 | Doc Type: | Enhancement | ||||
| Doc Text: | Story Points: | --- | |||||
| Clone Of: | Environment: | ||||||
| Last Closed: | 2017-08-01 22:08:55 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: | 1359086 | ||||||
| Bug Blocks: | |||||||
| Attachments: |
|
||||||
Upstream fix: https://github.com/libguestfs/libguestfs/commit/a417287e0abe09f00bd9160f5b4336d493d0924c https://github.com/libguestfs/libguestfs/commit/1dd485e500a2ee810802e2f6421dde104b2116ab 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 pool's UUID when converting a domain from xen server:
# virsh pool-info default
Name: default
UUID: c0b8d8b2-3a65-4ab1-85f0-c8d094f6a794
State: running
Persistent: yes
Autostart: yes
Capacity: 97.61 GiB
Allocation: 86.92 GiB
Available: 10.69 GiB
# virt-v2v -ic xen+ssh://10.66.106.64 -os c0b8d8b2-3a65-4ab1-85f0-c8d094f6a794 rhel6.6-pv-x64-test
[ 0.0] Opening the source -i libvirt -ic xen+ssh://10.66.106.64 rhel6.6-pv-x64-test
[ 17.0] Creating an overlay to protect the source from being modified
[ 31.0] Opening the overlay
[ 49.0] Initializing the target -o libvirt -os c0b8d8b2-3a65-4ab1-85f0-c8d094f6a794
[ 49.0] Inspecting the overlay
[ 54.0] Checking for sufficient free disk space in the guest
[ 54.0] Estimating space required on target for each disk
[ 54.0] Converting Red Hat Enterprise Linux Server release 6.6 Beta (Santiago) to run on KVM
[ 89.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%)
[ 164.0] Creating output metadata
Pool c0b8d8b2-3a65-4ab1-85f0-c8d094f6a794 refreshed
Domain rhel6.6-pv-x64-test defined from /tmp/v2vlibvirtce98d7.xml
[ 164.0] Finishing off
since using a dir-pool's uuid when convert a guest works well, move this bug from ON_QA to verified.
Created attachment 983190 [details]
virt-v2v-debug.log for new pkg version
(In reply to zhoujunqin from comment #5) > It seems "source pool=" can only recognize pool's name, Yes, this seems correct, so the bug is not fixed. > from my Comment 4, > i'm not sure whether have i do start guest check or not before, so sorry > about that. Agreed - since in comment 4 you didn't try to start the guest, this problem wasn't picked up. I suggest moving the bug back to ASSIGNED. There is no time to fix this in RHEL 7.1, but it should be an easy fix for RHEL 7.2. This should be fixed with https://github.com/libguestfs/libguestfs/commit/775e9cbd2a53c095518152c7a2a19f4044f0c91b which is in libguestfs >= 1.35.6. I can reproduce this with package:
virt-v2v-1.27.41-1.1.el7.x86_64
libguestfs-1.27.41-1.1.el7.x86_64
verify with :
virt-v2v-1.36.1-1.el7.x86_64
libguestfs-1.36.1-1.el7.x86_64
verify steps:
1.Check there is an active dir pool existing in the host.
# virsh pool-list --all
Name State Autostart
-------------------------------------------
default active yes
# virsh pool-info default
Name: default
UUID: d76b01ca-e05d-424f-a96c-6944b615f12d
State: running
Persistent: yes
Autostart: yes
Capacity: 499.75 GiB
Allocation: 230.94 GiB
Available: 268.81 GiB
2.Using pool's UUID when converting a domain from xen server:
# virt-v2v -ic xen+ssh://10.73.3.21 rhel7.3 -os d76b01ca-e05d-424f-a96c-6944b615f12d -of raw
[ 0.0] Opening the source -i libvirt -ic xen+ssh://10.73.3.21 rhel7.3
[ 0.4] Creating an overlay to protect the source from being modified
[ 1.0] Initializing the target -o libvirt -os d76b01ca-e05d-424f-a96c-6944b615f12d
[ 1.0] Opening the overlay
[ 5.9] Inspecting the overlay
[ 22.0] Checking for sufficient free disk space in the guest
[ 22.0] Estimating space required on target for each disk
[ 22.0] Converting Red Hat Enterprise Linux Server 7.3 Beta (Maipo) to run on KVM
virt-v2v: This guest has virtio drivers installed.
[ 142.3] Mapping filesystem data to avoid copying unused and blank areas
[ 143.2] Closing the overlay
[ 144.2] Checking if the guest needs BIOS or UEFI to boot
[ 144.2] Assigning disks to buses
[ 144.2] Copying disk 1/1 to /var/lib/libvirt/images/rhel7.3-sda (raw)
(100.00/100%)
[ 281.2] Creating output metadata
Pool d76b01ca-e05d-424f-a96c-6944b615f12d refreshed
Domain rhel7.3 defined from /tmp/v2vlibvirt6c9bb6.xml
[ 284.5] Finishing off
3.After conversion successfully,boot the guest,checkpoints all passed.
So,virt-v2 can convert a guest to a dir pool with using pool's uuid
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://access.redhat.com/errata/RHBA-2017:2023 |
Description of problem: virt-v2 should support convert a guest to a dir-pool with using pool's uuid Version-Release number of selected component (if applicable): virt-v2v-1.27.41-1.1.el7.x86_64 libguestfs-1.27.41-1.1.el7.x86_64 How reproducible: 100% Steps to Reproduce: 1. Check there is an active dir pool existing in the host. (eg: default) # virsh pool-list --all Name State Autostart ------------------------------------------- ---- active yes default active yes diskpool inactive yes # virsh pool-dumpxml default <pool type='dir'> <name>default</name> <uuid>c0b8d8b2-3a65-4ab1-85f0-c8d094f6a794</uuid> <capacity unit='bytes'>104806400000</capacity> <allocation unit='bytes'>90711490560</allocation> <available unit='bytes'>14094909440</available> <source> </source> <target> <path>/var/lib/libvirt/images</path> <permissions> <mode>0755</mode> <owner>-1</owner> <group>-1</group> </permissions> </target> </pool> 2. Using virt-v2v converts 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 # virt-v2v -ic xen+ssh://10.66.106.64 -os c0b8d8b2-3a65-4ab1-85f0-c8d094f6a794 rhel6.6-pv-x64-test [ 0.0] Opening the source -i libvirt -ic xen+ssh://10.66.106.64 rhel6.6-pv-x64-test libvirt: Remote Driver error : unknown procedure: 212 [ 17.0] Creating an overlay to protect the source from being modified [ 31.0] Opening the overlay [ 49.0] Initializing the target -o libvirt -os c0b8d8b2-3a65-4ab1-85f0-c8d094f6a794 libvirt: Storage Driver error : Storage pool not found: no storage pool with matching name 'c0b8d8b2-3a65-4ab1-85f0-c8d094f6a794' virt-v2v: error: internal error: invalid argument: cannot find libvirt pool 'c0b8d8b2-3a65-4ab1-85f0-c8d094f6a794' If reporting bugs, run virt-v2v with debugging enabled and include the complete output: virt-v2v -v -x [...] Actual results: virt-v2 cannot convert a gust to a dir pool with using pool's uuid. Expected results: virt-v2 should support convert a guest to a dir-pool with using pool's uuid Additional info: virt-v2 can convert a gust to a dir pool with using pool's name or directory. # virt-v2v -ic xen+ssh://10.66.106.64 -os default rhel6.6-pv-x64-test # virt-v2v -ic xen+ssh://10.66.106.64 -os default rhel6.6-pv-x64-test