Unknown CPI error 'Unknown' with message 'undefined method `datastore' for #<VimSdk::Vim::Vm::Device::VirtualCdrom::RemotePassthroughBackingInfo:0x0000560d4a903f28>' OSH fails to attach persistent disk during upgrades. "Apply Changes" fails and errors out with: Task 2395646 | 05:37:01 | Updating instance worker: worker/1aa8a864-6b0c-4e73-b712-6a7662e71184 (14) (00:03:32) L Error: Unknown CPI error 'Unknown' with message 'undefined method `datastore' for #VimSdk::Vim::Vm::Device::VirtualCdrom::RemotePassthroughBackingInfo:0x0000560d4a903f28>' in 'detach_disk' CPI method (CPI request ID: 'cpi-277333') Task 2395646 | 05:40:33 | Error: Unknown CPI error 'Unknown' with message 'undefined method `datastore' for #VimSdk::Vim::Vm::Device::VirtualCdrom::RemotePassthroughBackingInfo:0x0000560d4a903f28>' in 'detach_disk' CPI method (CPI request ID: 'cpi-277333')
During upgrades, the Virtual Machines (VMs) gets restarted. While the VMs restart, BOSH checks for persistent disk on certain VMs. When the disk is not attached to the CD-ROM in vCenter, it fails.
In some cases, attempting to move a server to maintenance mode fails if the CD-ROM has an env.iso file attached. To get around this you need to manually detach the env.iso file. However, this workaround is temporary and this issue will reoccur the next time BOSH tries to rebuild the VMs during an upgrade.
Below is an image to show the task when the VM is reconfigured in vCenter.
<VM-CID>/env.iso
" for affected VMs.bosh instances --details | grep worker/1aa8a864-6b0c-4e73-b712-6a7662e71184
"<VM-CID>/env.iso
" file from the list that corresponds to the VM. If you cannot find the env.iso file inside the VM folder, shutdown the VM from the vSphere UI and let BOSH resurrector recreate the unresponsive VM. If BOSH resurrector is not enabled in BOSH director tile, run the command bosh -d <deployment> cck against the deployment where is located the VM and choose to recreate the unresponsive VM.bosh instances
command.