diff --git a/simulator/container_virtual_machine.go b/simulator/container_virtual_machine.go index a2b91fd86..a44ad8b97 100644 --- a/simulator/container_virtual_machine.go +++ b/simulator/container_virtual_machine.go @@ -131,7 +131,7 @@ func (svm *simVM) syncNetworkConfigToVMGuestProperties() error { } func (svm *simVM) prepareGuestOperation(auth types.BaseGuestAuthentication) types.BaseMethodFault { - if svm != nil && (svm.c == nil || svm.c.id == "") { + if svm == nil || svm.c == nil || svm.c.id == "" { return new(types.GuestOperationsUnavailable) }