aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--rumba/testbeds/qemu.py12
1 files changed, 11 insertions, 1 deletions
diff --git a/rumba/testbeds/qemu.py b/rumba/testbeds/qemu.py
index 5f76684..5636e75 100644
--- a/rumba/testbeds/qemu.py
+++ b/rumba/testbeds/qemu.py
@@ -60,7 +60,7 @@ class Testbed(mod.Testbed):
self.initramfs_path = initramfs_path
self.multiproc_manager = None
- self.executor = SSHExecutor(self);
+ self.executor = SSHExecutor(self)
# Prepend sudo to all commands if the user is not 'root'
def may_sudo(self, cmds):
@@ -337,6 +337,16 @@ class Testbed(mod.Testbed):
self.recover_if_names(experiment)
+ for node in experiment.nodes:
+ pub_key = os.path.join(os.path.expanduser("~"),
+ '.ssh',
+ 'id_rsa.pub')
+ node.copy_file(pub_key, '/root/.ssh')
+ node.execute_command('cd /root/.ssh; '
+ 'mv authorized_keys old.authorized_keys; '
+ 'cat old.authorized_keys id_rsa.pub '
+ '> authorized_keys')
+
logger.info('Experiment has been successfully swapped in.')
def swap_out(self, experiment):