diff options
Diffstat (limited to 'global')
-rw-r--r-- | global/overlay/etc/puppet/modules/sunet/templates/cloudimage/mk_cloud_image.erb | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/global/overlay/etc/puppet/modules/sunet/templates/cloudimage/mk_cloud_image.erb b/global/overlay/etc/puppet/modules/sunet/templates/cloudimage/mk_cloud_image.erb index 6e25162..d1034be 100644 --- a/global/overlay/etc/puppet/modules/sunet/templates/cloudimage/mk_cloud_image.erb +++ b/global/overlay/etc/puppet/modules/sunet/templates/cloudimage/mk_cloud_image.erb @@ -90,12 +90,13 @@ fi mcopy -i ${seed} ${user_data} ::user-data 2>/dev/null mcopy -i ${seed} ${meta_data} ::meta-data 2>/dev/null mcopy -i ${seed} /etc/cosmos/apt/bootstrap-cosmos.sh /etc/cosmos/apt/cosmos_1.2-2_all.deb :: -mv ${seed} /var/lib/libvirt/images/ +mkdir -p "/var/lib/libvirt/images/${hostname}" +mv ${seed} "/var/lib/libvirt/images/${hostname}" virsh pool-refresh default -virsh vol-clone --pool default ${src_image} ${disk} +virsh vol-clone --pool default ${src_image} ${hostname}/${disk} -virt-install -r ${mem} -n ${hostname} --vcpus=${cpus} --autostart --memballoon virtio --network bridge=${bridge} --boot hd --disk vol=default/${disk},format=qcow2,bus=virtio --disk vol=default/${seed},bus=virtio +virt-install -r ${mem} -n ${hostname} --vcpus=${cpus} --autostart --memballoon virtio --network bridge=${bridge} --boot hd --disk vol=default/${hostname}/${disk},format=qcow2,bus=virtio --disk vol=default/${hostname}/${seed},bus=virtio rm -f ${user_data} rm -f ${meta_data} |