From a0fe9bb4984c0d76caf6ac98da9a99fbf9d86365 Mon Sep 17 00:00:00 2001 From: grossmj Date: Tue, 2 Jun 2015 09:00:37 -0600 Subject: [PATCH] Control vm command has to be used instead of modify vm. Fixes #205. --- gns3server/modules/virtualbox/virtualbox_vm.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gns3server/modules/virtualbox/virtualbox_vm.py b/gns3server/modules/virtualbox/virtualbox_vm.py index 3c8d471a..648eafd6 100644 --- a/gns3server/modules/virtualbox/virtualbox_vm.py +++ b/gns3server/modules/virtualbox/virtualbox_vm.py @@ -813,8 +813,8 @@ class VirtualBoxVM(BaseVM): yield from self._control_vm("nicproperty{} dport={}".format(adapter_number + 1, nio.rport)) yield from self._control_vm("setlinkstate{} on".format(adapter_number + 1)) elif isinstance(nio, NIONAT): - yield from self._modify_vm("--nic{} nat".format(adapter_number + 1)) - yield from self._modify_vm("--cableconnected{} on".format(adapter_number + 1)) + yield from self._control_vm("nic{} nat".format(adapter_number + 1)) + yield from self._control_vm("setlinkstate{} on".format(adapter_number + 1)) adapter.add_nio(0, nio) log.info("VirtualBox VM '{name}' [{id}]: {nio} added to adapter {adapter_number}".format(name=self.name,