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:
I was using "guestfish -a $guest_image -i" without --ro, and at the mean time I used virt-edit/virt-sysprep to modify the guest image, there will be a crash if I'm modifying the same file.
According to the mail discussion with Rich, It's hard to determine that you're using the disk image from multiple tools at once, but it won't work and it will corrupt the disk image.
So, there should be a reminder to avoid user to edit a guest image by multiple tools at the same time in guestfish man page (perhaps in the warning part: http://libguestfs.org/guestfish.1.html#warning)
Version-Release number of selected component (if applicable):
libguestfs-1.20.11-16.el6.x86_64
How reproducible:
100%
Steps to Reproduce:
1. Prepare a guest image RHEL-Server-6.7-32-hvm.raw .
2.
# guestfish -a RHEL-Server-6.7-32-hvm.raw -i
><fs> touch /home/file1
><fs> vi /home/file1
><fs> cat /home/file1
guestfish
><fs> vi /home/file1
Add the content "guestfish add", don't save or exit.
3. At the mean time, open a new tab and execute:
# virt-edit -a RHEL-Server-6.7-32-hvm.raw /home/file1
Add the content "virt-edit" at the second line,save&exit
4. save & exit step 2 at the same time.
5. exit guestfish and enter again,
# guestfish -a RHEL-Server-6.7-32-hvm.raw -i
><fs> cat /home/file1
guestfish
virt-
You can see some content are lost.
p.s.:
There are also other possible errors, like the file is crash and deleted, or there are garbage characters, etc.
Actual results:
Expected results:
Additional info:
1. On RHEL7.2(libguestfs-1.28.1-55.el7.x86_64) , there is the same problem.
Comment 1Richard W.M. Jones
2016-01-04 15:19:41 UTC
Verified with the packages:
libguestfs-1.32.5-6.el7.x86_64
Verify steps:
Check the manpage of guestfish, virt-edit, virt-copy-in, virt-tar-in, guestmount, virt-rescue, virt-sysprep, virt-sparsify, etc.
There is a warning section like :
Using "guestfish" in write mode on live virtual machines, or concurrently with other disk editing tools, can be dangerous, potentially causing disk corruption. The virtual machine must be shut down before you use this command, and disk images must not be edited concurrently.
So 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