| Summary: | virt-v2v doesn't remove VirtualBox additions correctly because of file quoting | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 7 | Reporter: | Bimal Chollera <bcholler> |
| Component: | libguestfs | Assignee: | Richard W.M. Jones <rjones> |
| Status: | CLOSED ERRATA | QA Contact: | Virtualization Bugs <virt-bugs> |
| Severity: | medium | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 7.2 | CC: | juzhou, mxie, mzhan, ptoscano, sherold, tzheng, xiaodwan |
| Target Milestone: | rc | ||
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | V2V | ||
| Fixed In Version: | libguestfs-1.32.0-3.el7 | Doc Type: | Bug Fix |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2016-11-03 17:57:51 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: | |
|
Description
Bimal Chollera
2016-01-07 16:11:53 UTC
To reproduce this bug (a little bit involved I'm afraid!) (1) Download the latest VirtualBox Guest Additions ISO from http://download.virtualbox.org/virtualbox/ eg: http://download.virtualbox.org/virtualbox/5.0.10/VBoxGuestAdditions_5.0.10.iso (2) Install a CentOS 7.2 VM: $ virt-builder centos-7.2 (3) Boot CentOS 7.2 VM with the ISO attached: $ virt-install --import --name tmp-bz1296606 --ram 4096 --disk path=centos-7.2.img,format=raw --os-variant rhel7 --disk device=cdrom,path=VBoxGuestAdditions_5.0.10.iso,format=raw --boot hd (4) Log in as root (using the password printed in step 2). (5) Mount the VBox Additions in the guest: # mount /dev/cdrom /mnt (6) Run the VBox Additions script to install them in the guest: # yum install bzip2 # /mnt/VBoxLinuxAdditions.run This should create /opt/VBoxGuestAdditions-XXX and /var/lib/VBoxGuestAdditions/config. (7) Shut down the guest and delete the libvirt config: $ virsh undefine tmp-bz1296606 (8) You will now have a guest image containing VirtualBox Guest Additions that you can try to convert using virt-v2v: $ ll centos-7.2.img -rw-r--r--. 1 rjones rjones 6442450944 Jan 11 11:52 centos-7.2.img $ virt-v2v -i disk centos-7.2.img -o null [...] [ 16.1] Converting CentOS Linux release 7.2.1511 (Core) to run on KVM virt-v2v: error: libguestfs error: is_file: is_file_stub: path must start with a / character Interestingly this bug existed in old virt-v2v too. I have pushed a commit upstream: https://github.com/libguestfs/libguestfs/commit/64af88a1b766edddeb1dcf845019f1ed01202d0b I can reproduce it following the steps in comment 7. # rpm -q libguestfs virt-v2v libguestfs-1.28.1-1.55.el7.x86_64 virt-v2v-1.28.1-1.55.el7.x86_64 steps: 1) Download the latest VirtualBox Guest Additions ISO from http://download.virtualbox.org/virtualbox/ eg: http://download.virtualbox.org/virtualbox/5.0.10/VBoxGuestAdditions_5.0.10.iso 2) Prepare a guest image which has rhel7 installed. 3) Create a temp guest by the image in step2 and with VBos ISO attached. $ virt-install --import --name tmp-bz1296606 --ram 4096 --disk path=centos-7.2.img,format=raw --os-variant rhel7 --disk device=cdrom,path=VBoxGuestAdditions_5.0.10.iso,format=raw --boot hd 4) Log in the guest as root. 5) Mount the VBox Additions in the guest: # mount /dev/cdrom /mnt 6) Run the VBox Additions script to install them in the guest: # yum install bzip2 # /mnt/VBoxLinuxAdditions.run This should create /opt/VBoxGuestAdditions-XXX and /var/lib/VBoxGuestAdditions/config. 7) Shut down the guest and delete the libvirt config. $ virsh undefine tmp-bz1296606 8) You will now have a guest image containing VirtualBox Guest Additions that you can try to convert using virt-v2v: # virt-v2v -i disk rhel7.2-1030-clone.qcow2 -o null [ 0.0] Opening the source -i disk rhel7.2-1030-clone.qcow2 [ 0.0] Creating an overlay to protect the source from being modified [ 0.0] Opening the overlay [ 105.0] Initializing the target -o null [ 105.0] Inspecting the overlay [ 114.0] Checking for sufficient free disk space in the guest [ 114.0] Estimating space required on target for each disk [ 114.0] Converting Red Hat Enterprise Linux Server release 7.2 (Maipo) to run on KVM virt-v2v: error: libguestfs error: is_file: is_file_stub: path must start with a / character If reporting bugs, run virt-v2v with debugging enabled and include the complete output: virt-v2v -v -x [...] And the try it with latest libguestfs. # rpm -q libguestfs virt-v2v libguestfs-1.32.2-6.el7.x86_64 virt-v2v-1.32.2-6.el7.x86_64 # virt-v2v -i disk rhel7.2-1030-clone.qcow2 -o null [ 0.0] Opening the source -i disk rhel7.2-1030-clone.qcow2 [ 0.1] Creating an overlay to protect the source from being modified [ 0.5] Initializing the target -o null [ 0.5] Opening the overlay [ 55.4] Inspecting the overlay [ 64.6] Checking for sufficient free disk space in the guest [ 64.6] Estimating space required on target for each disk [ 64.6] Converting Red Hat Enterprise Linux Server 7.2 (Maipo) to run on KVM virt-v2v: warning: /files/boot/grub2/device.map/hd0 references unknown device "vda". You may have to fix this entry manually after conversion. virt-v2v: This guest has virtio drivers installed. [ 91.0] Mapping filesystem data to avoid copying unused and blank areas [ 92.2] Closing the overlay [ 92.5] Checking if the guest needs BIOS or UEFI to boot [ 92.5] Assigning disks to buses [ 92.5] Copying disk 1/1 to /var/tmp/null.Z660lw/sda (qcow2) (100.00/100%) [ 125.1] Creating output metadata [ 125.1] Finishing off So move the bug 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/RHSA-2016-2576.html |