Enforce raw img format in libguestfs
authorNikos Skalkotos <skalkoto@grnet.gr>
Wed, 6 Mar 2013 11:03:01 +0000 (13:03 +0200)
committerNikos Skalkotos <skalkoto@grnet.gr>
Wed, 6 Mar 2013 11:03:01 +0000 (13:03 +0200)
Don't let libguestfs guess the format of the provided image. Enforce
it to treat the image as raw.

image_creator/disk.py

index e0ee867..a51611e 100644 (file)
@@ -210,7 +210,7 @@ class DiskDevice(object):
         self.size = 0
 
         self.g = guestfs.GuestFS()
         self.size = 0
 
         self.g = guestfs.GuestFS()
-        self.g.add_drive_opts(self.real_device, readonly=0)
+        self.g.add_drive_opts(self.real_device, readonly=0, format="raw")
 
         # Before version 1.17.14 the recovery process, which is a fork of the
         # original process that called libguestfs, did not close its inherited
 
         # Before version 1.17.14 the recovery process, which is a fork of the
         # original process that called libguestfs, did not close its inherited