Bug 1362525 - Import KVM guest image: cannot convert VM with block device to block device.
Summary: Import KVM guest image: cannot convert VM with block device to block device.
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: ovirt-engine
Classification: oVirt
Component: BLL.Virt
Version: 4.0.2.2
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ovirt-4.0.4
: 4.0.4
Assignee: Shahar Havivi
QA Contact: Nisim Simsolo
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-08-02 12:32 UTC by Nisim Simsolo
Modified: 2016-09-26 12:39 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
User cannot import VM from KVM source to oVirt when the destination storage domain is block device due to incorrect disk allocation space. Our current solution is allocating the virtual size of the disk.
Clone Of:
Environment:
Last Closed: 2016-09-26 12:39:29 UTC
oVirt Team: Virt
Embargoed:
rule-engine: ovirt-4.0.z+
rule-engine: blocker+
mgoldboi: planning_ack+
rule-engine: devel_ack+
rule-engine: testing_ack+


Attachments (Terms of Use)
engine.log (833.07 KB, text/plain)
2016-08-02 12:38 UTC, Nisim Simsolo
no flags Details
vdsm.log (1.32 MB, text/plain)
2016-08-02 12:38 UTC, Nisim Simsolo
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1302427 0 high CLOSED [RFE] Add ability to import RHEL KVM guest images (managed by libvirt) directly into RHEV 2021-08-30 12:34:14 UTC
oVirt gerrit 62427 0 master MERGED core: Import KVM guest image: cannot convert VM with block device to block device 2020-08-23 08:59:08 UTC
oVirt gerrit 62540 0 master MERGED ui: Import KVM guest image: cannot convert VM with block device to block device 2020-08-23 08:59:08 UTC
oVirt gerrit 62911 0 ovirt-engine-4.0 MERGED core: Import KVM guest image: cannot convert VM with block device to block device 2020-08-23 08:59:08 UTC
oVirt gerrit 62912 0 ovirt-engine-4.0 MERGED ui: Import KVM guest image: cannot convert VM with block device to block device 2020-08-23 08:59:07 UTC

Internal Links: 1302427

Description Nisim Simsolo 2016-08-02 12:32:52 UTC
Description of problem:
- Importing VM from KVM environment with iSCSI disk to RHEV with iSCSI destination disk failed with the next vdsm.log error:
Thread-42673::ERROR::2016-08-02 15:20:17,846 .... IOError: [Errno 28] No space left on device

Investigating SPM host vdsm.log show that lvcreate is creating volume of only 1GB:
8f2dcfc2-0926-4ae4-96f9-7add5d6cd629::DEBUG::2016-08-02 15:19:44,073::lvm::288::Storage.Misc.excCmd::(cmd) /usr/bin/taskset --cpu-list 0-11 /usr/bin/sudo -n /usr/sbin/lvm lvcreat
e --config ' devices { preferred_names = ["^/dev/mapper/"] ignore_suspended_devices=1 write_cache_state=0 disable_after_error_count=3 filter = [ '\''a|/dev/mapper/3514f0c5a516000
ef|/dev/mapper/3514f0c5a516000f0|/dev/mapper/3514f0c5a516000f1|/dev/mapper/3514f0c5a516000f2|'\'', '\''r|.*|'\'' ] }  global {  locking_type=1  prioritise_write_locks=1  wait_for
_locks=1  use_lvmetad=0 }  backup {  retain_min = 50  retain_days = 0 } ' --autobackup n --contiguous n --size 1037m --addtag OVIRT_VOL_INITIALIZING --name fb5977c2-e1ee-4b5d-9a0
3-eaf6ca334807 816f2072-6187-4473-9ec7-ca2ae5a37fb6 (cwd None)

- Converting VMware VM with block device to block device target is working properly.


Version-Release number of selected component (if applicable):
rhevm-4.0.2.2-0.1.el7ev
vdsm-4.18.9-1.el7ev.x86_64
qemu-kvm-rhev-2.3.0-31.el7_2.20.x86_64
libvirt-client-1.2.17-13.el7_2.5.x86_64
sanlock-3.2.4-3.el7_2.x86_64

How reproducible:
100%

Steps to Reproduce:
1. Import VM with iSCSI disk to RHEV and set iSCSI target disk.
2.
3.

Actual results:
Import failed

Expected results:
Convert VM from block device to block device should work.

Additional info:
engine and vdsm logs attached.

Comment 1 Nisim Simsolo 2016-08-02 12:38:17 UTC
Created attachment 1186797 [details]
engine.log

Comment 2 Nisim Simsolo 2016-08-02 12:38:48 UTC
Created attachment 1186798 [details]
vdsm.log

Comment 3 Michal Skrivanek 2016-08-10 07:29:35 UTC
workaround exists by using cmdline virt-v2v

Comment 4 Red Hat Bugzilla Rules Engine 2016-08-10 07:29:40 UTC
Bug tickets must have version flags set prior to targeting them to a release. Please ask maintainer to set the correct version flags and only then set the target milestone.

Comment 5 Shahar Havivi 2016-08-11 08:02:52 UTC
The problem looks like the directio package,
error:
IOError: [Errno 28] No space left on device

the lvcreate created with 4.8G free space on the lun is 15G.
kvm2ovirt tool copying the image, when done (100%) directio throw the error.

Comment 6 Shahar Havivi 2016-08-16 06:14:26 UTC
Nisim,
Did you use the virt-manager to create the vm disk?
If so the disks are pre-allocated by default which mean that we need to use the virtual size.

This means that the solution for importing kvm with block device will need to allocate by the virtual size.
In 4.1 we will have the ability to shrink the volume so we can claim back the wasted space.

I open a bug for libvirt bz #1332019 to report the physical size of the disks that they are going to stream - once this feature implemented no need to use the virtual size and volume shrink.

for now the solution will be using the virtual size.

Comment 7 Nisim Simsolo 2016-08-16 08:09:47 UTC
Yes, VMs and disks are created using virt-manager

Comment 8 Yaniv Kaul 2016-08-23 10:24:35 UTC
I'm not sure the doctext clearly reflect the issue. Can you verify? Especially the end user experience.

Comment 9 Nisim Simsolo 2016-09-01 14:31:06 UTC
Verified:
ovirt-engine-4.0.4-0.1.el7ev
sanlock-3.2.4-3.el7_2.x86_64
qemu-kvm-rhev-2.3.0-31.el7_2.21.x86_64
vdsm-4.18.12-1.el7ev.x86_64
libvirt-client-1.2.17-13.el7_2.5.x86_64


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