1
0
mirror of https://github.com/rancher/os.git synced 2025-07-19 01:16:31 +00:00

Detect hypervisor and start its driver service

Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au>
This commit is contained in:
Sven Dowideit 2017-05-30 12:09:17 +10:00
parent 26939ebb7e
commit e3268e2b62
2 changed files with 10 additions and 0 deletions

View File

@ -18,6 +18,8 @@ import (
"github.com/rancher/os/log"
"github.com/rancher/os/util"
"github.com/rancher/os/util/network"
"github.com/SvenDowideit/cpuid"
)
const (
@ -303,6 +305,13 @@ func RunInit() error {
log.Error(err)
}
log.Infof("Hypervisor vendor: %s", cpuid.CPU.HypervisorName)
if cpuid.CPU.HypervisorName == "vmware" {
if err := config.Set("rancher.services_include.open-vm-tools", "true"); err != nil {
log.Error(err)
}
}
log.Debug("init, runCloudInitServices()")
if err := runCloudInitServices(cfg); err != nil {
log.Error(err)

View File

@ -53,6 +53,7 @@ github.com/vishvananda/netns 54f0e4339ce73702a0607f49922aaa1e749b418d
github.com/xeipuuv/gojsonpointer e0fe6f68307607d540ed8eac07a342c33fa1b54a
github.com/xeipuuv/gojsonreference e02fc20de94c78484cd5ffb007f8af96be030a45
github.com/xeipuuv/gojsonschema ac452913faa25c08bb78810d3e6f88b8a39f8f25
github.com/SvenDowideit/cpuid 96209a5b78b1c60a696fab3833d9ac02c74cbd39
golang.org/x/crypto 2f3083f6163ef51179ad42ed523a18c9a1141467
golang.org/x/net 991d3e32f76f19ee6d9caadb3a22eae8d23315f7 https://github.com/golang/net.git
golang.org/x/sys eb2c74142fd19a79b3f237334c7384d5167b1b46 https://github.com/golang/sys.git