@@ -225,8 +225,8 @@ func adjustGuestClock(h hostRunner, t time.Time) error {
225
225
return err
226
226
}
227
227
228
- // TrySSHPowerOff runs the poweroff command on the guest VM to speed up deletion
229
- func TrySSHPowerOff (h * host.Host ) error {
228
+ // trySSHPowerOff runs the poweroff command on the guest VM to speed up deletion
229
+ func trySSHPowerOff (h * host.Host ) error {
230
230
s , err := h .Driver .GetState ()
231
231
if err != nil {
232
232
glog .Warningf ("unable to get state: %v" , err )
@@ -254,8 +254,8 @@ func StopHost(api libmachine.API) error {
254
254
out .T (out .Stopping , `Stopping "{{.profile_name}}" in {{.driver_name}} ...` , out.V {"profile_name" : cfg .GetMachineName (), "driver_name" : host .DriverName })
255
255
if host .DriverName == constants .DriverHyperv {
256
256
glog .Infof ("As there are issues with stopping Hyper-V VMs using API, trying to shut down using SSH" )
257
- if err := TrySSHPowerOff (host ); err != nil {
258
- return errors .Wrapf (err , "Unable to Power off cluster on %q using SSH" , host . DriverName )
257
+ if err := trySSHPowerOff (host ); err != nil {
258
+ return errors .Wrap (err , "ssh power off" )
259
259
}
260
260
}
261
261
@@ -277,8 +277,8 @@ func DeleteHost(api libmachine.API) error {
277
277
}
278
278
// This is slow if SSH is not responding, but HyperV hangs otherwise, See issue #2914
279
279
if host .Driver .DriverName () == constants .DriverHyperv {
280
- if err := TrySSHPowerOff (host ); err != nil {
281
- return errors . Wrap ( err , "Unable to power off minikube because the host was not found." )
280
+ if err := trySSHPowerOff (host ); err != nil {
281
+ glog . Infof ( "Unable to power off minikube because the host was not found." )
282
282
}
283
283
}
284
284
0 commit comments