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.

Bug 1036005

Summary: Can't revert running guest without RNG device to running snapshot with RNG device and vice versa.
Product: Red Hat Enterprise Linux 7 Reporter: hyao <hyao>
Component: libvirtAssignee: Peter Krempa <pkrempa>
Status: CLOSED NOTABUG QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.0CC: acathrow, chhu, codong, cwei, dyuan, lcui, mzhan, shyu, tzheng, ydu
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-12-02 12:16:04 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description hyao@redhat.com 2013-11-29 07:43:40 UTC
Description
Can't revert running guest without RNG device to running snapshot with RNG device and vice versa.

Version:
libvirt-1.1.1-13.el7.x86_64

How reproducible:
100%

Steps to Reproduce:
1.Create a snapshot of the running guest with RNG device.
# virsh snapshot-info rng random_run
Name:           random_run
Domain:         rng
Current:        no
State:          running
Location:       internal
Parent:         -
Children:       0
Descendants:    0
Metadata:       yes

# virsh snapshot-dumpxml rng random_run
<domainsnapshot>
 ...
      <rng model='virtio'>
        <backend model='random'>/dev/random</backend>
      </rng>
    </devices>
    <seclabel type='dynamic' model='selinux' relabel='yes'/>
  </domain>
</domainsnapshot>


3. Remove the rng device and reboot the guest without RNG device. Then Revert
| the guest to the running snapshot with RNG device.
# virsh snapshot-revert rng random_run



Actual results:
Step3:
# virsh snapshot-revert rng random_run
error: revert requires force: Target domain RNG device count '0' does not match source count '1'

Revert running guest with RNG device to running snapshot without RNG device, get the similar error:
# virsh snapshot-revert rng run_norng
error: revert requires force: Target domain RNG device count '1' does not match source count '0'


Expected results:
Revert proceeds smoothly without any error.

Additional info:

Comment 2 Peter Krempa 2013-12-02 12:16:04 UTC
If you are running a VM with a different hardware configuration as the one saved in a snapshot you need to specify the --force argument for snapshot revert as qemu needs to be restarted to accomodate a change in hardware topology. This is also indicated by the error message stated above. This is a desired behavior.

Closing as NOTABUG.