diff options
| author | Dmitry Vyukov <dvyukov@google.com> | 2018-06-22 19:00:12 +0200 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2018-06-22 19:00:12 +0200 |
| commit | 39a5713d72c6a3636eddd40d1ad2063b21299cae (patch) | |
| tree | 5e127a45c073276e0d15b5827b36f053fd90c611 /vm/gvisor/gvisor.go | |
| parent | 412bfd3c5813a9e677f3ca41c330656a9b0415e7 (diff) | |
vm/gvisor: allow specifying arbitrary runsc flags
Diffstat (limited to 'vm/gvisor/gvisor.go')
| -rw-r--r-- | vm/gvisor/gvisor.go | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/vm/gvisor/gvisor.go b/vm/gvisor/gvisor.go index 9118d1fb6..76cc7c476 100644 --- a/vm/gvisor/gvisor.go +++ b/vm/gvisor/gvisor.go @@ -27,7 +27,8 @@ func init() { } type Config struct { - Count int `json:"count"` // number of VMs to use + Count int `json:"count"` // number of VMs to use + RunscArgs string `json:"runsc_args"` } type Pool struct { @@ -176,6 +177,7 @@ func (inst *instance) runscCmd(add ...string) *exec.Cmd { "-root", inst.rootDir, "-network=none", } + args = append(args, strings.Split(inst.cfg.RunscArgs, " ")...) args = append(args, add...) cmd := osutil.Command(inst.image, args...) cmd.Env = []string{ |
