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)
def snapshot_extract(self, target, out_format): images.convert_image(self.path, target, out_format)
def snapshot_extract(self, target, out_format): images.convert_image(self.path, target, out_format, run_as_root=True)