Bug 999288

Summary: Add VDI format support from qemu-kvm
Product: Red Hat Enterprise Linux 7 Reporter: tingting zheng <tzheng>
Component: qemu-kvmAssignee: Jeff Cody <jcody>
Status: CLOSED WONTFIX QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.0CC: acathrow, dyuan, hhuang, jcody, juzhang, lcui, moez.roy, mrezanin, sluo, tzheng, virt-maint
Target Milestone: rcKeywords: FutureFeature
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
: 1122366 (view as bug list) Environment:
Last Closed: 2014-09-02 13:05:41 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: 1122366    

Description tingting zheng 2013-08-21 05:48:18 UTC
Description of problem:
Add VDI format support from qemu-kvm

Version-Release number of selected component (if applicable):
qemu-kvm-1.5.2-3.el7.x86_64
libvirt-1.1.1-2.el7.x86_64

How reproducible:
100%

Steps to Reproduce:
1.Use qemu-img to create vdi disk.
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

2.Edit xml of guest test to add the below part:
    <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>

3.Boot the guest:
# virsh start test
error: Failed to start domain test
error: internal error: process exited while connecting to monitor: char device redirected to /dev/pts/3 (label charserial0)
qemu-kvm: -drive file=/var/lib/libvirt/images/vdi.img,if=none,id=drive-ide0-0-1,format=vdi: 'vdi' invalid format

Actual results:
Can not boot guest with vdi disk.

Expected results:
Can boot guest with vdi disk.

Additional info:
I tried old version of qemu-kvm,it supports vdi disk,also there is bug 907530 to provide vdi disk support from libvirt.
libvirt-1.0.3-1.el7.x86_64
qemu-kvm-1.3.0-6.el7.x86_64