virt-install --import broken when specifying a non-raw disk

Bug #655392 reported by Jamie Strandboge on 2010-10-05
16
This bug affects 2 people
Affects Status Importance Assigned to Milestone
virtinst (Debian)
Fix Released
Unknown
virtinst (Ubuntu)
Medium
Jamie Strandboge
Lucid
Medium
Jamie Strandboge
Maverick
Medium
Jamie Strandboge
Natty
Medium
Jamie Strandboge

Bug Description

Binary package hint: virtinst

1. libvirt 0.8.3 and later (and the upcoming libvirt update for lucid-security) does not probe qemu disks for the image format and defaults to 'raw' when the format is not specified in the XML. This breaks virt-install --import because the version in maverick does not allow for specifying a disk format and does not specify a format in the XML.

WORKAROUND:
After importing, use /usr/sbin/libvirt-migrate-qemu-disks

2. this is fixed upstream in 0.500.4, but not in Debian (or Natty)

3. patch fixes this bug by adding/honoring the 'format=' option when specifying a disk. It also updates the testsuite to work with Debian's patches for adjusting the path for Xen (unrelated to this bug, but useful for testing).

4a. TEST CASE (in maverick release):
$ virt-install --connect=qemu:///session --name test-import --ram=256 --disk path=<path to existing qemu non-raw image>.qcow2 --import
$ virt-viewer --connect=qemu:///session test-import # shows that disk cannot be found

4b. TEST CASE (after update to -proposed):
$ virt-install --connect=qemu:///session --name test-import --ram=256 --disk path=<path to existing qemu non-raw image>.qcow2,format=qcow2 --import
$ virt-viewer --connect=qemu:///session test-import # image starts fine

5. Risk of regression is considered low. Patch is not intrusive, adds a test to the test suite for this behavior, comes from upstream, passes the 'python setup.py test' and 'python setup.py test_cli' tests from the testsuite, and has been tested using QRT.

Changed in virtinst (Ubuntu Maverick):
assignee: nobody → Jamie Strandboge (jdstrand)
importance: Undecided → Medium
milestone: none → maverick-updates
status: New → In Progress
Changed in virtinst (Ubuntu Lucid):
assignee: nobody → Jamie Strandboge (jdstrand)
importance: Undecided → Medium
milestone: none → lucid-updates
status: New → In Progress
description: updated
Jamie Strandboge (jdstrand) wrote :

Uploaded 0.500.3-2ubuntu1.1 to maverick-proposed.

description: updated
tags: added: regression-release
Changed in virtinst (Ubuntu Maverick):
status: In Progress → Fix Committed
Changed in virtinst (Ubuntu):
milestone: maverick-updates → none
Jamie Strandboge (jdstrand) wrote :
Changed in virtinst (Ubuntu Natty):
status: In Progress → Triaged

Accepted virtinst into maverick-proposed, the package will build now and be available in a few hours. Please test and give feedback here. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

tags: added: verification-needed
Changed in virtinst (Debian):
status: Unknown → New
Jamie Strandboge (jdstrand) wrote :

Installed 0.500.3-2ubuntu1.1 from maverick-proposed and test case '4b' works fine. It also passes QRT:scripts/test-libvirt.py (which has a bunch of virtinst tests) and passes 'test' and 'test_cli' as described in QRT:notes_testing/virtinst/README.

Martin Pitt (pitti) on 2010-10-14
tags: added: verification-done
removed: verification-needed
Jamie Strandboge (jdstrand) wrote :

Uploaded 0.500.1-2ubuntu6.1 to security PPA for lucid for pending libvirt security update.

Changed in virtinst (Ubuntu Lucid):
status: In Progress → Fix Committed
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package virtinst - 0.500.3-2ubuntu1.1

---------------
virtinst (0.500.3-2ubuntu1.1) maverick-proposed; urgency=low

  * debian/patches/9002-libvirt_disk_format.patch: update to allow setting
    the driver type with --disk format= (LP: #655392)
  * debian/patches/9003-fix-path-to-hvmloader-in-testsuite.patch: adjust
    testsuite for 0001-fix-path-to-hvmloader.patch and
    0002-Fix-path-to-pygrub.patch
 -- Jamie Strandboge <email address hidden> Tue, 12 Oct 2010 13:19:55 -0500

Changed in virtinst (Ubuntu Maverick):
status: Fix Committed → Fix Released
Jamie Strandboge (jdstrand) wrote :

Pocket copied to natty to make sure that new updates to the package don't drop this patch.

Changed in virtinst (Ubuntu Maverick):
status: Fix Released → Fix Committed
Changed in virtinst (Ubuntu Natty):
status: Triaged → Fix Released
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package virtinst - 0.500.3-2ubuntu1.1

---------------
virtinst (0.500.3-2ubuntu1.1) maverick-proposed; urgency=low

  * debian/patches/9002-libvirt_disk_format.patch: update to allow setting
    the driver type with --disk format= (LP: #655392)
  * debian/patches/9003-fix-path-to-hvmloader-in-testsuite.patch: adjust
    testsuite for 0001-fix-path-to-hvmloader.patch and
    0002-Fix-path-to-pygrub.patch
 -- Jamie Strandboge <email address hidden> Tue, 12 Oct 2010 13:19:55 -0500

Changed in virtinst (Ubuntu Maverick):
status: Fix Committed → Fix Released
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package virtinst - 0.500.1-2ubuntu6.1

---------------
virtinst (0.500.1-2ubuntu6.1) lucid-security; urgency=low

  * debian/patches/9003-libvirt_disk_format.patch: update to allow setting
    the driver type with --disk format= (LP: #655392)
  * debian/patches/9004-fix-path-to-hvmloader-in-testsuite.patch: adjust
    testsuite for 0001-fix-path-to-hvmloader.patch and
    0002-Fix-path-to-pygrub.patch
 -- Jamie Strandboge <email address hidden> Tue, 12 Oct 2010 14:54:19 -0500

Changed in virtinst (Ubuntu Lucid):
status: Fix Committed → Fix Released
tags: added: testcase
Changed in virtinst (Debian):
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.