diff options
author | Lars Wirzenius <lars.wirzenius@codethink.co.uk> | 2013-03-13 15:11:36 +0000 |
---|---|---|
committer | Jonathan Maw <jonathan.maw@codethink.co.uk> | 2013-03-20 10:12:02 +0000 |
commit | 717e3e91b3a606cca14f1a4c1d44a28cbbbe3c9e (patch) | |
tree | 7d08735d2da500607a15ee33c06c862e3d7a6e48 /virtualbox-ssh.write | |
parent | 5178028a2fe4f38a9f163a910926e1ae5e3eb517 (diff) | |
download | definitions-717e3e91b3a606cca14f1a4c1d44a28cbbbe3c9e.tar.gz |
Implement ATTACH_DISKS in virtualbox-ssh.write
Diffstat (limited to 'virtualbox-ssh.write')
-rwxr-xr-x | virtualbox-ssh.write | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/virtualbox-ssh.write b/virtualbox-ssh.write index 9b99c7a1..862d4f02 100755 --- a/virtualbox-ssh.write +++ b/virtualbox-ssh.write @@ -121,7 +121,17 @@ class VirtualBoxPlusSshWriteExtension(morphlib.writeexts.WriteExtension): '--port', '0', '--device', '0', '--type', 'hdd', '--medium', vdi_path], ] - + + attach_disks = self.parse_attach_disks() + for device_no, disk in enumerate(attach_disks, 1): + cmd = ['storageattach', vm_name, + '--storagectl', '"SATA Controller"', + '--port', str(device_no), + '--device', '0', + '--type', 'hdd', + '--medium', disk] + commands.append(cmd) + for command in commands: argv = ['ssh', ssh_host, 'VBoxManage'] + command cliapp.runcmd(argv) |