示例#1
0
 def create_lvm_image(base, size):
     base_size = disk.get_disk_size(base)
     self.verify_base_size(base, size, base_size=base_size)
     resize = size > base_size
     size = size if resize else base_size
     lvm.create_volume(self.vg, self.lv, size, sparse=self.sparse)
     if self.ephemeral_key_uuid is not None:
         encrypt_lvm_image()
     images.convert_image(base, self.path, 'raw', run_as_root=True)
     if resize:
         disk.resize2fs(self.path, run_as_root=True)
示例#2
0
 def create_lvm_image(base, size):
     base_size = disk.get_disk_size(base)
     self.verify_base_size(base, size, base_size=base_size)
     resize = size > base_size
     size = size if resize else base_size
     lvm.create_volume(self.vg, self.lv,
                                  size, sparse=self.sparse)
     if self.ephemeral_key_uuid is not None:
         encrypt_lvm_image()
     images.convert_image(base, self.path, 'raw', run_as_root=True)
     if resize:
         disk.resize2fs(self.path, run_as_root=True)
示例#3
0
 def snapshot_extract(self, target, out_format):
     images.convert_image(self.path, target, out_format)
示例#4
0
 def snapshot_extract(self, target, out_format):
     images.convert_image(self.path, target, out_format, run_as_root=True)
示例#5
0
 def snapshot_extract(self, target, out_format):
     images.convert_image(self.path, target, out_format)
示例#6
0
 def snapshot_extract(self, target, out_format):
     images.convert_image(self.path, target, out_format,
                          run_as_root=True)