Bug 1329174 - Can't remove a rng device when the guest is running sometimes
Summary: Can't remove a rng device when the guest is running sometimes
Keywords:
Status: CLOSED DUPLICATE of bug 1348044
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: qemu-kvm-rhev
Version: 7.3
Hardware: x86_64
OS: Unspecified
medium
medium
Target Milestone: rc
: ---
Assignee: pagupta
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-04-21 10:27 UTC by XiaoyunHu
Modified: 2016-08-03 06:34 UTC (History)
11 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-08-03 06:34:58 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description XiaoyunHu 2016-04-21 10:27:36 UTC
Description of problem:
Can't remove a rng device when the guest is running sometimes.

Version-Release number of selected component (if applicable):
virt-manager-1.3.2-1.el7.noarch
libvirt-1.3.3-2.el7.x86_64


How reproducible:
50%

Steps to Reproduce:
1. Prepare a shut off guest without rng device.
2. Running the guest and prepare a rng xml.
# cat rng.xml
<rng model="virtio">
  <backend model="random">/dev/random</backend>
</rng>
3.Run "virsh attach-device $guest rng.xml" to attach the rng device to the $guest in Host.
# virsh attach-device $guest rng.xml
Device attached successfully

There will be a rng device in the guest's hardware details.
4.Run "ls /dev|grep hwrng" in the guest.
# ls /dev|grep hwrng
hwrng
5. Run "virsh detach-device $guest rng.xml" to detach the rng device from the $guest in Host.
# virsh detach-device $guest rng.xml
Device detached successfully
6. Run "virsh dumpxml $guest|grep -A4 rng" in Host and check if there is the rng device in hardware details of the guest.


Actual results:
After Step6:
1.#virsh dumpxml $guest|grep -A4 rng
    <rng model='virtio'>
      <backend model='random'>/dev/random</backend>
      <alias name='rng0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x0b' function='0x0'/>
    </rng>
2.There is still a rng device in hardware details of the guest .

Expected results:
1.#virsh dumpxml $guest|grep -A4 rng

2.The rng device in hardware details of the guest is gone.

Additional info:
Please try step 3-6 several times if the bug don't reproduce.

Comment 2 Peter Krempa 2016-04-21 10:51:04 UTC
Looks like an issue with the RNG device itself since libvirt correctly removes it sometimes. PCI devices require guest cooperation with the guest to eject.

Please provide version of qemu and the guest OS that was used.

Moving to qemu for further investigation.

Comment 3 XiaoyunHu 2016-04-21 11:23:24 UTC
(In reply to Peter Krempa from comment #2)
> Looks like an issue with the RNG device itself since libvirt correctly
> removes it sometimes. PCI devices require guest cooperation with the guest
> to eject.
> 
> Please provide version of qemu and the guest OS that was used.
> 
> Moving to qemu for further investigation.

Host: qemu-kvm-rhev-2.3.0-31.el7_2.12.x86_64

Guest: kernel-3.10.0-327.el7.x86_64
Red Hat Enterprise Linux Server release 7.2

Thanks.

Comment 4 Amit Shah 2016-08-03 06:34:58 UTC

*** This bug has been marked as a duplicate of bug 1348044 ***


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