mirror of
https://github.com/kevingruesser/bootstrap-vz.git
synced 2025-08-24 15:36:27 +00:00
add raw image file creation
This commit is contained in:
parent
778ec8c270
commit
0854f7920e
2 changed files with 4 additions and 2 deletions
|
@ -7,7 +7,7 @@
|
||||||
},
|
},
|
||||||
|
|
||||||
"bootstrapper": {
|
"bootstrapper": {
|
||||||
"mount_dir": "/target",
|
"mount_dir": "/tmp/target",
|
||||||
"tarball": true,
|
"tarball": true,
|
||||||
"device": "/dev/sda"
|
"device": "/dev/sda"
|
||||||
},
|
},
|
||||||
|
|
|
@ -10,7 +10,9 @@ class FormatVolume(Task):
|
||||||
phase = phases.volume_preparation
|
phase = phases.volume_preparation
|
||||||
|
|
||||||
def run(self, info):
|
def run(self, info):
|
||||||
dev_path = info.manifest.bootstrapper['device']
|
mkmount = 'create -f raw "'+info.manifest.bootstrapper['mount_dir']+'" "'+str(info.manifest.volume['size'])+'"'
|
||||||
|
log_check_call(['/usr/bin/qemu-img',mkmount])
|
||||||
|
dev_path = info.manifest.bootstrapper['mount_dir']
|
||||||
mkfs = '/sbin/mkfs.{fs}'.format(fs=info.manifest.volume['filesystem'])
|
mkfs = '/sbin/mkfs.{fs}'.format(fs=info.manifest.volume['filesystem'])
|
||||||
log_check_call([mkfs, dev_path])
|
log_check_call([mkfs, dev_path])
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue