On Mon, Dec 23, 2013 at 09:13:34AM +0100, Paul Sherwood wrote:
@@ -125,7 +125,7 @@ class
VirtualBoxPlusSshWriteExtension(morphlib.writeexts.WriteExtension):
'--nic1', 'hostonly', '--hostonlyadapter1',
hostonly_iface,
'--nic2', 'nat', '--natnet2', 'default'],
['storagectl', vm_name, '--name', 'SATA
Controller',
- '--add', 'sata', '--bootable', 'on',
'--sataportcount', '2'],
+ '--add', 'sata', '--bootable', 'on',
'--portcount', '2'],
['storageattach', vm_name, '--storagectl', 'SATA
Controller',
'--port', '0', '--device', '0',
'--type', 'hdd', '--medium',
vdi_path],
Will the new code work with old VirtualBox? If not, we have a
situation where Morph will work with the new VirtualBox only, and
break things for those running old VirtualBox. That's not a good
situation: we would be forcing people to upgrade VirtualBox, but that
might not be an option for them (e.g., there is no newer VirtualBox
for Debian wheezy, so they'd have to install one outside the package
management system, which is all sorts of icky).
Having had a quick look at the VBoxManage manual page for the
VirtualBox version in Debian wheezy, it doesn't seem like it supports
the new option name.
A proper fix for this would require Morph to query the version before
running VBoxManage. "VBoxManage --help | grep -e --portcount" seems to
do the trick.
Boohiss to VirtualBox for backwards-incompatible changes in a public
interface. Boohiss for not mentioning it in their ChangeLog
(
https://www.virtualbox.org/wiki/Changelog) either.
--
http://www.codethink.co.uk/ http://wiki.baserock.org/ http://www.baserock.com/