diff options
author | Leif Johansson <leifj@sunet.se> | 2015-05-08 16:48:25 +0200 |
---|---|---|
committer | Leif Johansson <leifj@sunet.se> | 2015-05-08 16:48:25 +0200 |
commit | 2a8db0563a5c40409b552fb2265c1aec946c489f (patch) | |
tree | b9f99d048095697a97e08919b08ec5ed3176a22a /global/overlay | |
parent | 1219c2b3ab6d7fedecc7a8e24774117eb8901896 (diff) |
use directoriessunet-ops-2015-05-08-v12
Diffstat (limited to 'global/overlay')
-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} |