Merge branch 'master' of github.com:cloudbuilders/devstack
diff --git a/tools/build_kvm.sh b/tools/build_kvm.sh
index 97260e2..36457d5 100755
--- a/tools/build_kvm.sh
+++ b/tools/build_kvm.sh
@@ -19,9 +19,6 @@
 TOOLS_DIR=$(cd $(dirname "$0") && pwd)
 TOP_DIR=$TOOLS_DIR/..
 
-# Configure the root password of the vm
-ROOT_PASSWORD=${ROOT_PASSWORD:-password}
-
 # Where to store files and instances
 KVMSTACK_DIR=${KVMSTACK_DIR:-/opt/kvmstack}
 
@@ -44,6 +41,10 @@
 # Source params
 source ./stackrc
 
+# Configure the root password of the vm to be the same as ``ADMIN_PASSWORD``
+ROOT_PASSWORD=${ADMIN_PASSWORD:-password}
+
+
 # Base image (natty by default)
 DIST_NAME=${DIST_NAME:-natty}
 IMAGE_FNAME=$DIST_NAME.raw
@@ -260,7 +261,7 @@
 EOF
 
 # User configuration for the instance
-chroot $ROOTFS groupadd libvirtd
+chroot $ROOTFS groupadd libvirtd || true
 chroot $ROOTFS useradd stack -s /bin/bash -d $DEST -G libvirtd
 cp -pr $TOOLS_DIR/.. $ROOTFS/$DEST/devstack
 echo "root:$ROOT_PASSWORD" | chroot $ROOTFS chpasswd