diff --git a/cmds.go b/cmds.go index c13312b..3ea5875 100644 --- a/cmds.go +++ b/cmds.go @@ -329,9 +329,13 @@ func cmdInfo() error { if err != nil { return fmt.Errorf("Failed to get machine %q: %s", B2D.VM, err) } - if err := json.NewEncoder(os.Stdout).Encode(m); err != nil { + b, err := json.MarshalIndent(m, "", "\t") + if err != nil { return fmt.Errorf("Failed to encode machine %q info: %s", B2D.VM, err) } + + os.Stdout.Write(b) + return nil } diff --git a/virtualbox/machine.go b/virtualbox/machine.go index 2009d01..5b30295 100644 --- a/virtualbox/machine.go +++ b/virtualbox/machine.go @@ -161,6 +161,7 @@ func (f Flag) Get(o Flag) string { type Machine struct { Name string UUID string + Iso string State driver.MachineState CPUs uint Memory uint // main memory (in MB) @@ -355,6 +356,8 @@ func GetMachine(id string) (*Machine, error) { m.Name = val case "UUID": m.UUID = val + case "SATA-0-0": + m.Iso = val case "VMState": m.State = driver.MachineState(val) case "memory":