Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
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.
Description of problem:
Improve the error showing when no enough space left on host while conversion
Version-Release number of selected component (if applicable):
virt-v2v-1.27.54-1.1.el7.x86_64
libguestfs-1.27.54-1.1.el7.x86_64
How reproducible:
100%
Steps to Reproduce:
1. Copy xen guest image and xml file from xen server to v2v server:
# qemu-img info /var/lib/xen/images/rhel6.6-pv-x64-test.img
image: /var/lib/xen/images/rhel6.6-pv-x64-test.img
file format: raw
virtual size: 7.8G (8388608000 bytes)
disk size: 7.8G
2. Check the host left space <8G
# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda6 98G 95G 3.4G 97% /
devtmpfs 3.8G 0 3.8G 0% /dev
tmpfs 3.9G 144K 3.9G 1% /dev/shm
tmpfs 3.9G 169M 3.7G 5% /run
tmpfs 3.9G 0 3.9G 0% /sys/fs/cgroup
/dev/sda1 96G 88G 3.6G 97% /mnt
/dev/sda3 98G 39G 59G 40% /opt
3. Run virt-v2v to connect a xen pv/hvm guest either by -i disk or -i libvirtxml.
# export LIBGUESTFS_BACKEND=direct
# virt-v2v -i libvirtxml -o local -os /var/tmp/ rhel6.6-pv-x64-test.xml -on test33 -of raw -oa preallocated
[ 0.0] Opening the source -i libvirtxml rhel6.6-pv-x64-test.xml
[ 0.0] Creating an overlay to protect the source from being modified
[ 1.0] Opening the overlay
[ 4.0] Initializing the target -o local -os /var/tmp/
[ 4.0] Inspecting the overlay
[ 8.0] Checking for sufficient free disk space in the guest
[ 8.0] Estimating space required on target for each disk
[ 8.0] Converting Red Hat Enterprise Linux Server release 6.6 Beta (Santiago) to run on KVM
This guest has virtio drivers installed.
[ 34.0] Mapping filesystem data to avoid copying unused and blank areas
[ 35.0] Closing the overlay
[ 35.0] Copying disk 1/1 to /var/tmp/test33-sda (raw)
virt-v2v: error: libguestfs error: /var/tmp/test33-sda: fallocate: No space
left on device
If reporting bugs, run virt-v2v with debugging enabled and include the
complete output:
virt-v2v -v -x [...]
4. Run step3 again with host space using almost 100%.
# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda6 98G 98G 20K 100% /
devtmpfs 3.8G 0 3.8G 0% /dev
tmpfs 3.9G 144K 3.9G 1% /dev/shm
tmpfs 3.9G 161M 3.7G 5% /run
tmpfs 3.9G 0 3.9G 0% /sys/fs/cgroup
/dev/sda1 96G 88G 3.6G 97% /mnt
/dev/sda3 98G 39G 59G 40% /opt
# virt-v2v -i libvirtxml -o local -os /var/tmp/ rhel6.6-pv-x64-test.xml -on test333 -of raw -oa preallocated
[ 0.0] Opening the source -i libvirtxml rhel6.6-pv-x64-test.xml
[ 0.0] Creating an overlay to protect the source from being modified
virt-v2v: error: /tmp/v2vovl8aad70.qcow2: No space left on device
If reporting bugs, run virt-v2v with debugging enabled and include the
complete output:
virt-v2v -v -x [...]
Actual results:
As described.
Expected results:
"fallocate" is a function name, didn't show such function in error message, it's unsafe and unfriendly.
step3 and step4 result should keep consistent.
Additional info:
Attached log file for step3 and step4.
Comment 4Richard W.M. Jones
2014-09-25 13:39:15 UTC
Since this is a cosmetic change, moving to 7.2.
Comment 6Richard W.M. Jones
2015-04-20 15:12:32 UTC
I'm going to close because I think the error messages are
reasonable. They both clearly state the problem
("No space left on device"). fallocate is the system call
which fails, and the top Google hit for me is clear:
fallocate(2) - Linux manual page - man7.org
man7.org/linux/man-pages/man2/fallocate.2.html
For the portable, POSIX.1-specified method of ensuring that space is
allocated for a file,
In addition, predicting the space required for conversion is
non-trivial. If we just used the size of the input disk, then
we'd massively overestimate in the common case (-oa preallocated
is not common, nor especially recommended).
We already have code to estimate the space used by the target
(v2v.ml:estimate_target_size) but it's only used by the RHEV
target, and it is notoriously inaccurate.
See also:
https://github.com/libguestfs/libguestfs/blob/a1646fa65c6cd544e287f25051a88c4a572ebb3e/v2v/v2v.ml#L641-L767