RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1451665 - RFE: Virt-v2v can't convert the guest which has encrypted partition
Summary: RFE: Virt-v2v can't convert the guest which has encrypted partition
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libguestfs
Version: 7.4
Hardware: x86_64
OS: Unspecified
medium
medium
Target Milestone: rc
: ---
Assignee: Richard W.M. Jones
QA Contact: Virtualization Bugs
Yehuda Zimmerman
URL:
Whiteboard: V2V
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-05-17 09:16 UTC by mxie@redhat.com
Modified: 2019-07-17 01:48 UTC (History)
11 users (show)

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.
Clone Of:
Environment:
Last Closed: 2018-04-10 09:15:08 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
virt-v2v-encrypted-guest.log (72.25 KB, text/plain)
2017-05-17 09:16 UTC, mxie@redhat.com
no flags Details
v2v-exit.log (66.15 KB, text/plain)
2017-10-13 09:23 UTC, kuwei@redhat.com
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1398191 0 medium NEW RFE: virt-v2v should support converting a libvirt domain that uses libvirt storage volume encryption 2024-03-15 08:27:25 UTC
Red Hat Product Errata RHBA-2018:0677 0 normal SHIPPED_LIVE libguestfs new packages, bug fix and enhancement update 2018-04-10 13:13:49 UTC

Internal Links: 1398191

Description mxie@redhat.com 2017-05-17 09:16:24 UTC
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:

Comment 2 Pino Toscano 2017-05-22 09:41:24 UTC
Hi mxie,

the guest of this test is the classic whole-disk LUKS encryption done by the  Fedora/RHEL installer, right?

Comment 3 mxie@redhat.com 2017-05-22 10:06:17 UTC
(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

Comment 4 Pino Toscano 2017-05-30 07:05:40 UTC
Fixed with
https://github.com/libguestfs/libguestfs/commit/7e6c16f1e7698317991b875f2d7ab3ce9e94c8bb
which is in libguestfs >= 1.37.15.

Comment 8 kuwei@redhat.com 2017-10-13 09:23:54 UTC
Created attachment 1338167 [details]
v2v-exit.log

Comment 11 kuwei@redhat.com 2017-10-30 04:42:34 UTC
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.

Comment 18 errata-xmlrpc 2018-04-10 09:15:08 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://access.redhat.com/errata/RHBA-2018:0677

Comment 19 jackdan 2019-07-16 03:28:05 UTC
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

Comment 20 mxie@redhat.com 2019-07-16 04:05:17 UTC
(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

Comment 21 Richard W.M. Jones 2019-07-16 11:24:43 UTC
We also need the full log.  Also best to create a new bug, don't add comments to old and
very likely irrelevant bugs.

Comment 22 jackdan 2019-07-17 01:48:07 UTC
(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]

Comment 23 jackdan 2019-07-17 01:48:32 UTC
(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]


Note You need to log in before you can comment on or make changes to this bug.