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 2001794 - [virt-clone] wrong error message advises to run clone on paused machine
Summary: [virt-clone] wrong error message advises to run clone on paused machine
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: virt-manager
Version: 8.5
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: rc
: ---
Assignee: Jonathon Jongsma
QA Contact: Hongzhou Liu
URL:
Whiteboard:
Depends On: 2009080
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-09-07 08:18 UTC by smitterl
Modified: 2022-05-10 14:26 UTC (History)
10 users (show)

Fixed In Version: virt-manager-3.2.0-1.el8
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-05-10 13:54:55 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 2009080 1 unspecified CLOSED [RHEL 8.6] Rebase virt-manager to latest stable release 2023-06-27 08:43:54 UTC
Red Hat Issue Tracker RHELPLAN-96377 0 None None None 2021-09-07 08:18:49 UTC
Red Hat Product Errata RHBA-2022:1862 0 None None None 2022-05-10 13:55:41 UTC

Description smitterl 2021-09-07 08:18:30 UTC
Description of problem:
virt-clone error message advises valid vm state for clone is paused causing churn for the user as they have to stop the machine from paused state before re-running virt-clone a third time


Version-Release number of selected component (if applicable):
virt-install-2.2.1-4.el8.noarch

How reproducible:
100%


Steps to Reproduce:
1. Have vm running
2. virt-clone --auto-clone --original vm --name clone
>>
ERROR    Domain with devices to clone must be paused or shutoff.
3. virsh suspend vm
4. virt-clone --auto-clone --original vm --name clone

Actual results:
>>
ERROR    Couldn't create storage volume 'vm2-clone-clone-1.qcow2': 'internal error: Child process (/usr/bin/qemu-img convert -f qcow2 -O qcow2 -o compat=1.1,lazy_refcounts /var/lib/libvirt/images/vm2-clone.qcow2 /var/lib/libvirt/images/vm2-clone-clone-1.qcow2) unexpected exit status 1: qemu-img: Could not open '/var/lib/libvirt/images/vm2-clone.qcow2': Failed to get shared "write" lock
Is another process using the image [/var/lib/libvirt/images/vm2-clone.qcow2]?


Expected results:
After 2.
>>
ERROR    Domain with devices to clone must be shut off.

Comment 1 Peter Krempa 2021-09-07 13:55:08 UTC
virt-clone is part of the virt-manager package.

Comment 3 Martin Kletzander 2021-09-30 13:15:55 UTC
Fixed upstream by v2.2.1-268-g140a1f3b15d4:

commit 140a1f3b15d47ea5d2d56bdf56d0484419023280
Author: Cole Robinson <crobinso>
Date:   Wed Jan 29 16:14:55 2020 -0500

    cloner: Drop ability to clone a paused VM

This was fixed in upstream Bug 1725330.

Comment 4 smitterl 2021-11-03 11:29:53 UTC
IIUC this will be fixed by the next rebase in 8.6 https://bugzilla.redhat.com/show_bug.cgi?id=2009080

Comment 8 Hongzhou Liu 2021-11-25 09:45:15 UTC
I can reproduce this issue with package:
virt-install-2.2.1-4.el8.noarch

Steps:
1. Prepare a running status’  vm1
# virsh domstate vm1
>>
running
 
2. Run the command below to  clone the VM.
# virt-clone --auto-clone --original vm1 --name clone-vm1
>>
ERROR    Domain with devices to clone must be paused or shutoff.

Comment: Since the qcow image has been locked by qemu, a paused vm can not be cloned.This error message needs to be updated

3.  Suspend vm1 and clone it
# virsh domstate vm1
>>
paused
#  virt-clone --auto-clone --original vm1 --name clone-vm1
>>
WARNING  Setting the graphics device port to autoport, in order to avoid conflicting.
ERROR    Couldn't create storage volume 'clone-vm1.img': 'internal error: Child process (/usr/bin/qemu-img convert -f qcow2 -O qcow2 -o compat=1.1,lazy_refcounts /var/lib/libvirt/images/vm1.img /var/lib/libvirt/images/clone-vm1.img) unexpected exit status 1: qemu-img: Could not open '/var/lib/libvirt/images/vm1.img': Failed to get shared "write" lock
Is another process using the image [/var/lib/libvirt/images/vm1.img]?
'


Then try to verify this bug with new build - virt-install-3.2.0-1.el8.noarch

Steps:
1: Prepare a running status’  vm1
# virsh domstate vm1
>>
running

2: Run the command below to clone the running VM.
#  virt-clone --auto-clone --original vm1 --name clone-vm1
>>
ERROR    Domain to clone must be shutoff.

Comment: The error message is clear for the user

3: suspend vm1 and try step 2 again
# virsh domstate vm1
>>
paused
#  virt-clone --auto-clone --original vm1 --name clone-vm1
>>
ERROR    Domain to clone must be shutoff
Comment: The error message is clear for the user, failed to clone a paused VM.

4. Shut off vm1 and try step 2 again
# virsh domstate vm1
>>
shut off
#  virt-clone --auto-clone --original vm1 --name clone-vm1
>>
Allocating 'clone-vm1.img'                                                                                                 | 6.0 GB  00:00:00     
Clone 'clone-vm1' created successfully.

Comment: A shutoff vm can be cloned successfully.

Summary - All the test results are as expected. So I moved this bug from ON_QA to VERIFIED status.

Comment 9 Hongzhou Liu 2021-12-23 05:18:56 UTC
Hi Sebastian,

Because this bug first report on S390, so could you double check the bug?

Thanks

Comment 10 smitterl 2021-12-24 09:37:32 UTC
(In reply to Hongzhou Liu from comment #9)
> Hi Sebastian,
> 
> Because this bug first report on S390, so could you double check the bug?
> 
> Thanks

I don't think it's necessary. The change is arch-independent and only the error message was changed, IIUC.

Comment 12 errata-xmlrpc 2022-05-10 13:54:55 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 (virt-manager bug fix and enhancement update), 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-2022:1862


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