RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 907289 - Error occurs when add a storage with vdi format from virt-manager
Summary: Error occurs when add a storage with vdi format from virt-manager
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: virt-manager
Version: 7.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: rc
: ---
Assignee: Martin Kletzander
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks: 907530
TreeView+ depends on / blocked
 
Reported: 2013-02-04 03:12 UTC by tingting zheng
Modified: 2014-06-17 23:58 UTC (History)
8 users (show)

Fixed In Version: virt-manager-0.10.0-3.el7
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 907530 (view as bug list)
Environment:
Last Closed: 2014-06-13 11:02:36 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Debug info from virt-manager (6.69 KB, text/plain)
2013-02-04 03:12 UTC, tingting zheng
no flags Details

Description tingting zheng 2013-02-04 03:12:01 UTC
Created attachment 692589 [details]
Debug info from virt-manager

Description of problem:
Error occurs when add a storage with vdi format from virt-manager

Version-Release number of selected component (if applicable):
virt-manager-0.9.4-4.el7.noarch
libvirt-1.0.0-1.el7.x86_64

How reproducible:
100%

Steps to Reproduce:
1. create new guest via virt-manager
2. during installation ,select "Customize configuration before install"
3. Add a new storage,set storage format as vdi,error occurs:Storage parameter error.'vdi' is not a valid format.
 
Actual results:
Error occurs when add a storage with vdi format from virt-manager on rhel7.
If virt-manager doesn't support vdi format,it should hide the format type vdi.

Expected results:
No error occurs when add a storage with vdi format from virt-manager and can be added successfully.

Additional info:
1.Attached the debug info from virt-manager.
2.Checked the issues on upstream,it also exists,and there is a bug 761300.

Comment 2 Martin Kletzander 2013-02-04 17:30:06 UTC
Patch proposed upstream:

https://www.redhat.com/archives/virt-tools-list/2013-February/msg00020.html

Comment 3 Martin Kletzander 2013-02-07 13:56:42 UTC
Moving to POST:

commit 250aa88f0b52dcd664a09b065c4f0a991b69c77b
Author: Martin Kletzander <mkletzan>
Date:   Mon Feb 4 17:02:03 2013 +0100

    Add basic support for VDI images.

Comment 4 hyao@redhat.com 2013-06-04 06:41:32 UTC
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.

Comment 5 tingting zheng 2013-07-09 05:24:24 UTC
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.

Comment 6 Martin Kletzander 2013-08-07 12:58:15 UTC
OK, this needs to be dealt with in next build.  Thank you for finding that out.

Comment 7 Martin Kletzander 2013-08-08 09:58:21 UTC
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

Comment 10 tingting zheng 2013-08-15 09:23:57 UTC
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.

Comment 11 Martin Kletzander 2013-08-19 10:59:50 UTC
This is non-related to virt-manager.  virt-manager handles it properly.  This is qemu's error, what's your qemu-kvm version?

Comment 12 tingting zheng 2013-08-20 02:30:50 UTC
(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>

Comment 13 Martin Kletzander 2013-08-20 05:42:26 UTC
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.

Comment 14 tingting zheng 2013-08-20 05:53:58 UTC
(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?

Comment 15 Martin Kletzander 2013-08-20 07:53:04 UTC
I can't speak for qemu, but I guess it is worth spinning up a bug about the VDI support.

Comment 16 tingting zheng 2013-08-21 05:49:33 UTC
(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.

Comment 19 tingting zheng 2013-09-04 09:01:07 UTC
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.

Comment 20 Ludek Smid 2014-06-13 11:02:36 UTC
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.


Note You need to log in before you can comment on or make changes to this bug.