aboutsummaryrefslogtreecommitdiffstats
path: root/vm
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2016-07-07 08:36:32 +0200
committerGitHub <noreply@github.com>2016-07-07 08:36:32 +0200
commit9b7b5cffbe1ca399cc106b0a8a248da86694852d (patch)
tree6beddc58da8f147a5c187944a5db69cdcab33c82 /vm
parent4782c2b8e6d9cf4c75612c444760060d0a103da3 (diff)
parent7156b5c3c72faca2ef2b101df6f6a9685e9f0f0c (diff)
Merge pull request #49 from bittorrent3389/for_submit
Add initrd qemu flag.
Diffstat (limited to 'vm')
-rw-r--r--vm/qemu/qemu.go5
-rw-r--r--vm/vm.go1
2 files changed, 6 insertions, 0 deletions
diff --git a/vm/qemu/qemu.go b/vm/qemu/qemu.go
index ab669b9b1..444e556ca 100644
--- a/vm/qemu/qemu.go
+++ b/vm/qemu/qemu.go
@@ -143,6 +143,11 @@ func (inst *instance) Boot() error {
"-usb", "-usbdevice", "mouse", "-usbdevice", "tablet",
"-soundhw", "all",
}
+ if inst.cfg.Initrd != "" {
+ args = append(args,
+ "-initrd", inst.cfg.Initrd,
+ )
+ }
if inst.cfg.Kernel != "" {
args = append(args,
"-kernel", inst.cfg.Kernel,
diff --git a/vm/vm.go b/vm/vm.go
index 8ac190264..49bec49a6 100644
--- a/vm/vm.go
+++ b/vm/vm.go
@@ -33,6 +33,7 @@ type Config struct {
Index int
Workdir string
Bin string
+ Initrd string
Kernel string
Cmdline string
Image string