From 40a56f29e2f2e349e27d8394c5d333731fd60e00 Mon Sep 17 00:00:00 2001 From: Darren Stahl Date: Fri, 18 Nov 2016 12:34:25 -0800 Subject: [PATCH] Ensure vmcompute.dll exists during daemon start Signed-off-by: Darren Stahl (cherry picked from commit 000366f1a72a8fde2c25b4606821605780a55c02) Signed-off-by: Victor Vieux --- daemon/daemon_windows.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/daemon/daemon_windows.go b/daemon/daemon_windows.go index 257a6f3894..36f0d7fb16 100644 --- a/daemon/daemon_windows.go +++ b/daemon/daemon_windows.go @@ -24,6 +24,7 @@ import ( "github.com/docker/libnetwork/netlabel" "github.com/docker/libnetwork/options" blkiodev "github.com/opencontainers/runc/libcontainer/configs" + "golang.org/x/sys/windows" ) const ( @@ -230,6 +231,11 @@ func checkSystem() error { if osv.Build < 14393 { return fmt.Errorf("The docker daemon requires build 14393 or later of Windows Server 2016 or Windows 10") } + + vmcompute := windows.NewLazySystemDLL("vmcompute.dll") + if vmcompute.Load() != nil { + return fmt.Errorf("Failed to load vmcompute.dll. Ensure that the Containers role is installed.") + } return nil }