Bug 655025 - vdi image type for qemu disk driver
Summary: vdi image type for qemu disk driver
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Virtualization Tools
Classification: Community
Component: libvirt
Version: unspecified
Hardware: x86_64
OS: Linux
low
medium
Target Milestone: ---
Assignee: Martin Kletzander
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-11-19 11:45 UTC by Benjamin Hagemann
Modified: 2013-04-17 06:44 UTC (History)
6 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2013-04-17 06:44:55 UTC
Embargoed:


Attachments (Terms of Use)
adds the vdi file type support (1.30 KB, patch)
2012-09-16 02:21 UTC, Pete Beardmore
no flags Details | Diff

Description Benjamin Hagemann 2010-11-19 11:45:32 UTC
I want to use a .vdi image with libvirt / KVM and qemu, but do not find the right driver type for qemu.

I use libvirt (0.7.5-5ubuntu27.7) with KVM / qemu (0.12.3+noroms-0ubuntu9.2) - Ubuntu 10.04.1 LTS

After an update a new libvirt version come with a new option:

<driver name='qemu' type='vdi'/>

-----
  <devices>                                                                     
    <emulator>/usr/bin/kvm</emulator>                                           
    <disk type='file' device='disk'>                                            
                                                                                
      <driver name='qemu' type='vdi'/>                                          
                                                                                
      <source file='/path/image.vdi'/>                                          
      <target dev='hda' bus='ide'/>                                             
    </disk>                                                                     
-----
              
But when I try "type=vdi" I got in the Log-File:                                
                                                                                
  libvir: Security Labeling error : error calling aa_change_profile()           
                                                                                
so I checked:                                                                   
                                                                                
  cat vdi-machine.xml | /usr/lib/libvirt/virt-aa-helper -r --uuid               
libvirt-XXXXXXXX-XXXXX-XXXX-XXXX-XXXXXXXXXXXX --dryrun -p 0                     
  libvir: Domain Config error : internal error unknown disk format 'vdi'        
for image.vdi                                                                   
  virt-aa-helper: error: invalid VM definition                                  
                                                                                
Next I checked libvirt.org:                                                     
http://libvirt.org/storage.html                                                 
                                                                                
  Valid volume format types                                                     
  raw, bochs, cloop, cow, dmg, iso, qcow, qcow2, vmdk, vpc                      
                                                                                
=> But what is the right type for .vdi-Images?

Comment 1 Pete Beardmore 2012-09-16 02:21:45 UTC
Created attachment 613369 [details]
adds the vdi file type support


it works.

studying details of the vdi structure on the likes of https://forums.virtualbox.org/viewtopic.php?t=8046 would lead to a less trivial solution to the rather sparse struct that i created, but alas, life is short

cheers

Comment 2 Dave Allan 2012-09-17 13:17:22 UTC
(In reply to comment #1)
> Created attachment 613369 [details]
> adds the vdi file type support

Pete, many thanks for the patch.  Would you mind sending it to the mailing list?  That's the fastest way to get it ack'd.  Dave

Comment 3 Mattia Verga 2012-12-09 11:53:07 UTC
Any news on that patch?
In Virtual Machine Manager 0.9.4 and libvirt 0.10.2.1-4.fc18.x86_64 I'm able to choose "vdi" type, but the VM fails to start.
Please, either enable vdi support or remove that type from the list to not generate confusion to users.

Comment 4 Moez Roy 2013-04-16 23:57:20 UTC
(In reply to comment #2)
> (In reply to comment #1)
> > Created attachment 613369 [details]
> > adds the vdi file type support
> 
> Pete, many thanks for the patch.  Would you mind sending it to the mailing
> list?  That's the fastest way to get it ack'd.  Dave

Was it sent to the mailing list???

Comment 5 Martin Kletzander 2013-04-17 06:44:55 UTC
It looks like the patch never made it to the list, but I added the support for VDI in commit v1.0.2-40-g027bf2e:

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

    Add basic support for VDI images

And size probing was fixed in commit v1.0.3-67-g6e46477:

commit 6e46477c23bfed730689fb902ff33c8ca7413ef0
Author: Ján Tomko <jtomko>
Date:   Thu Mar 14 13:24:03 2013 +0100

    Fix size probing for VDI images


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