mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-06 15:21:13 +02:00
Prevent corruption of VM in VirtualBox when using linked clone
Fix https://github.com/GNS3/gns3-gui/issues/1821
This commit is contained in:
4 files changed
+37
-10
No files matched your search
@@ -112,10 +112,13 @@ class VirtualBoxHandler:
|
||||
vbox_manager = VirtualBox.instance()
|
||||
vm = vbox_manager.get_node(request.match_info["node_id"], project_id=request.match_info["project_id"])
|
||||
|
||||
if "vmname" in request.json:
|
||||
vmname = request.json.pop("vmname")
|
||||
if vmname != vm.vmname:
|
||||
yield from vm.set_vmname(vmname)
|
||||
if "name" in request.json:
|
||||
name = request.json.pop("name")
|
||||
vmname = request.json.pop("vmname", None)
|
||||
if name != vm.name:
|
||||
vm.name = name
|
||||
if vm.linked_clone:
|
||||
yield from vm.set_vmname(vm.name)
|
||||
|
||||
if "adapters" in request.json:
|
||||
adapters = int(request.json.pop("adapters"))
|
||||
|
||||
Reference in new issue
Block a user