Skip to content
This repository has been archived by the owner on Feb 27, 2018. It is now read-only.

Commit

Permalink
Merge pull request #288 from SvenDowideit/add-iso-path-to-b2d-info
Browse files Browse the repository at this point in the history
Report the iso path used by the vm to help debug possible support issues
  • Loading branch information
tianon committed Oct 16, 2014
2 parents 8aedb4a + 71c52c6 commit deafc19
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
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

0 comments on commit deafc19

Please sign in to comment.