diff --git a/controllers/oscmachine_controller.go b/controllers/oscmachine_controller.go index eaaac0b29..78e0d0ee2 100644 --- a/controllers/oscmachine_controller.go +++ b/controllers/oscmachine_controller.go @@ -330,6 +330,10 @@ func (r *OscMachineReconciler) reconcile(ctx context.Context, machineScope *scop conditions.MarkTrue(oscmachine, infrastructurev1beta1.VolumeReadyCondition) vmState := machineScope.GetVmState() + if vmState == nil { + machineScope.V(2).Info("VmState is not yet availablle") + return ctrl.Result{}, nil + } switch *vmState { case infrastructurev1beta1.VmStatePending: