Implement full restart if user reload a Qemu VM which has been updated. Fixes https://github.com/GNS3/gns3-gui/issues/3038

This commit is contained in:
grossmj
2020-09-12 23:07:39 +09:30
parent 90ecefd455
commit 992cd7fc6c
2 changed files with 22 additions and 9 deletions

View File

@ -124,11 +124,7 @@ class QEMUHandler:
vm.console = request.json.pop("console", vm.console)
for name, value in request.json.items():
if hasattr(vm, name) and getattr(vm, name) != value:
setattr(vm, name, value)
if name == "cdrom_image":
# let the guest know about the new cdrom image
await vm.update_cdrom_image()
await vm.update(name, value)
vm.updated()
response.json(vm)