summaryrefslogtreecommitdiffstats
path: root/scripts/qemucommand.py
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/qemucommand.py')
-rw-r--r--scripts/qemucommand.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/scripts/qemucommand.py b/scripts/qemucommand.py
index 1049d7c..3045b45 100644
--- a/scripts/qemucommand.py
+++ b/scripts/qemucommand.py
@@ -2,7 +2,7 @@ from os.path import exists, join, realpath, abspath
2from os import listdir 2from os import listdir
3import random 3import random
4import socket 4import socket
5from subprocess import check_output, CalledProcessError 5from subprocess import check_output
6 6
7EXTENSIONS = { 7EXTENSIONS = {
8 'intel-corei7-64': 'wic', 8 'intel-corei7-64': 'wic',
@@ -68,6 +68,10 @@ class QemuCommand(object):
68 self.mac_address = random_mac() 68 self.mac_address = random_mac()
69 self.serial_port = find_local_port(8990) 69 self.serial_port = find_local_port(8990)
70 self.ssh_port = find_local_port(2222) 70 self.ssh_port = find_local_port(2222)
71 if args.mem:
72 self.mem = args.mem
73 else:
74 self.mem = "1G"
71 if args.kvm is None: 75 if args.kvm is None:
72 # Autodetect KVM using 'kvm-ok' 76 # Autodetect KVM using 'kvm-ok'
73 try: 77 try:
@@ -95,7 +99,7 @@ class QemuCommand(object):
95 cmdline += ["-drive", "file=%s,if=ide,format=raw,snapshot=on" % self.image] 99 cmdline += ["-drive", "file=%s,if=ide,format=raw,snapshot=on" % self.image]
96 cmdline += [ 100 cmdline += [
97 "-serial", "tcp:127.0.0.1:%d,server,nowait" % self.serial_port, 101 "-serial", "tcp:127.0.0.1:%d,server,nowait" % self.serial_port,
98 "-m", "1G", 102 "-m", self.mem,
99 "-usb", 103 "-usb",
100 "-object", "rng-random,id=rng0,filename=/dev/urandom", 104 "-object", "rng-random,id=rng0,filename=/dev/urandom",
101 "-device", "virtio-rng-pci,rng=rng0", 105 "-device", "virtio-rng-pci,rng=rng0",
@@ -131,4 +135,3 @@ class QemuCommand(object):
131 "-f", "qcow2", 135 "-f", "qcow2",
132 self.overlay] 136 self.overlay]
133 return cmdline 137 return cmdline
134