From 1036c7a0f143ad4f9086a8893c2c3d0793927ad5 Mon Sep 17 00:00:00 2001 From: David Ribeiro Alves Date: Wed, 14 Mar 2012 23:55:55 +0000 Subject: [PATCH] fixed broken master creation because guestAdditions was not executed.fixed but related to qemu (https://bugs.launchpad.net/ubuntu/+source/qemu/+bug/732864) where a lock file (/etc/gshadow.lock) on the master prevents clones from adding users. AdminAccess should work now --- .../virtualbox/functions/CreateAndInstallVm.java | 14 +++++++------- .../functions/installModuleAssistantIfNeeded.sh | 1 + 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/labs/virtualbox/src/main/java/org/jclouds/virtualbox/functions/CreateAndInstallVm.java b/labs/virtualbox/src/main/java/org/jclouds/virtualbox/functions/CreateAndInstallVm.java index 8d50f38f7e..66b4936bce 100644 --- a/labs/virtualbox/src/main/java/org/jclouds/virtualbox/functions/CreateAndInstallVm.java +++ b/labs/virtualbox/src/main/java/org/jclouds/virtualbox/functions/CreateAndInstallVm.java @@ -121,18 +121,18 @@ public class CreateAndInstallVm implements Function { "timed out waiting for guest %s to be accessible via ssh", vmName); - //logger.debug(">> awaiting installation of guest additions on vm: %s", vmName); - //checkState(guestAdditionsInstaller.apply(vm)); + logger.debug(">> awaiting installation of guest additions on vm: %s", vmName); + checkState(guestAdditionsInstaller.apply(vm)); logger.debug(">> awaiting post-installation actions on vm: %s", vmName); - NodeMetadata vmMetadata = imachineToNodeMetadata.apply(vm); +// NodeMetadata vmMetadata = imachineToNodeMetadata.apply(vm); - ListenableFuture execFuture = - machineUtils.runScriptOnNode(vmMetadata, call("cleanupUdevIfNeeded"), RunScriptOptions.NONE); +// ListenableFuture execFuture = +// machineUtils.runScriptOnNode(vmMetadata, call("cleanupUdevIfNeeded"), RunScriptOptions.NONE); - ExecResponse execResponse = Futures.getUnchecked(execFuture); - checkState(execResponse.getExitStatus() == 0); +// ExecResponse execResponse = Futures.getUnchecked(execFuture); +// checkState(execResponse.getExitStatus() == 0); logger.debug( "<< installation of image complete. Powering down node(%s)", diff --git a/labs/virtualbox/src/main/resources/functions/installModuleAssistantIfNeeded.sh b/labs/virtualbox/src/main/resources/functions/installModuleAssistantIfNeeded.sh index a6b71f03ba..87391c68de 100644 --- a/labs/virtualbox/src/main/resources/functions/installModuleAssistantIfNeeded.sh +++ b/labs/virtualbox/src/main/resources/functions/installModuleAssistantIfNeeded.sh @@ -10,5 +10,6 @@ function installModuleAssistantIfNeeded { mkdir /etc/udev/rules.d/70-persistent-net.rules; rm -rf /dev/.udev/; rm /lib/udev/rules.d/75-persistent-net-generator.rules + rm -f /etc/passwd.lock /etc/group.lock /etc/gshadow.lock fi } \ No newline at end of file