diff options
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/runqemu | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/scripts/runqemu b/scripts/runqemu index e2dc529baa..1f332ef525 100755 --- a/scripts/runqemu +++ b/scripts/runqemu | |||
@@ -18,6 +18,7 @@ import shutil | |||
18 | import glob | 18 | import glob |
19 | import configparser | 19 | import configparser |
20 | import signal | 20 | import signal |
21 | import time | ||
21 | 22 | ||
22 | class RunQemuError(Exception): | 23 | class RunQemuError(Exception): |
23 | """Custom exception to raise on known errors.""" | 24 | """Custom exception to raise on known errors.""" |
@@ -1201,8 +1202,10 @@ class BaseConfig(object): | |||
1201 | tmpfsdir = os.environ.get("RUNQEMU_TMPFS_DIR", None) | 1202 | tmpfsdir = os.environ.get("RUNQEMU_TMPFS_DIR", None) |
1202 | if self.snapshot and tmpfsdir: | 1203 | if self.snapshot and tmpfsdir: |
1203 | newrootfs = os.path.join(tmpfsdir, os.path.basename(self.rootfs)) + "." + str(os.getpid()) | 1204 | newrootfs = os.path.join(tmpfsdir, os.path.basename(self.rootfs)) + "." + str(os.getpid()) |
1205 | logger.info("Copying rootfs to %s" % newrootfs) | ||
1206 | copy_start = time.time() | ||
1204 | shutil.copyfile(self.rootfs, newrootfs) | 1207 | shutil.copyfile(self.rootfs, newrootfs) |
1205 | #print("Copying rootfs to tmpfs: %s" % newrootfs) | 1208 | logger.info("Copy done in %s seconds" % (time.time() - copy_start)) |
1206 | self.rootfs = newrootfs | 1209 | self.rootfs = newrootfs |
1207 | # Don't need a second copy now! | 1210 | # Don't need a second copy now! |
1208 | self.snapshot = False | 1211 | self.snapshot = False |