def create_internal_disk(self):
"""Create a internal-image*.wic in the resultdir that runqemu can use."""
copyfile(os.path.join(self.image_dir, 'refkit-installer-image-%s.qemuboot.conf' % self.image_arch),
os.path.join(self.resultdir, 'internal-image-%s.qemuboot.conf' % self.image_arch))
for ovmf in glob('%s/ovmf*' % self.image_dir):
os.symlink(ovmf, os.path.join(self.resultdir, os.path.basename(ovmf)))
with open(os.path.join(self.resultdir, 'internal-image-%s.wic' % self.image_arch), 'w') as f:
# empty, sparse file of 8GB
os.truncate(f.fileno(), 8 * 1024 * 1024 * 1024)
评论列表
文章目录