Bug 761300 - virt-manager: importing a vdi image should just work
Summary: virt-manager: importing a vdi image should just work
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: virt-manager
Version: 16
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Cole Robinson
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-12-08 00:39 UTC by Scott Tsai
Modified: 2013-04-17 00:19 UTC (History)
9 users (show)

Fixed In Version: virt-manager-0.9.1-2.fc15
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-02-17 23:53:33 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
libvirt VM XML file (1.67 KB, text/xml)
2011-12-08 00:39 UTC, Scott Tsai
no flags Details

Description Scott Tsai 2011-12-08 00:39:43 UTC
Created attachment 542303 [details]
libvirt VM XML file

Description of problem:
With the VirtualBox disk image distributed by the OpenRISC project, booting
through qemu-kvm from the CLI works but after importing into virt-manager,
booting fails with "unbootable disk"

Version-Release number of selected component (if applicable):
virt-manager-0.9.0-7.fc16.noarch
libvirt-0.9.6-2.fc16.x86_64
qemu-0.15.1-3.fc16.x86_64

How reproducible:
always

Steps to Reproduce:
1. Download and extract
ftp://ocuser:ocuser@openrisc.opencores.org/virtualbox-image/OpenRISC_Ubuntu_2011-11-28.vdi.bz2 (1.1 GB)
2. Using qemu-kvm directly works:
qemu-kvm -drive
file=OpenRISC_Ubuntu_2011-11-28.vdi,id=drive-virtio-disk0,if=virtio
3. Create new VM in virt-manager:
virt-manager -> New VM -> Import existing disk image -> specify .vdi path, specify OS type and version as Linux, Ubuntu 11.10 reflecting what's actually inside the image.
4. The VM fails to boot with:
Booting from Hard Disk...
"Boot failed: not a bootable disk"

Additional info:
libvirt VM XML file attached.

Using ps(1), I see that virt-manager is launching qemu-kvm with:

/usr/bin/qemu-kvm -S -M pc-0.14 -enable-kvm -m 512 -smp
1,sockets=1,cores=1,threads=1 -name openrisc-ubuntu-11.10 -uuid
537a8538-c6f6-ad88-0c7b-5be4df8bdbec -nodefconfig -nodefaults -chardev
socket,id=charmonitor,path=/var/lib/libvirt/qemu/openrisc-ubuntu-11.10.monitor,server,nowait
-mon chardev=charmonitor,id=monitor,mode=control -rtc base=utc -drive
file=/home/scottt/work/openrisc/OpenRISC_Ubuntu_2011-11-28.vdi,if=none,id=drive-virtio-disk0,format=raw
-device
virtio-blk-pci,bus=pci.0,addr=0x5,drive=drive-virtio-disk0,id=virtio-disk0,bootindex=1
-netdev tap,fd=24,id=hostnet0 -device
virtio-net-pci,netdev=hostnet0,id=net0,mac=52:54:00:3d:f3:13,bus=pci.0,addr=0x3
-chardev pty,id=charserial0 -device isa-serial,chardev=charserial0,id=serial0
-usb -device usb-tablet,id=input0 -vnc 127.0.0.1:0 -vga cirrus -device
intel-hda,id=sound0,bus=pci.0,addr=0x4 -device
hda-duplex,id=sound0-codec0,bus=sound0.0,cad=0 -device
virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x6

Comment 1 Daniel Berrangé 2011-12-08 09:08:13 UTC
> file=/home/scottt/work/openrisc/OpenRISC_Ubuntu_2011-11-28.vdi,if=none,id=drive-virtio-disk0,format=raw

This bit is telling QEMU that the .vdi file is a raw image. I'm guessing from the file extension that it is in fact *NOT* a raw image, in which case you'd need to tell virt-manager what the format is.

Comment 2 Scott Tsai 2011-12-08 10:44:50 UTC
(In reply to comment #1)
> you'd need to tell virt-manager what the format is.

I have two problems with this:
1. When creating a new VM from an existing disk image, virt-manager either should have either detected the disk format as correctly as "vdi" or allowed me to specify the format.
2. In the virt-manager GUI, the "Disk" -> "Advanced options" -> "Storage format" drop down doesn't offer the "vdi" format. (It offers "raw", "qcow2", "vmdk")

I think creating VM's from existing VirtualBox disk images is worth supporting well because:
1. Upstream projects, like OpenRISC, distributes their Linux software in VM images partially to provide a ready for use configuration but also to side step the hardware compatibility issues of running Linux on real hardware.
2. VirtualBox being freely downloadable for all the major desktop OSes makes it a popular choice.

Comment 3 Cole Robinson 2012-02-07 22:15:45 UTC
That first issue of detecting the image format is a bit complex. There are plans to fix virt-manager to do this, but it's being tracked elsewhere:

https://bugzilla.redhat.com/show_bug.cgi?id=557107

VDI not being in the default format list is now fixed upstream:

http://git.fedorahosted.org/git?p=virt-manager.git;a=commit;h=265e04205e4766f459d4ced516dbd784cf2ca57f

But you can also manually enter 'vdi' in the combo box entry there and it should work in the interim.

Comment 4 Fedora Update System 2012-02-14 00:31:59 UTC
virt-manager-0.9.1-2.fc16 has been submitted as an update for Fedora 16.
https://admin.fedoraproject.org/updates/virt-manager-0.9.1-2.fc16

Comment 5 Fedora Update System 2012-02-14 00:42:47 UTC
virt-manager-0.9.1-2.fc15 has been submitted as an update for Fedora 15.
https://admin.fedoraproject.org/updates/virt-manager-0.9.1-2.fc15

Comment 6 Fedora Update System 2012-02-15 11:29:08 UTC
Package virt-manager-0.9.1-2.fc16:
* should fix your issue,
* was pushed to the Fedora 16 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing virt-manager-0.9.1-2.fc16'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2012-1671/virt-manager-0.9.1-2.fc16
then log in and leave karma (feedback).

Comment 7 Fedora Update System 2012-02-17 23:53:33 UTC
virt-manager-0.9.1-2.fc16 has been pushed to the Fedora 16 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 8 Fedora Update System 2012-02-23 02:26:43 UTC
virt-manager-0.9.1-2.fc15 has been pushed to the Fedora 15 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 9 Orca Lonsdale 2012-04-06 16:41:51 UTC
There is still a problem.
If I try to create a new VM from a .vdi image with 'customize configuration before install' checked, I can choose for Disk 1 under 'advanced options' for the vdi storage format.
Then 'Begin Installation', which ends in the following error:
Unable to complete install: 'internal error unknown disk format 'vdi' for /var/lib/libvirt/LedgerSMB-1.3/LedgerSMB-1.3.vdi'

Traceback (most recent call last):
  File "/usr/share/virt-manager/virtManager/asyncjob.py", line 45, in cb_wrapper
    callback(asyncjob, *args, **kwargs)
  File "/usr/share/virt-manager/virtManager/create.py", line 1911, in do_install
    guest.start_install(False, meter=meter)
  File "/usr/lib/python2.7/site-packages/virtinst/Guest.py", line 1239, in start_install
    noboot)
  File "/usr/lib/python2.7/site-packages/virtinst/Guest.py", line 1307, in _create_guest
    dom = self.conn.createLinux(start_xml or final_xml, 0)
  File "/usr/lib64/python2.7/site-packages/libvirt.py", line 2077, in createLinux
    if ret is None:raise libvirtError('virDomainCreateLinux() failed', conn=self)
libvirtError: internal error unknown disk format 'vdi' for /var/lib/libvirt/LedgerSMB-1.3/LedgerSMB-1.3.vdi

If I try to setup the VM without the vdi storage format chosen (no 'customize configuration before install' checked), after creation the VM starts, but fails to mount its root partition.

Fedora 16
virt-manager-0.9.1-2.fc16.noarch
libvirt-0.9.6-5.fc16.x86_64
qemu-kvm-0.15.1


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