diff --git a/manifests/one-raw-virtio.manifest.json b/manifests/one-raw-virtio.manifest.json index 96d5003..999e8a1 100644 --- a/manifests/one-raw-virtio.manifest.json +++ b/manifests/one-raw-virtio.manifest.json @@ -7,7 +7,7 @@ }, "bootstrapper": { - "mount_dir": "/target", + "mount_dir": "/tmp/target", "tarball": true, "device": "/dev/sda" }, diff --git a/providers/one/tasks/filesystem.py b/providers/one/tasks/filesystem.py index 50481f4..30a8c36 100644 --- a/providers/one/tasks/filesystem.py +++ b/providers/one/tasks/filesystem.py @@ -10,7 +10,9 @@ class FormatVolume(Task): phase = phases.volume_preparation 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']) log_check_call([mkfs, dev_path])