Skip to content
This repository has been archived by the owner on Feb 8, 2021. It is now read-only.

Commit

Permalink
Merge pull request #687 from teawater/addlog
Browse files Browse the repository at this point in the history
QemuDriver.InitDriver, KvmtoolDriver.InitDriver, XenPvDriver.InitDriv…
  • Loading branch information
laijs authored Aug 2, 2018
2 parents ca31de8 + d690fe2 commit f1de9bf
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions hypervisor/kvmtool/lkvm.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ type KvmtoolContext struct {
func InitDriver() *KvmtoolDriver {
cmd, err := exec.LookPath(KVMTOOL_EXEC)
if err != nil {
glog.Errorf("LookPath %s failed: %v", KVMTOOL_EXEC, err)
return nil
}

Expand Down
4 changes: 4 additions & 0 deletions hypervisor/qemu/qemu.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,17 @@ func qemuContext(ctx *hypervisor.VmContext) *QemuContext {
func InitDriver() *QemuDriver {
cmd, err := exec.LookPath(QEMU_SYSTEM_EXE)
if err != nil {
glog.Errorf("LookPath %s failed: %v", QEMU_SYSTEM_EXE, err)
return nil
}

var hasVsock bool
_, err = exec.Command("/sbin/modprobe", "vhost_vsock").Output()
if err == nil {
glog.V(3).Infof("Current system supports vsock")
hasVsock = true
} else {
glog.V(3).Infof("Current system doesn't support vsock because modprobe vhost_vsock failed")
}

return &QemuDriver{
Expand Down
1 change: 1 addition & 0 deletions hypervisor/xenpv/xenpv.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ type XenPvContext struct {
func InitDriver() *XenPvDriver {
cmd, err := exec.LookPath(XENLIGHT_EXEC)
if err != nil {
glog.Errorf("LookPath %s failed: %v", XENLIGHT_EXEC, err)
return nil
}

Expand Down

0 comments on commit f1de9bf

Please sign in to comment.