Signed-off-by: John Howard <jhoward@microsoft.com>
John Howard authored on 2016/11/11 07:35:19... | ... |
@@ -192,12 +192,18 @@ func verifyContainerResources(resources *containertypes.Resources, isHyperv bool |
192 | 192 |
func verifyPlatformContainerSettings(daemon *Daemon, hostConfig *containertypes.HostConfig, config *containertypes.Config, update bool) ([]string, error) { |
193 | 193 |
warnings := []string{} |
194 | 194 |
|
195 |
- w, err := verifyContainerResources(&hostConfig.Resources, daemon.runAsHyperVContainer(hostConfig)) |
|
195 |
+ hyperv := daemon.runAsHyperVContainer(hostConfig) |
|
196 |
+ if !hyperv && system.IsWindowsClient() { |
|
197 |
+ // @engine maintainers. This block should not be removed. It partially enforces licensing |
|
198 |
+ // restrictions on Windows. Ping @jhowardmsft if there are concerns or PRs to change this. |
|
199 |
+ return warnings, fmt.Errorf("Windows client operating systems only support Hyper-V containers") |
|
200 |
+ } |
|
201 |
+ |
|
202 |
+ w, err := verifyContainerResources(&hostConfig.Resources, hyperv) |
|
196 | 203 |
warnings = append(warnings, w...) |
197 | 204 |
if err != nil { |
198 | 205 |
return warnings, err |
199 | 206 |
} |
200 |
- |
|
201 | 207 |
return warnings, nil |
202 | 208 |
} |
203 | 209 |
|