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 1138586 - No error shows when converting running guest with virt-v2v
Summary: No error shows when converting running guest with virt-v2v
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libguestfs
Version: 7.1
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: rc
: ---
Assignee: Richard W.M. Jones
QA Contact: Virtualization Bugs
URL:
Whiteboard: V2V
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-09-05 09:10 UTC by tingting zheng
Modified: 2015-03-05 13:44 UTC (History)
6 users (show)

Fixed In Version: libguestfs-1.27.38-1.1.el7
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-03-05 13:44:16 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2015:0303 0 normal SHIPPED_LIVE libguestfs bug fix and enhancement update 2015-03-05 17:34:44 UTC

Description tingting zheng 2014-09-05 09:10:40 UTC
Description
No error shows when converting running guest with virt-v2v

Version:
libguestfs-tools-c-1.27.32-1.1.el7.x86_64
libguestfs-1.27.32-1.1.el7.x86_64

How reproducible:
100%

Steps to Reproduce:
1.Prepare a running guest.
# virsh list 
 Id    Name                           State
----------------------------------------------------
 15    demo-clone                     running

2.Use virt-v2v to convert the funning guest,no error shows.
# virt-v2v -o rhev -os 10.66.90.115:/vol/v2v_auto/auto_export --network rhevm demo-clone
[   0.0] Opening the source -i libvirt demo-clone
[   0.0] Creating an overlay to protect the source from being modified
[   1.0] Opening the overlay
……

It should give error info like old virt-2v does:
# virt-v2v  -o rhev -os 10.66.90.115:/vol/v2v_auto/auto_export --network rhevm test
virt-v2v: Guest test is currently running. It must be shut down first.

Actual results:
As described.

Expected results:
Warning info shows like:virt-v2v: Guest $guest is currently running. It must be shut down first.

Additional info:

Comment 2 Richard W.M. Jones 2014-09-05 12:57:11 UTC
Fixed in:

https://github.com/libguestfs/libguestfs/commit/096c05a750b8b525e48149c0c6522769c92ab07c

(libguestfs >= 1.27.38)

Comment 3 zhoujunqin 2014-09-09 09:58:57 UTC
I can reproduce it as bug description.
Then try to verify it with package:
libguestfs-1.27.39-1.1.el7.x86_64
virt-v2v-1.27.39-1.1.el7.x86_64

Steps:
1. Prepare a running guest.
# virsh list 
 Id    Name                           State
----------------------------------------------------
 38    rhel6                          running

2.Use virt-v2v to convert the running guest
# virt-v2v -o rhev -os 10.66.90.115:/vol/v2v_auto/auto_export --network rhevm rhel6
[   0.0] Opening the source -i libvirt rhel6
virt-v2v: error: internal error: invalid argument: libvirt domain 'rhel6' 
is running, it must be shut down in order to perform virt-v2v conversion

If reporting bugs, run virt-v2v with debugging enabled and include the 
complete output:

  virt-v2v -v -x [...]

Result: It prevent converting running guest with virt-v2v and showing error message, so move to VERFILED.

Comment 4 zhoujunqin 2014-09-12 04:04:15 UTC
Hi rjones,
I want to confirm with you about some points:
1. can we convert a paused guest, if not should show some error.
now the result is, i can convert a paused guest successfully.
steps:
1.1 Prepare a paused guest.
# virsh list 
 Id    Name                           State
----------------------------------------------------
 2     rhel6                          paused
# virsh domstate rhel6 --reason
paused (user)
1.2. Use virt-v2v to convert the paused guest,no error shows.
# virt-v2v -o rhev -os 10.66.90.115:/vol/v2v_auto/auto_export --network rhevm rhel6
[   0.0] Opening the source -i libvirt rhel6
[   0.0] Creating an overlay to protect the source from being modified
[   0.0] Opening the overlay
[   2.0] Initializing the target -o rhev -os 10.66.90.115:/vol/v2v_auto/auto_export
[   2.0] Inspecting the overlay
[  11.0] Checking for sufficient free disk space in the guest
[  11.0] Converting Red Hat Enterprise Linux Server release 6.6 Beta (Santiago) to run on KVM
[  39.0] Mapping filesystem data to avoid copying unused and blank areas
[  40.0] Closing the overlay
[  40.0] Copying disk 1/1 to /tmp/v2v.m2kJOS/5b625e34-c943-4407-949d-9b9926bdf406/images/7b847ca5-1b02-4a70-aaa3-1b0a39613dee/5c2ede42-c5e3-4535-a5cf-6d82dc5d91de (raw)
    (100.00/100%)
[ 114.0] Creating output metadata
[ 114.0] Finishing off

2. when virt-v2v operation will check the guest status, that's to say at the beginning or monitoring the whole conversion process.

Please help me check it, thanks.

Comment 5 Richard W.M. Jones 2014-09-12 05:01:44 UTC
(In reply to zhoujunqin from comment #4)
> Hi rjones,
> I want to confirm with you about some points:
> 1. can we convert a paused guest, if not should show some error.
> now the result is, i can convert a paused guest successfully.

Yes, this is correct.  You are allowed to convert a paused guest.
The current test only checks the guest is not running.

> 2. when virt-v2v operation will check the guest status, that's to say at the
> beginning or monitoring the whole conversion process.

Yes, it only checks the status at the beginning of the operation.

If you start the guest half way through v2v, you'll end up with a
corrupted guest.  There's not a way to stop this from happening.
There is no concept in libvirt of blocking a guest from running.

Comment 6 Richard W.M. Jones 2014-09-16 15:31:16 UTC
(In reply to Richard W.M. Jones from comment #5)
> (In reply to zhoujunqin from comment #4)
> > Hi rjones,
> > I want to confirm with you about some points:
> > 1. can we convert a paused guest, if not should show some error.
> > now the result is, i can convert a paused guest successfully.
> 
> Yes, this is correct.  You are allowed to convert a paused guest.
> The current test only checks the guest is not running.

I've changed my mind on this.  Starting with libguestfs 1.27.47,
virt-v2v prevents you from starting conversion on a guest which
is paused (or "idle", which was an actual bug).

The upstream commit is:

https://github.com/libguestfs/libguestfs/commit/8856fadadb4f10b89f13068d01d40643e31c488d

Comment 8 errata-xmlrpc 2015-03-05 13:44:16 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://rhn.redhat.com/errata/RHBA-2015-0303.html


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