diff options
author | varac <varacanero@zeromail.org> | 2012-10-10 15:55:07 +0200 |
---|---|---|
committer | varac <varacanero@zeromail.org> | 2012-10-10 15:55:07 +0200 |
commit | 738cebb625cb225439f2ff21570ce8c147842aac (patch) | |
tree | 9e9bd2cb2590456edff2566027b2ead15733b181 | |
parent | b98293f06f5c2b399cabe0c20fbeb8d0f189fd1c (diff) |
use KVM_URI='qemu:///system' as default
-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 |