Skip to content
This repository was archived by the owner on Feb 27, 2018. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion cmds.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down
3 changes: 3 additions & 0 deletions virtualbox/machine.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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":
Expand Down