github.com/niedbalski/juju@v0.0.0-20190215020005-8ff100488e47/container/kvm/run.go (about) 1 // Copyright 2016 Canonical Ltd. 2 // Licensed under the AGPLv3, see LICENCE file for details. 3 4 package kvm 5 6 import "github.com/juju/utils" 7 8 // This is the user on ubuntu. I don't know what the user would be on other 9 // linux distros. At the time of this writing we are only supporting ubuntu on 10 // ubuntu for kvm containers in Juju. 11 const libvirtUser = "libvirt-qemu" 12 13 // runFunc provides the signature for running an external command and returning 14 // the combined output. 15 type runFunc func(string, ...string) (string, error) 16 17 // run the command and return the combined output. 18 func run(command string, args ...string) (output string, err error) { 19 logger.Debugf("%s %v", command, args) 20 output, err = utils.RunCommand(command, args...) 21 logger.Debugf("output: %v", output) 22 return output, err 23 }