summaryrefslogtreecommitdiff
path: root/hypervisior.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2024-10-11 23:18:45 -0500
committerJeff Carr <[email protected]>2024-10-11 23:18:45 -0500
commit3636bc167090ede51f1edb1ac3f82ba0bbe1808f (patch)
tree2e31d2b0b418f075361c1761524b59aba7611e14 /hypervisior.go
parente35b47fd5f098be0a7a9c4615cd1e7858251ae99 (diff)
persistant and dumps out vms
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'hypervisior.go')
-rw-r--r--hypervisior.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/hypervisior.go b/hypervisior.go
index 02ee539..e338889 100644
--- a/hypervisior.go
+++ b/hypervisior.go
@@ -22,7 +22,8 @@ import (
"github.com/digitalocean/go-qemu/qemu"
)
-func poolHypervisor(hv *hypervisor.Hypervisor) {
+func poolHypervisor(hv *hypervisor.Hypervisor) string {
+ var out string
// fmt.Printf("\n**********Domains**********\n")
domains, err := hv.Domains()
if err != nil {
@@ -57,10 +58,13 @@ func poolHypervisor(hv *hypervisor.Hypervisor) {
}
if status == qemu.StatusRunning {
fmt.Println("ON ", name, drives)
+ out += "ON " + name + "\n"
} else {
fmt.Println("OFF", status, name, drives)
+ out += "OFF " + name + "\n"
}
}
+ return out
}
func displayBlockDevices(domain *qemu.Domain) {