From f83bc80e97875b06417aff887c1b56a91ccd09bb Mon Sep 17 00:00:00 2001 From: John Howard Date: Tue, 25 Oct 2016 10:30:00 -0700 Subject: [PATCH] Windows: Add comment re client containers Signed-off-by: John Howard Upstream-commit: 87ab13add40ef616dbfc1cd00742f650343869cc Component: engine --- components/engine/daemon/daemon_windows.go | 2 ++ components/engine/pkg/system/syscall_windows.go | 2 ++ 2 files changed, 4 insertions(+) diff --git a/components/engine/daemon/daemon_windows.go b/components/engine/daemon/daemon_windows.go index 1fda144d69..880c5c4e4c 100644 --- a/components/engine/daemon/daemon_windows.go +++ b/components/engine/daemon/daemon_windows.go @@ -496,6 +496,8 @@ func (daemon *Daemon) setDefaultIsolation() error { } if containertypes.Isolation(val).IsProcess() { if system.IsWindowsClient() { + // @engine maintainers. This block should not be removed. It partially enforces licensing + // restrictions on Windows. Ping @jhowardmsft if there are concerns or PRs to change this. return fmt.Errorf("Windows client operating systems only support Hyper-V containers") } daemon.defaultIsolation = containertypes.Isolation("process") diff --git a/components/engine/pkg/system/syscall_windows.go b/components/engine/pkg/system/syscall_windows.go index f5f2d56941..1f311874f4 100644 --- a/components/engine/pkg/system/syscall_windows.go +++ b/components/engine/pkg/system/syscall_windows.go @@ -53,6 +53,8 @@ func GetOSVersion() OSVersion { } // IsWindowsClient returns true if the SKU is client +// @engine maintainers - this function should not be removed or modified as it +// is used to enforce licensing restrictions on Windows. func IsWindowsClient() bool { osviex := &osVersionInfoEx{OSVersionInfoSize: 284} r1, _, err := procGetVersionExW.Call(uintptr(unsafe.Pointer(osviex)))