Bug 907289
Summary: | Error occurs when add a storage with vdi format from virt-manager | ||||||
---|---|---|---|---|---|---|---|
Product: | Red Hat Enterprise Linux 7 | Reporter: | tingting zheng <tzheng> | ||||
Component: | virt-manager | Assignee: | Martin Kletzander <mkletzan> | ||||
Status: | CLOSED CURRENTRELEASE | QA Contact: | Virtualization Bugs <virt-bugs> | ||||
Severity: | medium | Docs Contact: | |||||
Priority: | medium | ||||||
Version: | 7.0 | CC: | cwei, dallan, dyuan, lcui, mjenner, mkletzan, moez.roy, mzhan | ||||
Target Milestone: | rc | ||||||
Target Release: | --- | ||||||
Hardware: | Unspecified | ||||||
OS: | Unspecified | ||||||
Whiteboard: | |||||||
Fixed In Version: | virt-manager-0.10.0-3.el7 | Doc Type: | Bug Fix | ||||
Doc Text: | Story Points: | --- | |||||
Clone Of: | |||||||
: | 907530 (view as bug list) | Environment: | |||||
Last Closed: | 2014-06-13 11:02:36 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: | |||||||
Bug Blocks: | 907530 | ||||||
Attachments: |
|
Description
tingting zheng
2013-02-04 03:12:01 UTC
Patch proposed upstream: https://www.redhat.com/archives/virt-tools-list/2013-February/msg00020.html Moving to POST: commit 250aa88f0b52dcd664a09b065c4f0a991b69c77b Author: Martin Kletzander <mkletzan> Date: Mon Feb 4 17:02:03 2013 +0100 Add basic support for VDI images. Hi, I check the disk format on latest release: virt-manager-0.10.0-0.4.gitb68faac8.el7.noarch and I didn't find vdi format in the list. In patch "Add basic support for VDI images." I didn't find any code hints that vdi item is hidden. It's very appreciate that anyone could give me a hint on whether vdi is supported in virt-manager? That's would be very helpful for us. Hi,martin I noticed vdi format has been hidden from latest version of virt-manager,refer to comment 3,I think virt-manager provides support for vdi format,would you pls help to check this issue,thanks. OK, this needs to be dealt with in next build. Thank you for finding that out. Upstream fix is in v0.10.0-194-gf9a1c33: commit f9a1c33ce8bc8641de2190121356056c1faeafb1 Author: Martin Kletzander <mkletzan> Date: Wed Aug 7 15:08:50 2013 +0200 virt-manager: Fix self.config I tested with: virt-manager-0.10.0-2.el7.noarch libvirt-1.1.1-2.el7.x86_64 When add disk from virt-manager as format "vdi",the error is still there:"Storage parameter error.'vdi' is not a valid format." It seems there is something with libvirt: when I tried to add the blow part in xml,and start the guest,will occur error. <disk type='file' device='disk'> <driver name='qemu' type='vdi'/> <source file='/var/lib/libvirt/images/vdi.img'/> <target dev='hda' bus='ide'/> <address type='drive' controller='0' bus='0' target='0' unit='1'/> </disk> # virsh start rhel7-clone error: Failed to start domain rhel7-clone error: internal error: process exited while connecting to monitor: char device redirected to /dev/pts/2 (label charserial0) qemu-kvm: -drive file=/var/lib/libvirt/images/vdi.img,if=none,id=drive-ide0-0-1,format=vdi: 'vdi' invalid format I see bug 907530 has been verified,would you pls help to check related code from libvirt,thanks. This is non-related to virt-manager. virt-manager handles it properly. This is qemu's error, what's your qemu-kvm version? (In reply to Martin Kletzander from comment #11) > This is non-related to virt-manager. virt-manager handles it properly. > This is qemu's error, what's your qemu-kvm version? qemu-kvm version: qemu-kvm-1.5.2-3.el7.x86_64 I've tried: virt-manager-0.10.0-2.el7.noarch libvirt-1.0.3-1.el7.x86_64(The version which bug 907530 fixed) qemu-kvm-1.3.0-6.el7.x86_64 1.Edit xml of the guest to add vdi image,there is no error when try to boot guest. 2.From virt-manager,to add a storage with vdi format. 2.1,Select "Create a disk image on the computer's hard driver",then choose format as "vdi",error occurs:"'vdi' is not a valid format." debug info: 2013-08-19 22:25:57,602 (addhardware:610): Default storage path is: /var/lib/libvirt/images/demo-1.img 2013-08-19 22:25:57,634 (VirtualDisk:249): Path '/var/lib/libvirt/images' is target for pool 'default'. Creating volume 'demo-1.img'. 2013-08-19 22:25:57,640 (error:119): Validation Error: Storage parameter error. 'vdi' is not a valid format. Traceback (most recent call last): File "/usr/share/virt-manager/virtManager/addhardware.py", line 1290, in validate_page_storage format=fmt) File "/usr/share/virt-manager/virtinst/VirtualDisk.py", line 676, in __init__ self.__validate_params() File "/usr/share/virt-manager/virtinst/VirtualDisk.py", line 1273, in __validate_params self.__set_format() File "/usr/share/virt-manager/virtinst/VirtualDisk.py", line 1076, in __set_format self.vol_install.format = self.format File "/usr/share/virt-manager/virtinst/Storage.py", line 1170, in set_format raise ValueError(_("'%s' is not a valid format.") % val) ValueError: 'vdi' is not a valid format. 2.2,Create a vdi disk,from virt-manager,choose "Select managed or other existing storage",then choose the vdi disk,no error occurs and the guest can be booted. debug info: 2013-08-19 22:27:32,139 (storagebrowse:82): Showing storage browser 2013-08-19 22:27:37,764 (storagebrowse:88): Closing storage browser 2013-08-19 22:27:39,686 (addhardware:1157): Adding device: <disk type='file' device='disk'> <driver name='qemu' type='vdi' cache='none'/> <source file='/var/lib/libvirt/images/vdi.img'/> <target dev='hdb' bus='ide'/> </disk> 2013-08-19 22:27:39,714 (libvirtobject:145): Redefining 'demo' with XML diff: --- Original XML +++ New XML @@ -61,5 +61,10 @@ <memballoon model="virtio"> <address type="pci" domain="0x0000" bus="0x00" slot="0x06" function="0x0"/> </memballoon> + <disk type="file" device="disk"> + <driver name="qemu" type="vdi" cache="none"/> + <source file="/var/lib/libvirt/images/vdi.img"/> + <target dev="hdb" bus="ide"/> + </disk> </devices> </domain> I understand now. You were creating the volume, but creation of vdi is not supported (yet?). We are now able only to cover adding of the storage (using it in a guest), but not creating as underlying tools (libvirt, qemu-img) do not support it either. It should not be selectable, but this is the only format for which we would have to change the behaviour of the ComboBox in which the formats are selected. Moving back to ASSIGNED and looking at the issue now. (In reply to Martin Kletzander from comment #13) > I understand now. You were creating the volume, but creation of vdi is not > supported (yet?). We are now able only to cover adding of the storage > (using it in a guest), but not creating as underlying tools (libvirt, > qemu-img) do not support it either. It should not be selectable, but this > is the only format for which we would have to change the behaviour of the > ComboBox in which the formats are selected. Moving back to ASSIGNED and > looking at the issue now. I use qemu-img to create vdi disk. eg: qemu-img create -f vdi vdi.img 1G Formatting 'vdi.img', fmt=vdi size=1073741824 static=off # qemu-img info vdi.img image: vdi.img file format: vdi virtual size: 1.0G (1073741824 bytes) disk size: 8.0K cluster_size: 1048576 Refer to comment 10 and comment 12,I can use old version of qemu-kvm to identify vdi format while with latest qemu-kvm version,when add vdi disk in xml,boot guest failed as comment 10,is that a qemu-kvm bug or it just choose not to support it? I can't speak for qemu, but I guess it is worth spinning up a bug about the VDI support. (In reply to Martin Kletzander from comment #15) > I can't speak for qemu, but I guess it is worth spinning up a bug about the > VDI support. I've filed qemu-kvm bug 999288. As bug 999288 is not fixed,so I use older version of qemu-kvm,libvirt and latest virt-manager to test the bug. version: virt-manager-0.10.0-3.el7.noarch libvirt-1.0.3-1.el7.x86_64 qemu-kvm-1.3.0-6.el7.x86_64 Steps: 1.When add a storage from virt-manager,if choose "Create a disk image on the computer's hard driver",the format of vdi is hidden. 2.When add a storage from virt-manager,if choose "Select managed or other existing storage",vdi format is showed,and image with vdi format created by qemu-img can be added,guest can be booted successfully. Refer to the above comments,move the bug to VERIFIED. This request was resolved in Red Hat Enterprise Linux 7.0. Contact your manager or support representative in case you have further questions about the request. |