Prevent renaming of a running VirtualBox linked VM

Fix https://github.com/GNS3/gns3-gui/issues/1816
This commit is contained in:
Julien Duponchelle committed 2017-01-30 15:19:46 +01:00
1 parent 2da20177a2
commit 580693b1ec
2 files changed
+13

No files matched your search

@@ -604,6 +604,8 @@ class VirtualBoxVM(BaseNode):
"""
if self.linked_clone:
if self.status == "started":
raise VirtualBoxError("You can't change the name of running VM {}".format(self._name))
yield from self._modify_vm('--name "{}"'.format(vmname))
log.info("VirtualBox VM '{name}' [{id}] has set the VM name to '{vmname}'".format(name=self.name, id=self.id, vmname=vmname))