Bug 1175668
Summary: | Attach a usb disk to guest failed. | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 7 | Reporter: | lcheng |
Component: | libvirt | Assignee: | Ján Tomko <jtomko> |
Status: | CLOSED ERRATA | QA Contact: | Virtualization Bugs <virt-bugs> |
Severity: | medium | Docs Contact: | |
Priority: | medium | ||
Version: | 7.1 | CC: | dyuan, honzhang, jdenemar, ovasik, pzhang, rbalakri, xuzhang |
Target Milestone: | rc | Keywords: | Regression |
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | libvirt-1.2.8-12.el7 | Doc Type: | Bug Fix |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2015-03-05 07:48:29 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
lcheng
2014-12-18 10:23:30 UTC
Actually, this turns out to be a regression since 7.0 caused by Peter's refactoring. Now fixed upstream: commit 1cddf0001f5f1af10791181229148f36fd6d94c5 Author: Ján Tomko <jtomko> CommitDate: 2014-12-18 12:53:56 +0100 Fix hotplugging of block device-backed usb disks Commit ca91ba7 moved qemuSetupDiskCgroup into the qemuDomainPrepareDisk helper, but failed to call it for usb disks. https://bugzilla.redhat.com/show_bug.cgi?id=1175668` git describe: v1.2.11-58-g1cddf00 verify version: kernel-3.10.0-222.el7.x86_64 qemu-kvm-rhev-2.1.2-18.el7.x86_64 libvirt-1.2.8-12.el7.x86_64 verify steps: 1.prepare a block disk like following # cat block-disk.xml <disk type='block' device='disk'> <driver name='qemu' type='raw'/> <source dev='/dev/sdb'/> <target dev='sdg' bus='usb'/> </disk> 2.start a guest which has no block-backed usb disks . # virsh dumpxml r7 | grep disk -A 8 <devices> <emulator>/usr/libexec/qemu-kvm</emulator> <disk type='file' device='disk'> <driver name='qemu' type='qcow2'/> <source file='/var/lib/libvirt/images/vm1.qcow2'/> <backingStore/> <target dev='hda' bus='ide'/> <alias name='ide0-0-0'/> <address type='drive' controller='0' bus='0' target='0' unit='0'/> </disk> 3.attach the block disk , attach successfully # virsh attach-device r7 block-disk.xml Device attached successfully 4.chech domaim XML # virsh dumpxml r7 | grep disk -A 8 <disk type='file' device='disk'> <driver name='qemu' type='qcow2'/> <source file='/var/lib/libvirt/images/vm1.qcow2'/> <backingStore/> <target dev='hda' bus='ide'/> <alias name='ide0-0-0'/> <address type='drive' controller='0' bus='0' target='0' unit='0'/> </disk> <disk type='block' device='disk'> <driver name='qemu' type='raw'/> <source dev='/dev/sdb'/> <backingStore/> <target dev='sdg' bus='usb'/> <alias name='usb-disk6'/> </disk> 4.detach the hotplug disk # virsh detach-device r7 block-disk.xml Device detached successfully check domain XML ,detach successfully # virsh dumpxml r7 |grep disk -A 9 |grep sdg 5.attach block device usb disk again # virsh attach-device r7 block-disk.xml Device attached successfully # virsh dumpxml r7 |grep disk -A 9 | grep sdg <disk type='block' device='disk'> <driver name='qemu' type='raw'/> <source dev='/dev/sdb'/> <backingStore/> <target dev='sdg' bus='usb'/> <alias name='usb-disk6'/> </disk> block-backed usb device can be hotplug , move to verified. 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, 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://rhn.redhat.com/errata/RHSA-2015-0323.html |