Bug 1036005 - Can't revert running guest without RNG device to running snapshot with RNG device and vice versa.
Summary: Can't revert running guest without RNG device to running snapshot with RNG de...
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libvirt
Version: 7.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: rc
: ---
Assignee: Peter Krempa
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-11-29 07:43 UTC by hyao@redhat.com
Modified: 2013-12-02 12:16 UTC (History)
10 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-12-02 12:16:04 UTC
Target Upstream Version:


Attachments (Terms of Use)

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.


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