mirror of
https://github.com/GNS3/gns3-server.git
synced 2025-01-30 21:03:49 +02:00
Removes unnecessary sleep in VirtualBox VM.
This commit is contained in:
parent
fa544ef888
commit
d68bf1c263
@ -133,6 +133,7 @@ class VirtualBox(BaseManager):
|
|||||||
if not extra_data[0].strip() == "Value: yes":
|
if not extra_data[0].strip() == "Value: yes":
|
||||||
# get the amount of RAM
|
# get the amount of RAM
|
||||||
info_results = yield from self.execute("showvminfo", [vmname, "--machinereadable"])
|
info_results = yield from self.execute("showvminfo", [vmname, "--machinereadable"])
|
||||||
|
ram = 0
|
||||||
for info in info_results:
|
for info in info_results:
|
||||||
try:
|
try:
|
||||||
name, value = info.split('=', 1)
|
name, value = info.split('=', 1)
|
||||||
|
@ -209,7 +209,7 @@ class VirtualBoxVM(BaseVM):
|
|||||||
log.info("VirtualBox VM '{name}' [{id}] stopped".format(name=self.name, id=self.id))
|
log.info("VirtualBox VM '{name}' [{id}] stopped".format(name=self.name, id=self.id))
|
||||||
log.debug("Stop result: {}".format(result))
|
log.debug("Stop result: {}".format(result))
|
||||||
|
|
||||||
yield from asyncio.sleep(0.5) # give some time for VirtualBox to unlock the VM
|
# yield from asyncio.sleep(0.5) # give some time for VirtualBox to unlock the VM
|
||||||
try:
|
try:
|
||||||
# deactivate the first serial port
|
# deactivate the first serial port
|
||||||
yield from self._modify_vm("--uart1 off")
|
yield from self._modify_vm("--uart1 off")
|
||||||
|
Loading…
Reference in New Issue
Block a user