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

Commit deafc19

Browse files
committed
Merge pull request #288 from SvenDowideit/add-iso-path-to-b2d-info
Report the iso path used by the vm to help debug possible support issues
2 parents 8aedb4a + 71c52c6 commit deafc19

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

cmds.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -329,9 +329,13 @@ func cmdInfo() error {
329329
if err != nil {
330330
return fmt.Errorf("Failed to get machine %q: %s", B2D.VM, err)
331331
}
332-
if err := json.NewEncoder(os.Stdout).Encode(m); err != nil {
332+
b, err := json.MarshalIndent(m, "", "\t")
333+
if err != nil {
333334
return fmt.Errorf("Failed to encode machine %q info: %s", B2D.VM, err)
334335
}
336+
337+
os.Stdout.Write(b)
338+
335339
return nil
336340
}
337341

virtualbox/machine.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,7 @@ func (f Flag) Get(o Flag) string {
161161
type Machine struct {
162162
Name string
163163
UUID string
164+
Iso string
164165
State driver.MachineState
165166
CPUs uint
166167
Memory uint // main memory (in MB)
@@ -355,6 +356,8 @@ func GetMachine(id string) (*Machine, error) {
355356
m.Name = val
356357
case "UUID":
357358
m.UUID = val
359+
case "SATA-0-0":
360+
m.Iso = val
358361
case "VMState":
359362
m.State = driver.MachineState(val)
360363
case "memory":

0 commit comments

Comments
 (0)