Bug 921407
| Summary: | virsh update-device with option "--config" should not be affect before boot | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 6 | Reporter: | Xuesong Zhang <xuzhang> |
| Component: | libvirt | Assignee: | Peter Krempa <pkrempa> |
| Status: | CLOSED WONTFIX | QA Contact: | Virtualization Bugs <virt-bugs> |
| Severity: | medium | Docs Contact: | |
| Priority: | medium | ||
| Version: | 6.4 | CC: | acathrow, cevich, cwei, dyuan, jmiao, mzhan |
| Target Milestone: | rc | Keywords: | Upstream |
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | 921398 | Environment: | |
| Last Closed: | 2014-04-04 20:58:24 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: | 921398, 1049529, 1125194 | ||
| Bug Blocks: | |||
|
Description
Xuesong Zhang
2013-03-14 07:10:20 UTC
Fixed upstream with:
commit 69ce3ffa8d431e9810607c6e00b7cfcc481b491d
Author: Peter Krempa <pkrempa>
Date: Fri Mar 15 17:11:28 2013 +0100
virsh: Fix semantics of --config for "update-device" command
The man page states that with --config the next boot is affected. This
can be understood as if _only_ the next boot was affected. This isn't
true if the machine is running.
This patch adds the full --live, --config, --current infrastructure and
tweaks stuff to correctly support the obsolete --persistent flag.
Note that this patch changes the the behavior of the --config flag to match the
use of this flag in rest of libvirt. This flag was mistakenly renamed from
--persistent that originaly had different semantics.
and a few cleanup commits before.
v1.0.4-16-gb685a73
*** Bug 961443 has been marked as a duplicate of this bug. *** Development Management has reviewed and declined this request. You may appeal this decision by reopening this request. FYI: The --config is also not working well with attach-disk/detach-disk.
Package version:
libvirt-0.10.2-37.el6.x86_64
qemu-kvm-rhev-0.12.1.2-2.427.el6.x86_64
kernel-2.6.32-472.el6.x86_64
Steps:
1. Start a domain:
# virsh start demo
2. Create a image to attach
# qemu-img create foo.img 10M
3. Attach a virtio disk with --config
# virsh attach-disk demo /var/lib/libvirt/images/foo.img vdb --config
4. Check the dumpxml, the new disk is added to the dumpxml
# virsh dumpxml demo
......
<disk type='file' device='disk'>
<driver name='qemu' type='raw'/>
<source file='/var/lib/libvirt/images/foo.img'/>
<target dev='vdb' bus='virtio'/>
<alias name='virtio-disk1'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x08' function='0x0'/>
</disk>
......
5. Restart domain and then check domain's dumpxml, the disk is still in the dumpxml.
# virsh destroy demo
# virsh start demo
# virsh dumpxml demo
......
<disk type='file' device='disk'>
<driver name='qemu' type='raw'/>
<source file='/var/lib/libvirt/images/foo.img'/>
<target dev='vdb' bus='virtio'/>
<alias name='virtio-disk1'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x08' function='0x0'/>
</disk>
......
6. Dettach a virtio disk with --config
# virsh detach-disk demo vdb --config
7. Check the dumpxml, the disk is removed from the dumpxml, can't find the disk.
# virsh dumpxml demo
......
Actual results:
As step 4 and 7
Expected results:
As step 4 and 7, if use --config, the disk should be added/removed after guest restart.
Addtional info:
Do not meet this issue in the latest rhel7 env.
|