diff options
Diffstat (limited to 'create-guest-with-cloudinit')
-rwxr-xr-x | create-guest-with-cloudinit | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/create-guest-with-cloudinit b/create-guest-with-cloudinit index 5b543ac..feecdcc 100755 --- a/create-guest-with-cloudinit +++ b/create-guest-with-cloudinit @@ -10,8 +10,10 @@ ETC='/etc/cloudinit' CONFIG="$ETC/cloudinit.cfg" VARDIR='/var/lib/libvirt/cloudinit' SCRIPTDIR='/usr/local/bin/leap_cloudadmin' +KVM_URI='qemu:///system' -. $CONFIG +# overwrite defaults +[ -e $CONFIG] && . $CONFIG fail() { [ $# -eq 0 ] || echo "$@"; exit 1; } @@ -70,7 +72,7 @@ echo echo "Creating guest VM $vmname with size: $size GB, using $userdata for clound-init" echo - +# is a VM with the same name defined ? virsh dominfo $vmname > /dev/null 2>&1 if [ $? -eq 0 ]; then fail "Domain $vmname is defined in libvirt. Please undefine first."; fi |