Bug 963632

Summary: It doesn't fail to resume a guest when the specified host USB device is not found
Product: Red Hat Enterprise Linux 7 Reporter: hongming <honzhang>
Component: libvirtAssignee: Libvirt Maintainers <libvirt-maint>
Status: CLOSED NOTABUG QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 7.1CC: acathrow, dallan, dyasny, dyuan, mzhan, rwu
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 918470 Environment:
Last Closed: 2013-05-16 10:08:27 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:
Bug Depends On: 918470    
Bug Blocks:    

Description hongming 2013-05-16 09:53:10 UTC
+++ This bug was initially created as a clone of Bug #918470 +++

Description of problem:
When resume a guest if the specified host USB device is not found , It doesn't fail (or drop) even startupPolicy='mandatory'


Version-Release number of selected component (if applicable):
libvirt-0.10.2-18.el6.x86_64 

How reproducible:
100% 

Steps to Reproduce:
1. Plug in a usb disk to host.

2. # virsh start rhel6.3
Domain rhel6.3 started

3. # virsh dumpxml rhel6.3
<domain>
......
<hostdev mode='subsystem' type='usb' managed='yes'>
<source startupPolicy='mandatory'>
<vendor id='0x0204'/>
<product id='0x6025'/>
<address bus='2' device='10'/>
</source>
<alias name='hostdev0'/>
</hostdev>
.......
</domain>


4. # virsh suspend rhel6.3
Domain rhel6.3 suspended

5. Pull out the usb disk from host


6. # virsh resume rhel6.3
Domain rhel6.3 resumed


7. # virsh dumpxml rhel6.3
<domain>
......
<hostdev mode='subsystem' type='usb' managed='yes'>
<source startupPolicy='mandatory'>
<vendor id='0x0204'/>
<product id='0x6025'/>
<address bus='2' device='10'/>
</source>
<alias name='hostdev0'/>
</hostdev>
.......
</domain> 
  
Actual results:
When resume a guest if the specified host USB device is not found , It doesn't fail (or drop) even startupPolicy='mandatory' 

Expected results:
It should be failed to resume the guest if the specified host USB device is not found .


Additional info:

Comment 2 Jiri Denemark 2013-05-16 10:08:27 UTC
This works as expected, virsh suspend and resume commands merely
stop/start guest CPUs. Your test is equivalent to pulling out the usb
disk while the domain is normally running. You probably wanted to run
virsh managedsave and virsh start commands.