After upgrading VMware Tools on a RedHat OpenShift container virtual machine (VM), the VM is unable to locate its OS disk. The following log entry is observed:
Copy of file or directory [Datastore] VM-name/VM-name.vmdk from Datastore to Datastore as [Datastore] VM-name/VM-name.vmdk was initiated from '##/##.##.##@##.##.##.##' and completed with status 'Failure'.
RedHat OpenShift containerized nodes occasionally recreate their OS disk from an immutable template image. The containerized node has a reference to the template that produced it, which results in the VM attempting to use a VMDK from a path that no longer exists. When VMware Tools is upgraded, the VM may fail to resolve this path, causing the VM to be unable to locate the OS disk.
According to RedHat, the _spec.providerSpec.value.template_field is immutable once a virtual machine is created, meaning it cannot be modified directly. There are two potential fixes:
1. Delete the Virtual Machine:
Delete the VM and allow the cluster to recreate it from the correct template. This will resolve the issue by pointing the VM to a valid and existing VMDK.
2. Patch the MachineSet with a New Template:
Update the MachineSet to reference the newer template.
Scale down the MachineSet to remove the outdated node(s).
Scale up the MachineSet to recreate the node(s) with the updated template.
Both methods will ensure the VM is re-referenced correctly and the OS disk is located as expected.