Skip to content

Commit f95f1c2

Browse files
author
John Howard
committed
Windows: Add Hyper-V isolation fields
Signed-off-by: John Howard <jhoward@microsoft.com>
1 parent 6cc08c2 commit f95f1c2

File tree

2 files changed

+30
-0
lines changed

2 files changed

+30
-0
lines changed

config-windows.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,3 +94,23 @@ The following parameters can be specified:
9494
}
9595
}
9696
```
97+
98+
## <a name="configWindowsHyperV" />HyperV
99+
100+
`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.
101+
102+
The following parameters can be specified:
103+
104+
* **`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.
105+
106+
* **`sandboxpath`** *(string)* - specifies the root of the path to the sandbox to be used for the container.
107+
108+
### Example
109+
110+
```json
111+
"windows": {
112+
"hyperv": {
113+
"sandboxpath": "C:\\\\programdata\\\\docker\\\\windowsfilter"
114+
}
115+
}
116+
```

specs-go/config.go

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -432,6 +432,16 @@ type SolarisAnet struct {
432432
type Windows struct {
433433
// Resources contains information for handling resource constraints for the container.
434434
Resources *WindowsResources `json:"resources,omitempty"`
435+
// HyperV contains information for running a container with Hyper-V isolation.
436+
HyperV *WindowsHyperV `json:"hyperv,omitempty"`
437+
}
438+
439+
// WindowsHyperV contains information for configuring a container to run with Hyper-V isolation.
440+
type WindowsHyperV struct {
441+
// UtilityVMPath is an optional path to the image used for the Utility VM.
442+
UtilityVMPath string `json:"utilityvmpath,omitempty"`
443+
// SandboxPath is a required host-path to the sandbox to be used by the container.
444+
SandboxPath string `json:"sandboxpath"`
435445
}
436446

437447
// WindowsResources has container runtime resource constraints for containers running on Windows.

0 commit comments

Comments
 (0)