Backlog #1969

Allow formatting a partition inside qcow2 image

Added by Jean-Philippe Garcia Ballester over 6 years ago. Updated over 6 years ago.

Status:ClosedStart date:04/26/2013
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:Drivers - Storage
Target version:-

Description

When creating a datablock, it would be very useful if it was possible to format a partition with e.g. ext3 inside a qcow2 file.

I am not sure how it could be implemented. The sunstone interface has a DRIVER field, for which the help reads “KVM: raw, qcow2”, so I figured that using ext3 as filesystem type and qcow2 as driver should make a qcow2 file with an ext3 partition inside.

The attached patch adds this feature, but I'm not sure it's the way to go. Note that the ext3 partition is created on a raw file, which is then converted to qcow2. Creating a qcow2 file before formatting to ext3 is tricky because it would mean using qemu-nbd which requires an available nbd file, and root privileges.

0013-Convert-image-to-qcow2-format-if-DRIVER-is-qcow2.patch Magnifier (2.35 KB) Jean-Philippe Garcia Ballester, 04/26/2013 08:30 AM

History

#1 Updated by Ruben S. Montero over 6 years ago

  • Tracker changed from Feature to Request
  • Category changed from Drivers - Auth to Drivers - Storage

#2 Updated by Ruben S. Montero over 6 years ago

  • Tracker changed from Request to Backlog

#3 Updated by Ruben S. Montero over 6 years ago

  • Status changed from New to Pending

#4 Updated by Ruben S. Montero over 6 years ago

  • Status changed from Pending to Closed

This would also be tricky for other hypervisors like VMware. In that case we also create an unformatted disk, that is then formatted by the guest. This is the standard approach.

This way we think that is more consistent to keep qcow2 and vmfs as unformatted.

THANKS for your contribution!!!!!

Also available in: Atom PDF