1
0
mirror of https://github.com/rancher/os.git synced 2025-09-01 23:04:41 +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)