1
0
mirror of https://github.com/GNS3/gns3-server synced 2024-12-25 16:28:11 +00:00

Fix a crash with VirtualBox in some conditions

Fix #863
This commit is contained in:
Julien Duponchelle 2017-01-10 14:22:04 +01:00
parent 9480065b28
commit 720adb7721
No known key found for this signature in database
GPG Key ID: CE8B29639E07F5E8

View File

@ -206,10 +206,11 @@ class VirtualBoxVM(BaseNode):
"""
Fix the VM uuid in the case of linked clone
"""
tree = ET.parse(self._linked_vbox_file())
machine = tree.getroot().find("{http://www.virtualbox.org/}Machine")
machine.set("uuid", "{" + self.id + "}")
tree.write(self._linked_vbox_file())
if os.path.exists(self._linked_vbox_file()):
tree = ET.parse(self._linked_vbox_file())
machine = tree.getroot().find("{http://www.virtualbox.org/}Machine")
machine.set("uuid", "{" + self.id + "}")
tree.write(self._linked_vbox_file())
@asyncio.coroutine
def check_hw_virtualization(self):