Skip to content

Commit

Permalink
Windows: Add Hyper-V isolation fields
Browse files Browse the repository at this point in the history
Signed-off-by: John Howard <jhoward@microsoft.com>
  • Loading branch information
John Howard committed May 12, 2017
1 parent 6cc08c2 commit 699f665
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 0 deletions.
20 changes: 20 additions & 0 deletions config-windows.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,3 +94,23 @@ The following parameters can be specified:
}
}
```

## <a name="configWindowsHyperV" />HyperV

`hyperv` is an OPTIONAL field of the Windows configuration. If present, the container will be run with Hyper-V isolation. If omitted, the container will be run as a Windows Server container.

The following parameters can be specified:

* **`utilityvmpath`** *(string, OPTIONAL)* - specifies the path to the image used for the utility VM. If not supplied, the runtime will search the container filesystem layers from the bottom-most layer upwards, until it locates "UtilityVM", and default to that path.

* **`sandboxpath`** *(string)* - specifies the root of the path to the sandbox to be used for the container.

### Example

```json
"windows": {
"hyperv": {
"sandboxpath": "C:\\\\programdata\\\\docker\\\\windowsfilter"
}
}
```
10 changes: 10 additions & 0 deletions specs-go/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -432,6 +432,8 @@ type SolarisAnet struct {
type Windows struct {
// Resources contains information for handling resource constraints for the container.
Resources *WindowsResources `json:"resources,omitempty"`
// HyperV contains information for running a container with Hyper-V isolation.
HyperV *WindowsHyperV `json:"hyperv,omitempty"`
}

// WindowsResources has container runtime resource constraints for containers running on Windows.
Expand Down Expand Up @@ -478,6 +480,14 @@ type WindowsNetworkResources struct {
EgressBandwidth *uint64 `json:"egressBandwidth,omitempty"`
}

// WindowsHyperV contains information for configuring a container to run with Hyper-V isolation.
type WindowsHyperV struct {
// UtilityVMPath is an optional path to the image used for the Utility VM.
UtilityVMPath string `json:"utilityvmpath,omitempty"`
// SandboxPath is a required host-path to the sandbox to be used by the container.
SandboxPath string `json:"sandboxpath"`
}

// LinuxSeccomp represents syscall restrictions
type LinuxSeccomp struct {
DefaultAction LinuxSeccompAction `json:"defaultAction"`
Expand Down

0 comments on commit 699f665

Please sign in to comment.