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:
@@ -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)
|
||||
|
Reference in New Issue
Block a user