Remove dependency on tar2vhd for LCOW differ

This change no longer requires the use of a UtlityVM on Windows to convert the
layer tar to an ext4 vhd for LCOW. This has a significant performance boost
that makes linux/amd64 layer extraction comparable to native Linux performance.

Signed-off-by: Justin Terry (VM) <juterry@microsoft.com>
This commit is contained in:
Justin Terry (VM)
2018-10-03 10:21:18 -07:00
parent 15f19d7a67
commit cce78d4b5d
13 changed files with 2085 additions and 48 deletions

View File

@@ -10,6 +10,7 @@ import (
"strings"
"sync"
irunhcs "github.com/Microsoft/hcsshim/internal/runhcs"
"github.com/containerd/go-runc"
)
@@ -23,8 +24,7 @@ const (
// JSON is the JSON formatted log output.
JSON Format = "json"
command = "runhcs"
safePipePrefix = `\\.\pipe\ProtectedPrefix\Administrators\`
command = "runhcs"
)
var bytesBufferPool = sync.Pool{
@@ -62,7 +62,7 @@ func (r *Runhcs) args() []string {
out = append(out, "--debug")
}
if r.Log != "" {
if strings.HasPrefix(r.Log, safePipePrefix) {
if strings.HasPrefix(r.Log, irunhcs.SafePipePrefix) {
out = append(out, "--log", r.Log)
} else {
abs, err := filepath.Abs(r.Log)

View File

@@ -6,6 +6,7 @@ import (
"path/filepath"
"strings"
irunhcs "github.com/Microsoft/hcsshim/internal/runhcs"
runc "github.com/containerd/go-runc"
)
@@ -32,7 +33,7 @@ func (opt *CreateOpts) args() ([]string, error) {
out = append(out, "--pid-file", abs)
}
if opt.ShimLog != "" {
if strings.HasPrefix(opt.ShimLog, safePipePrefix) {
if strings.HasPrefix(opt.ShimLog, irunhcs.SafePipePrefix) {
out = append(out, "--shim-log", opt.ShimLog)
} else {
abs, err := filepath.Abs(opt.ShimLog)
@@ -43,7 +44,7 @@ func (opt *CreateOpts) args() ([]string, error) {
}
}
if opt.VMLog != "" {
if strings.HasPrefix(opt.VMLog, safePipePrefix) {
if strings.HasPrefix(opt.VMLog, irunhcs.SafePipePrefix) {
out = append(out, "--vm-log", opt.VMLog)
} else {
abs, err := filepath.Abs(opt.VMLog)

View File

@@ -6,6 +6,7 @@ import (
"path/filepath"
"strings"
irunhcs "github.com/Microsoft/hcsshim/internal/runhcs"
"github.com/containerd/go-runc"
)
@@ -33,7 +34,7 @@ func (opt *ExecOpts) args() ([]string, error) {
out = append(out, "--pid-file", abs)
}
if opt.ShimLog != "" {
if strings.HasPrefix(opt.ShimLog, safePipePrefix) {
if strings.HasPrefix(opt.ShimLog, irunhcs.SafePipePrefix) {
out = append(out, "--shim-log", opt.ShimLog)
} else {
abs, err := filepath.Abs(opt.ShimLog)