Virt-controller crashes with "panic: runtime error: invalid memory address or nil pointer dereference" in OpenShift Virtualization

Solution Verified - Updated -

Issue

The virt-controller pods fail to start and enter a CrashLoopBackOff state. The logs for the virt-controller show a panic stack trace indicating an invalid memory address.

panic: runtime error: invalid memory address or nil pointer dereference [recovered]
...
kubevirt.io/kubevirt/pkg/virt-controller/watch/vm.patchVMRevision(...)
    /remote-source/app/pkg/virt-controller/watch/vm/vm.go:1644
kubevirt.io/kubevirt/pkg/virt-controller/watch/vm.(*Controller).createVMRevision(...)
    /remote-source/app/pkg/virt-controller/watch/vm/vm.go:1811
...

Environment

  • Red Hat OpenShift Container Platform
    • 4.19
    • 4.20
  • Red Hat OpenShift Virtualization
    • 4.19
    • 4.20

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content