mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-03 22:11:14 +02:00
Support RAM setting for VirtualBox VMs.
This commit is contained in:
1 parent
a81d2274cd
commit
4ccca5dc99
4 files changed
+70
-1
No files matched your search
@@ -73,6 +73,11 @@ class VirtualBoxHandler:
|
||||
if "enable_remote_console" in request.json:
|
||||
yield from vm.set_enable_remote_console(request.json.pop("enable_remote_console"))
|
||||
|
||||
if "ram" in request.json:
|
||||
ram = request.json.pop("ram")
|
||||
if ram != vm.ram:
|
||||
yield from vm.set_ram(ram)
|
||||
|
||||
for name, value in request.json.items():
|
||||
if hasattr(vm, name) and getattr(vm, name) != value:
|
||||
setattr(vm, name, value)
|
||||
@@ -134,6 +139,11 @@ class VirtualBoxHandler:
|
||||
if adapters != vm.adapters:
|
||||
yield from vm.set_adapters(adapters)
|
||||
|
||||
if "ram" in request.json:
|
||||
ram = request.json.pop("ram")
|
||||
if ram != vm.ram:
|
||||
yield from vm.set_ram(ram)
|
||||
|
||||
for name, value in request.json.items():
|
||||
if hasattr(vm, name) and getattr(vm, name) != value:
|
||||
setattr(vm, name, value)
|
||||
|
||||
Reference in new issue
Block a user