@@ -44,7 +44,7 @@ type Instance struct {
4444 Networks []limayaml.Network `json:"network,omitempty"`
4545 SSHLocalPort int `json:"sshLocalPort,omitempty"`
4646 HostAgentPID int `json:"hostAgentPID,omitempty"`
47- QemuPID int `json:"qemuPID ,omitempty"`
47+ DriverPID int `json:"driverPID ,omitempty"`
4848 Errors []error `json:"errors,omitempty"`
4949}
5050
@@ -121,19 +121,19 @@ func Inspect(instName string) (*Instance, error) {
121121 }
122122 }
123123
124- inst .QemuPID , err = ReadPIDFile (filepath .Join (instDir , filenames .QemuPID ))
124+ inst .DriverPID , err = ReadPIDFile (filepath .Join (instDir , filenames .PIDFile ( * y . VMType ) ))
125125 if err != nil {
126126 inst .Status = StatusBroken
127127 inst .Errors = append (inst .Errors , err )
128128 }
129129
130130 if inst .Status == StatusUnknown {
131- if inst .HostAgentPID > 0 && inst .QemuPID > 0 {
131+ if inst .HostAgentPID > 0 && inst .DriverPID > 0 {
132132 inst .Status = StatusRunning
133- } else if inst .HostAgentPID == 0 && inst .QemuPID == 0 {
133+ } else if inst .HostAgentPID == 0 && inst .DriverPID == 0 {
134134 inst .Status = StatusStopped
135- } else if inst .HostAgentPID > 0 && inst .QemuPID == 0 {
136- inst .Errors = append (inst .Errors , errors .New ("host agent is running but qemu is not" ))
135+ } else if inst .HostAgentPID > 0 && inst .DriverPID == 0 {
136+ inst .Errors = append (inst .Errors , errors .New ("host agent is running but driver is not" ))
137137 inst .Status = StatusBroken
138138 } else {
139139 inst .Errors = append (inst .Errors , fmt .Errorf ("%s driver is running but host agent is not" , inst .VMType ))
0 commit comments