From 2c5382ba981217ef751649302ad15ecd493a6e90 Mon Sep 17 00:00:00 2001
From: Anders F Björklund <anders.f.bjorklund@gmail.com>
Date: Wed, 22 Sep 2021 12:29:24 +0200
Subject: Show cpus and memory in machine list
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

[NO TESTS NEEDED]

Signed-off-by: Anders F Björklund <anders.f.bjorklund@gmail.com>
---
 pkg/machine/config.go       | 2 ++
 pkg/machine/qemu/machine.go | 2 ++
 2 files changed, 4 insertions(+)

(limited to 'pkg')

diff --git a/pkg/machine/config.go b/pkg/machine/config.go
index 8db2335aa..583eacbaa 100644
--- a/pkg/machine/config.go
+++ b/pkg/machine/config.go
@@ -58,6 +58,8 @@ type ListResponse struct {
 	LastUp    time.Time
 	Running   bool
 	VMType    string
+	CPUs      uint64
+	Memory    uint64
 }
 
 type SSHOptions struct {
diff --git a/pkg/machine/qemu/machine.go b/pkg/machine/qemu/machine.go
index b9b66c123..281a8b7a9 100644
--- a/pkg/machine/qemu/machine.go
+++ b/pkg/machine/qemu/machine.go
@@ -574,6 +574,8 @@ func GetVMInfos() ([]*machine.ListResponse, error) {
 
 			listEntry.Name = vm.Name
 			listEntry.VMType = "qemu"
+			listEntry.CPUs = vm.CPUs
+			listEntry.Memory = vm.Memory
 			fi, err := os.Stat(fullPath)
 			if err != nil {
 				return err
-- 
cgit v1.2.3-54-g00ecf