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 907530 - 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: libvirt
Version: 7.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: rc
: ---
Assignee: Martin Kletzander
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On: 907289
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-02-04 16:10 UTC by Martin Kletzander
Modified: 2014-06-18 00:44 UTC (History)
15 users (show)

Fixed In Version: libvirt-1.0.3-1.el7
Doc Type: Bug Fix
Doc Text:
Clone Of: 907289
Environment:
Last Closed: 2014-06-13 12:50:26 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Martin Kletzander 2013-02-04 16:10:35 UTC
+++ This bug was initially created as a clone of Bug #907289 +++

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 22:52:14 UTC
Moving to POST:

commit 027bf2ea373392027af3b29b1f644a8342961671
Author: Martin Kletzander <mkletzan>
Date:   Mon Feb 4 20:18:22 2013 +0100

    Add basic support for VDI images

Comment 3 Huang Wenlong 2013-03-06 08:44:06 UTC
Verify this bug with:
libvirt-1.0.3-1.el7.x86_64


1) create a vdi images 
qemu-img create -f vdi /tmp/vdi.img 1G 

2) add vdi image to domain 

3) then start domain  

4)check xml 

...
  <disk type='file' device='disk'>
      <driver name='qemu' type='vdi'/>
      <source file='/tmp/vdi.img'/>
      <target dev='hda' bus='ide'/>
      <alias name='ide0-0-0'/>
      <address type='drive' controller='0' bus='0' target='0' unit='0'/>
    </disk>
...

libvirt can support vdi format .

Comment 4 EricLee 2014-02-20 02:30:36 UTC
Re-tested this bug with:
libvirt-1.1.1-23.el7.x86_64
qemu-kvm-rhev-1.5.3-48.el7.x86_64

1) create a vdi images 
# qemu-img create -f vdi /var/lib/libvirt/images/vdi.img 1G
Formatting '/var/lib/libvirt/images/vdi.img', fmt=vdi size=1073741824 static=off

# qemu-img info /var/lib/libvirt/images/vdi.img 
image: /var/lib/libvirt/images/vdi.img
file format: vdi
virtual size: 1.0G (1073741824 bytes)
disk size: 8.0K
cluster_size: 1048576

2) add vdi image to domain 
...
    <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'/>
      <address type='drive' controller='0' bus='0' target='0' unit='1'/>
    </disk>
...

3) then start domain  
# virsh start vm2
error: Failed to start domain vm2
error: internal error: process exited while connecting to monitor: qemu-kvm: -drive file=/tmp/vdi.img,if=none,id=drive-ide0-0-0,format=vdi: 'vdi' invalid format

I found qemu can not start with the cli too. Is there something changed in qemu?

# /usr/libexec/qemu-kvm -name vm2 -S -machine pc-i440fx-rhel7.0.0,accel=kvm,usb=off -m 128 -realtime mlock=off -smp 1,sockets=1,cores=1,threads=1 -uuid cec80b76-a872-436b-9f12-74b940d28ff6 -nographic -no-user-config -nodefaults -chardev socket,id=charmonitor,path=/var/lib/libvirt/qemu/vm2.monitor,server,nowait -mon chardev=charmonitor,id=monitor,mode=control -rtc base=utc -no-shutdown -no-acpi -boot strict=on -device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 -drive file=/tmp/vdi.img,if=none,id=drive-ide0-0-0,format=vdi -device ide-hd,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0,bootindex=1 -drive file=/var/lib/libvirt/images/vdi1.img,if=none,id=drive-ide0-0-1,format=vdi,cache=none -device ide-hd,bus=ide.0,unit=1,drive=drive-ide0-0-1,id=ide0-0-1 -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x4

qemu-kvm: -drive file=/tmp/vdi.img,if=none,id=drive-ide0-0-0,format=vdi: 'vdi' invalid format

Comment 5 EricLee 2014-02-20 02:34:09 UTC
(In reply to EricLee from comment #4)
> Re-tested this bug with:
> libvirt-1.1.1-23.el7.x86_64
> qemu-kvm-rhev-1.5.3-48.el7.x86_64
> 
> 1) create a vdi images 
> # qemu-img create -f vdi /var/lib/libvirt/images/vdi.img 1G
> Formatting '/var/lib/libvirt/images/vdi.img', fmt=vdi size=1073741824
> static=off
> 
> # qemu-img info /var/lib/libvirt/images/vdi.img 
> image: /var/lib/libvirt/images/vdi.img
> file format: vdi
> virtual size: 1.0G (1073741824 bytes)
> disk size: 8.0K
> cluster_size: 1048576
> 
> 2) add vdi image to domain 
> ...
>     <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'/>
>       <address type='drive' controller='0' bus='0' target='0' unit='1'/>
>     </disk>
> ...
> 
> 3) then start domain  
> # virsh start vm2
> error: Failed to start domain vm2
> error: internal error: process exited while connecting to monitor: qemu-kvm:
> -drive file=/tmp/vdi.img,if=none,id=drive-ide0-0-0,format=vdi: 'vdi' invalid
> format
> 
> I found qemu can not start with the cli too. Is there something changed in
> qemu?
> 
> # /usr/libexec/qemu-kvm -name vm2 -S -machine
> pc-i440fx-rhel7.0.0,accel=kvm,usb=off -m 128 -realtime mlock=off -smp
> 1,sockets=1,cores=1,threads=1 -uuid cec80b76-a872-436b-9f12-74b940d28ff6
> -nographic -no-user-config -nodefaults -chardev
> socket,id=charmonitor,path=/var/lib/libvirt/qemu/vm2.monitor,server,nowait
> -mon chardev=charmonitor,id=monitor,mode=control -rtc base=utc -no-shutdown
> -no-acpi -boot strict=on -device
> piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 -drive
> file=/tmp/vdi.img,if=none,id=drive-ide0-0-0,format=vdi -device
> ide-hd,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0,bootindex=1 -drive
> file=/var/lib/libvirt/images/vdi1.img,if=none,id=drive-ide0-0-1,format=vdi,
> cache=none -device ide-hd,bus=ide.0,unit=1,drive=drive-ide0-0-1,id=ide0-0-1
> -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x4
> 
> qemu-kvm: -drive file=/tmp/vdi.img,if=none,id=drive-ide0-0-0,format=vdi:
> 'vdi' invalid format

Sorry, correct the qemu cli:
# /usr/libexec/qemu-kvm -name vm2 -S -machine pc-i440fx-rhel7.0.0,accel=kvm,usb=off -m 128 -realtime mlock=off -smp 1,sockets=1,cores=1,threads=1 -uuid cec80b76-a872-436b-9f12-74b940d28ff6 -nographic -no-user-config -nodefaults -chardev socket,id=charmonitor,path=/var/lib/libvirt/qemu/vm2.monitor,server,nowait -mon chardev=charmonitor,id=monitor,mode=control -rtc base=utc -no-shutdown -no-acpi -boot strict=on -device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 -drive file=/var/lib/libvirt/images/vdi.img,if=none,id=drive-ide0-0-1,format=vdi,cache=none -device ide-hd,bus=ide.0,unit=1,drive=drive-ide0-0-1,id=ide0-0-1,bootindex=1 -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x4
qemu-kvm: -drive file=/var/lib/libvirt/images/vdi.img,if=none,id=drive-ide0-0-1,format=vdi,cache=none: 'vdi' invalid format

Comment 9 Fam Zheng 2014-02-24 07:25:58 UTC
Hi Junyi,

VDI is only recognized in qemu-img, so we should be able to convert to/from this format. (not quite sure about how much we support it, though)

However it's not whitelisted for qemu-kvm, so attaching to a VM is not possible or supported.

Thanks,
Fam

Comment 10 juzhang 2014-02-24 07:32:34 UTC
(In reply to Fam Zheng from comment #9)
> Hi Junyi,
> 
> VDI is only recognized in qemu-img, so we should be able to convert to/from
> this format. (not quite sure about how much we support it, though)
> 
> However it's not whitelisted for qemu-kvm, so attaching to a VM is not
> possible or supported.
> 
> Thanks,
> Fam

Thanks Fam.

Best Regards,
Junyi

Comment 11 EricLee 2014-02-24 07:56:16 UTC
(In reply to Huang Wenlong from comment #3)
> Verify this bug with:
> libvirt-1.0.3-1.el7.x86_64
> 
> 
> 1) create a vdi images 
> qemu-img create -f vdi /tmp/vdi.img 1G 
> 
> 2) add vdi image to domain 
> 
> 3) then start domain  
> 
> 4)check xml 
> 
> ...
>   <disk type='file' device='disk'>
>       <driver name='qemu' type='vdi'/>
>       <source file='/tmp/vdi.img'/>
>       <target dev='hda' bus='ide'/>
>       <alias name='ide0-0-0'/>
>       <address type='drive' controller='0' bus='0' target='0' unit='0'/>
>     </disk>
> ...
> 
> libvirt can support vdi format .

As comment #10 said that vdi format is not whitelisted for qemu-kvm, so attaching to a VM is not possible or supporte, so the verified steps were only valid on the old version of qemu: qemu-kvm-1.3.0-6.el7.x86_64, another bug is tracking boot guest failed problem: bug 999288.

Comment 12 Ludek Smid 2014-06-13 12:50:26 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.