Skip to content

Commit

Permalink
Fix a crash with VirtualBox in some conditions
Browse files Browse the repository at this point in the history
Fix #863
  • Loading branch information
julien-duponchelle committed Jan 10, 2017
1 parent 9480065 commit 720adb7
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions gns3server/compute/virtualbox/virtualbox_vm.py
Original file line number Diff line number Diff line change
Expand Up @@ -206,10 +206,11 @@ def _patch_vm_uuid(self):
"""
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):
Expand Down

0 comments on commit 720adb7

Please sign in to comment.