cros_vm_lib: Increase qemu memory to 8G

We set the vm memory to 4G from 2012. Increase the value of the memory
to 8G by default as 6 years has passed.

TEST=./bin/cros_start_vm --board=betty --kvm_ram=16G --image_path=chromiumos_qemu_image.bin
TEST=./bin/cros_start_vm --board=betty --image_path=chromiumos_qemu_image.bin

Change-Id: I36f470c542bdf68b2a7beca861da17302b5b8a22
Reviewed-by: Ilja H. Friedel <>
Tested-by: Ilja H. Friedel <>
Commit-Queue: Po-Hsien Wang <>
diff --git a/lib/ b/lib/
index 5177ee0..34f66f8 100644
--- a/lib/
+++ b/lib/
@@ -29,6 +29,7 @@
 DEFINE_string qemu_binary \
   "${DEFAULT_CHROOT_DIR}"/usr/bin/qemu-system-x86_64 \
   "The qemu binary to be used. Defaults to qemu shipped with the SDK."
+DEFINE_string kvm_m 8G "Configure guest RAM"
@@ -306,7 +307,7 @@
     # to ensure that it is quoted if set, but _not_ quoted if
     # unset. (QEMU chokes on empty arguments).
     local cmd=(
-      "${KVM_BINARY}" ${kvm_flag} -m 2G
+      "${KVM_BINARY}" ${kvm_flag} -m ${FLAGS_kvm_m}
       -smp 4
       -vga virtio
       -pidfile "${KVM_PID_FILE}"