Explicit set qemu memory as MB

This commit is contained in:
Julien Duponchelle 2015-08-07 17:03:06 +02:00
parent 323674ba5c
commit 55f7c79918
2 changed files with 2 additions and 4 deletions

View File

@ -1386,7 +1386,7 @@ class QemuVM(BaseVM):
command = [self.qemu_path]
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)])
if self._run_with_kvm(self.qemu_path, self._options):
command.extend(["-enable-kvm"])

View File

@ -339,7 +339,7 @@ def test_build_command(vm, loop, fake_qemu_binary, port_manager):
"-name",
"test",
"-m",
"256",
"256M",
"-smp",
"cpus=1",
"-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
def test_run_with_kvm_windows(windows_platform, vm):
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
def test_run_with_kvm_linux_dev_kvm_missing(linux_platform, vm):
with patch("os.path.exists", return_value=False) as os_path: