Bug 472600
Summary: | virt-manager doesn't update the inactive guest config | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 5 | Reporter: | Odd Waller <odd.waller> |
Component: | virt-manager | Assignee: | Cole Robinson <crobinso> |
Status: | CLOSED ERRATA | QA Contact: | Virtualization Bugs <virt-bugs> |
Severity: | high | Docs Contact: | |
Priority: | medium | ||
Version: | 5.2 | CC: | adingman, crobinso, cward, llim, odd.waller, pmorgan, sputhenp, tao, xen-maint, yxie |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2009-09-02 09:42:29 UTC | Type: | --- |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Odd Waller
2008-11-21 22:30:01 UTC
Some additional information. From the redhat support team who has escalated it to developers/ engineering. the same thing happens if a network card is attached instead of block device. 1- If block devices are attached to a guest during anaconda installation, it removes "bootloader" line and adds kernel, ramdisk and extra parameters which leaves the system not bootable after the installation is finished. 2- If block devices are attached to a running guest, it adds kernel, ramdisk and extra parameters to the guest config file which is undesirable, but wouldn't leave the system not bootable. 3 - If block devices are attached to a guest offline - after it was shutdown - everything works as expected. This is a virt-manager issue, though I don't really know how to go about fixing it. When you install a VM, there are two configs at play: the 'install' cfg which sets the boot device to the install media (among other things), and the 'post-install' cfg, which sets the boot device to the primary harddisk. What we do is boot the 'install' config, then immediately define the 'post-install' config: at the libvirt level, this means that after the VM shuts down, the post-install config takes effect. However, when you query the installing VM before it's first shutdown, libvirt will return the 'install' config (since that is what's currently running). So when you add a device to the VM running with it's 'install' config, we splice in the new device xml, and redefine with the altered 'install' config, overwriting the 'post-install' config. This will leave the kernel values in your VM desc on VM restart, which won't work since we delete the install kernel after installation is complete. So, solutions are either: 1) Deliberately disable adding devices to the VM xml if it is installing (well, hotplug should be okay). 2) Query VM's persistent config rather than running config ( There are flags for this in libvirt, though I have no idea how consistently they are implemented) Okay, I'll make sure this gets fixed for 5.4. Okay, this is fixed upstream: http://hg.et.redhat.com/cgi-bin/hg-virt.cgi/applications/virt-manager--devel/rev/e7c4c4964340 Device adding is still allowed, we just explictly update the 'inactive' guest config, which should fix this issue. Should be fixed in virt-manager-0.6.1-1.el5. Setting to MODIFIED. ~~ Attention - RHEL 5.4 Beta Released! ~~ RHEL 5.4 Beta has been released! There should be a fix present in the Beta release that addresses this particular request. Please test and report back results here, at your earliest convenience. RHEL 5.4 General Availability release is just around the corner! If you encounter any issues while testing Beta, please describe the issues you have encountered and set the bug into NEED_INFO. If you encounter new issues, please clone this bug to open a new issue and request it be reviewed for inclusion in RHEL 5.4 or a later update, if it is not of urgent severity. Please do not flip the bug status to VERIFIED. Only post your verification results, and if available, update Verified field with the appropriate value. Questions can be posted to this bug or your customer or partner representative. Here is my testing result of virt-manager-0.6.1-6.el5 Steps: 1, start a xen host and create a new fv vm 2, copy /etc/xen/guest-config-file to save1/save2/save3/save4/save5 at time of 1) once the guest creation successfully (save1) 2) add a new storage which before package installation (save2) 3) add some other hardware (save3) 4) the guest before installation finish. (save4) 5) after the installation finish. (save5) Results: Only the first added hardware can add successful, the same as the described #8 1) # cat save1 name = "testins" uuid = "96ada410-05f0-5af7-ce0b-722a281ca74d" maxmem = 512 memory = 512 vcpus = 1 builder = "hvm" kernel = "/usr/lib/xen/boot/hvmloader" boot = "c" pae = 1 acpi = 1 apic = 1 localtime = 0 on_poweroff = "destroy" on_reboot = "restart" on_crash = "restart" device_model = "/usr/lib/xen/bin/qemu-dm" sdl = 0 vnc = 1 vncunused = 1 keymap = "en-us" disk = [ "file:/var/lib/xen/images/testins.img,hda,w", ",hdc:cdrom,r" ] vif = [ "mac=00:16:36:24:41:b0,bridge=xenbr0,script=vif-bridge" ] parallel = "none" serial = "pty" 2)#diff save1 save2 (None output) 3) #diff save2 save3 13c12 < boot = "c" --- > boot = "d" 19,20c18,19 < on_reboot = "restart" < on_crash = "restart" --- > on_reboot = "destroy" > on_crash = "destroy" 26,27c25,26 < disk = [ "file:/var/lib/xen/images/testins.img,hda,w", ",hdc:cdrom,r" ] < vif = [ "mac=00:16:36:24:41:b0,bridge=xenbr0,script=vif-bridge" ] --- > disk = [ "file:/var/lib/xen/images/testins.img,hda,w", "file:/root/Desktop/test-add.img,hdb,w", "file:/root/Desktop/RHEL5.3-Server-20090106.0-i386-DVD.iso,hdc:cdrom,r" ] > vif = [ "mac=00:16:36:24:41:b0,bridge=xenbr0,script=vif-bridge,vifname=vif7.0" ] 29a29,30 > soundhw = "es1370" 4) #diff save3 save4 (None output) 5) #diff save4 save5 (None output) My testing environment: virt-manager-0.6.1-6.el5 libvirt-cim-0.5.5-2.el5 libvirt-devel-0.6.3-14.el5 libvirt-python-0.6.3-14.el5 libvirt-0.6.3-14.el5 xen-3.0.3-88.el5 xen-devel-3.0.3-88.el5 xen-libs-3.0.3-88.el5 kernel-xen-devel-2.6.18-156.el5 xen-libs-3.0.3-88.el5 kmod-gnbd-xen-0.1.5-2.el5 kmod-gfs-xen-0.1.33-2.el5 kernel-xen-2.6.18-156.el5 Mark, i'm not aware of this issue but i would like to clarify; are you reporting that this issue is or is not resolved in the latest package builds? (In reply to comment #13) > Mark, i'm not aware of this issue but i would like to clarify; are you > reporting that this issue is or is not resolved in the latest package builds? Chris, sorry for that, this bug have been fixed :) An advisory has been issued which should help the problem described in this bug report. This report is therefore being closed with a resolution of ERRATA. For more information on therefore solution and/or where to find the updated files, please follow the link below. You may reopen this bug report if the solution does not work for you. http://rhn.redhat.com/errata/RHBA-2009-1285.html |