Bug 1451665
Summary: | RFE: Virt-v2v can't convert the guest which has encrypted partition | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | Red Hat Enterprise Linux 7 | Reporter: | mxie <mxie> | ||||||
Component: | libguestfs | Assignee: | Richard W.M. Jones <rjones> | ||||||
Status: | CLOSED ERRATA | QA Contact: | Virtualization Bugs <virt-bugs> | ||||||
Severity: | medium | Docs Contact: | Yehuda Zimmerman <yzimmerm> | ||||||
Priority: | medium | ||||||||
Version: | 7.4 | CC: | 13027710816, juzhou, ktordeur, kuwei, mtessun, mxie, mzhan, ptoscano, rjones, tzheng, xiaodwan | ||||||
Target Milestone: | rc | Keywords: | FutureFeature | ||||||
Target Release: | --- | ||||||||
Hardware: | x86_64 | ||||||||
OS: | Unspecified | ||||||||
Whiteboard: | V2V | ||||||||
Fixed In Version: | libguestfs-1.36.7-1.el7 | Doc Type: | Enhancement | ||||||
Doc Text: |
*virt-v2v* now converts Linux guests encrypted with LUKS
With this update, the *virt-v2v* utility can convert Linux guests installed with full-disk LUKS encryption, that is when all the partitions other than the `/boot` partition are encrypted.
Notes:
* The *virt-v2v* utility does not support conversion of Linux guests on partitions with other types of encryption schemes.
* The *virt-p2v* utility does not support conversion of Linux machines installed with full-disk LUKS encryption.
|
Story Points: | --- | ||||||
Clone Of: | Environment: | ||||||||
Last Closed: | 2018-04-10 09:15:08 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: | |||||||||
Attachments: |
|
Hi mxie, the guest of this test is the classic whole-disk LUKS encryption done by the Fedora/RHEL installer, right? (In reply to Pino Toscano from comment #2) > Hi mxie, > > the guest of this test is the classic whole-disk LUKS encryption done by the > Fedora/RHEL installer, right? Hi Pino, Yes, pls refer to below partition info of the encrypted rhel6.9 guest which is installed on xen server #lsblk NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT xvda 202:0 0 14.7G 0 disk ├─xvda1 202:1 0 500M 0 part /boot └─xvda2 202:2 0 14.2G 0 part └─luks-6b952cdc-9d5b-426d-bd0c-1ba16e00b4eb (dm-0) 253:0 0 14.2G 0 crypt ├─VolGroup-lv_root (dm-1) 253:1 0 12.7G 0 lvm / └─VolGroup-lv_swap (dm-2) 253:2 0 1.5G 0 lvm [SWAP] sr0 11:0 1 1024M 0 rom Fixed with https://github.com/libguestfs/libguestfs/commit/7e6c16f1e7698317991b875f2d7ab3ce9e94c8bb which is in libguestfs >= 1.37.15. Created attachment 1338167 [details]
v2v-exit.log
To verify it with below builds: libvirt-3.8.0-1.el7.x86_64- virt-v2v-1.36.10-1.el7.x86_64 libguestfs-1.36.10-1.el7.x86_64 qemu-kvm-rhev-2.10.0-3.el7.x86_64 Step; 1.Using virt-v2v to convert the guest as below. # virt-v2v -ic xen+ssh://root.3.21 6.9-encrypted -of raw [ 0.0] Opening the source -i libvirt -ic xen+ssh://root.3.21 6.9-encrypted [ 0.5] Creating an overlay to protect the source from being modified [ 1.0] Initializing the target -o libvirt -os default [ 1.1] Opening the overlay Enter key or passphrase ("/dev/sda2"): [ 7.3] Inspecting the overlay [ 17.0] Checking for sufficient free disk space in the guest [ 17.0] Estimating space required on target for each disk [ 17.0] Converting Red Hat Enterprise Linux Server release 6.9 (Santiago) to run on KVM virt-v2v: This guest has virtio drivers installed. [ 78.2] Mapping filesystem data to avoid copying unused and blank areas virt-v2v: warning: fstrim on guest filesystem /dev/VolGroup/lv_root failed. Usually you can ignore this message. To find out more read "Trimming" in virt-v2v(1). Original message: fstrim: fstrim: /sysroot/: the discard operation is not supported [ 78.3] Closing the overlay [ 78.4] Checking if the guest needs BIOS or UEFI to boot [ 78.4] Assigning disks to buses [ 78.4] Copying disk 1/1 to /var/lib/libvirt/images/6.9-encrypted-sda (raw) (100.00/100%) [ 258.8] Creating output metadata Pool default refreshed Domain 6.9-encrypted defined from /tmp/v2vlibvirt3254f2.xml [ 261.2] Finishing off 2.After conversion,boot into the system and checkpoints all passed. Sorry for comment6,maybe that guest exist some problem.Thanks for your reply. So, the bug has fixed ,move the bug status 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-2018:0677 I have the similar problem Description of problem: Virt-v2v can't convert the guest from VMware ESXi to Openstack Version-Release number of selected component (if applicable): virt-v2v-1.40.2-6.fc31.x86_64 libguestfs-1.40.2-6.fc31.x86_64 libvirt-5.5.0-1.fc31.x86_64 qemu-kvm-4.0.0-5.fc31.x86_64 How reproducible: 100% virt-v2v host: it is a openstack server guest is fedora31 Steps to Reproduce: 1. Prepare a linux guest(in the VMware ESXi, status is shutoff, guest is redhat Enterprise 6.5) and using virt-v2v can convert the linux guest to openstack but the conversion is failed. pls refer to attachment log # virt-v2v -ic vpx://administrator%40vsphere.local.1.213/?no_verify=1 Test02 -o openstack -oo server-id=<openstack-server-id/name> command: mount returned 32 command: mount: stderr: mount: /sysroot: unknown filesystem type. inspect_os: fses: inspect_get_roots: roots: libguestfs: trace: v2v: inspect_os = [] virt-v2v: error: inspection could not detect the source guest (or physical machine). Assuming that you are running virt-v2v/virt-p2v on a source which is supported (and not, for example, a blank disk), then this should not happen. No root device found in this operating system image. Actual results: As above description (In reply to jackdan from comment #19) > I have the similar problem > > Description of problem: > Virt-v2v can't convert the guest from VMware ESXi to Openstack Hi Jackdan, Could you please check if your guest has similar partitions with bug1613265 or bug1525131 We also need the full log. Also best to create a new bug, don't add comments to old and very likely irrelevant bugs. (In reply to mxie from comment #20) > (In reply to jackdan from comment #19) > > I have the similar problem > > > > Description of problem: > > Virt-v2v can't convert the guest from VMware ESXi to Openstack > > Hi Jackdan, > > Could you please check if your guest has similar partitions with > bug1613265 or bug1525131 Hi, mxie I am sorry that no detailed documentation is provided. The guest: [root@localhost ~]# cat /etc/*release CentOS release 6.5 (Final) LSB_VERSION=base-4.0-amd64:base-4.0-noarch:core-4.0-amd64:core-4.0-noarch:graphics-4.0-amd64:graphics-4.0-noarch:printing-4.0-amd64:printing-4.0-noarch CentOS release 6.5 (Final) CentOS release 6.5 (Final) [root@localhost ~]# lsblk NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT sr0 11:0 1 4.2G 0 rom sda 8:0 0 5G 0 disk ├─sda1 8:1 0 500M 0 part /boot └─sda2 8:2 0 4.5G 0 part ├─VolGroup-lv_root (dm-0) 253:0 0 4G 0 lvm / └─VolGroup-lv_swap (dm-1) 253:1 0 512M 0 lvm [SWAP] (In reply to mxie from comment #20) > (In reply to jackdan from comment #19) > > I have the similar problem > > > > Description of problem: > > Virt-v2v can't convert the guest from VMware ESXi to Openstack > > Hi Jackdan, > > Could you please check if your guest has similar partitions with > bug1613265 or bug1525131 Hi, mxie I am sorry that no detailed documentation is provided. The guest: [root@localhost ~]# cat /etc/*release CentOS release 6.5 (Final) LSB_VERSION=base-4.0-amd64:base-4.0-noarch:core-4.0-amd64:core-4.0-noarch:graphics-4.0-amd64:graphics-4.0-noarch:printing-4.0-amd64:printing-4.0-noarch CentOS release 6.5 (Final) CentOS release 6.5 (Final) [root@localhost ~]# lsblk NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT sr0 11:0 1 4.2G 0 rom sda 8:0 0 5G 0 disk ├─sda1 8:1 0 500M 0 part /boot └─sda2 8:2 0 4.5G 0 part ├─VolGroup-lv_root (dm-0) 253:0 0 4G 0 lvm / └─VolGroup-lv_swap (dm-1) 253:1 0 512M 0 lvm [SWAP] |
Created attachment 1279603 [details] virt-v2v-encrypted-guest.log Description of problem: Virt-v2v can't convert the guest which has encrypted partition Version-Release number of selected component (if applicable): virt-v2v-1.36.3-3.el7.x86_64 libguestfs-1.36.3-3.el7.x86_64 libvirt-3.2.0-5.el7.x86_64 qemu-kvm-1.5.3-137.el7.x86_64 How reproducible: 100% Steps to Reproduce: 1.Prepare a linux guest which has encrypted partition on xen server and using virt-v2v can convert the encrypted guest but the conversion is failed. pls refer to attachment log # virt-v2v -ic xen+ssh://root.3.21 Auto-xen-rhel6.9-case13063 -of qcow2 -b default [ 0.0] Opening the source -i libvirt -ic xen+ssh://root.3.21 Auto-xen-rhel6.9-case13063 [ 0.7] Creating an overlay to protect the source from being modified [ 7.2] Initializing the target -o libvirt -os default [ 7.2] Opening the overlay [ 237.4] Inspecting the overlay virt-v2v: error: inspection could not detect the source guest (or physical machine). Assuming that you are running virt-v2v/virt-p2v on a source which is supported (and not, for example, a blank disk), then this should not happen. No root device found in this operating system image. If reporting bugs, run virt-v2v with debugging enabled and include the complete output: virt-v2v -v -x [...] Actual results: As above description Expected results: Virt-v2v can convert encrypted guest Additional info: