Fix timeout issue when creating Qemu disk image. Fixes https://github.com/GNS3/gns3-server/issues/2313

This commit is contained in:
grossmj committed 2024-01-28 12:13:05 +11:00
1 parent 2bbb560b8e
commit fe246cd413
2 files changed
+5

No files matched your search

+3
View File
@@ -26,6 +26,7 @@ import sys
import re
import subprocess
from ...utils import shlex_quote
from ...utils.asyncio import subprocess_check_output
from ...utils.get_resource import get_resource
from ..base_manager import BaseManager
@@ -337,6 +338,8 @@ class Qemu(BaseManager):
command.append(path)
command.append("{}M".format(img_size))
command_string = " ".join(shlex_quote(s) for s in command)
log.info("Creating disk image with {}".format(command_string))
process = await asyncio.create_subprocess_exec(*command)
await process.wait()
except (OSError, subprocess.SubprocessError) as e: