mirror of
https://github.com/GNS3/gns3-server.git
synced 2025-02-07 08:43:48 +02:00
Explicit set qemu memory as MB
This commit is contained in:
parent
323674ba5c
commit
55f7c79918
@ -1386,7 +1386,7 @@ class QemuVM(BaseVM):
|
|||||||
|
|
||||||
command = [self.qemu_path]
|
command = [self.qemu_path]
|
||||||
command.extend(["-name", self._name])
|
command.extend(["-name", self._name])
|
||||||
command.extend(["-m", str(self._ram)])
|
command.extend(["-m {}M".format(self._ram)])
|
||||||
command.extend(["-smp", "cpus={}".format(self._cpus)])
|
command.extend(["-smp", "cpus={}".format(self._cpus)])
|
||||||
if self._run_with_kvm(self.qemu_path, self._options):
|
if self._run_with_kvm(self.qemu_path, self._options):
|
||||||
command.extend(["-enable-kvm"])
|
command.extend(["-enable-kvm"])
|
||||||
|
@ -339,7 +339,7 @@ def test_build_command(vm, loop, fake_qemu_binary, port_manager):
|
|||||||
"-name",
|
"-name",
|
||||||
"test",
|
"test",
|
||||||
"-m",
|
"-m",
|
||||||
"256",
|
"256M",
|
||||||
"-smp",
|
"-smp",
|
||||||
"cpus=1",
|
"cpus=1",
|
||||||
"-boot",
|
"-boot",
|
||||||
@ -436,7 +436,6 @@ def test_run_with_kvm_darwin(darwin_platform, vm):
|
|||||||
assert vm._run_with_kvm("qemu-system-x86_64", "") is False
|
assert vm._run_with_kvm("qemu-system-x86_64", "") is False
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def test_run_with_kvm_windows(windows_platform, vm):
|
def test_run_with_kvm_windows(windows_platform, vm):
|
||||||
|
|
||||||
with patch("configparser.SectionProxy.getboolean", return_value=True):
|
with patch("configparser.SectionProxy.getboolean", return_value=True):
|
||||||
@ -472,7 +471,6 @@ def test_run_with_kvm_not_x86(linux_platform, vm):
|
|||||||
assert vm._run_with_kvm("qemu-system-arm", "") is False
|
assert vm._run_with_kvm("qemu-system-arm", "") is False
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def test_run_with_kvm_linux_dev_kvm_missing(linux_platform, vm):
|
def test_run_with_kvm_linux_dev_kvm_missing(linux_platform, vm):
|
||||||
|
|
||||||
with patch("os.path.exists", return_value=False) as os_path:
|
with patch("os.path.exists", return_value=False) as os_path:
|
||||||
|
Loading…
Reference in New Issue
Block a user