All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] scripts/runqemu: Add snapshot support
@ 2016-09-06 13:42 Richard Purdie
  0 siblings, 0 replies; only message in thread
From: Richard Purdie @ 2016-09-06 13:42 UTC (permalink / raw)
  To: openembedded-core

Allow access to the snapshot option of qemu to simplify some of our runtime
testing to avoid copying images.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>

diff --git a/scripts/runqemu b/scripts/runqemu
index a94cc65..867e818 100755
--- a/scripts/runqemu
+++ b/scripts/runqemu
@@ -160,7 +160,8 @@ class BaseConfig(object):
         self.custombiosdir = ''
         self.lock = ''
         self.lock_descriptor = ''
-        self. bitbake_e = ''
+        self.bitbake_e = ''
+        self.snapshot = False
         self.fstypes = ('ext2', 'ext3', 'ext4', 'jffs2', 'nfs', 'btrfs', 'cpio.gz', 'cpio', 'ramfs')
         self.vmtypes = ('hddimg', 'hdddirect', 'wic', 'vmdk', 'qcow2', 'vdi', 'iso')
 
@@ -312,6 +313,8 @@ class BaseConfig(object):
                 self.vhost_enabled = True
             elif arg == 'slirp':
                 self.slirp_enabled = True
+            elif arg == 'snapshot':
+                self.snapshot = True
             elif arg == 'publicvnc':
                 self.qemu_opt_script += ' -vnc :0'
             elif arg.startswith('tcpserial='):
@@ -750,6 +753,9 @@ class BaseConfig(object):
         # Enable virtio RNG else we can run out of entropy in guests
         self.qemu_opt += " -device virtio-rng-pci"
 
+        if self.snapshot:
+            self.qemu_opt += " -snapshot"
+
         if self.serialstdio:
             logger.info("Interrupt character is '^]'")
             cmd = "stty intr ^]"




^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2016-09-06 13:42 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-09-06 13:42 [PATCH] scripts/runqemu: Add snapshot support Richard Purdie

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.