From 2a8db0563a5c40409b552fb2265c1aec946c489f Mon Sep 17 00:00:00 2001 From: Leif Johansson Date: Fri, 8 May 2015 16:48:25 +0200 Subject: use directories --- .../puppet/modules/sunet/templates/cloudimage/mk_cloud_image.erb | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'global/overlay') 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} -- cgit v1.1