Symptoms:
Unable to find device or file /
Failed to clone a VM, error: Invalid configuration for device "0"Invalid Configuration for Device 0
Note: "Invalid configuration for device '0'" error when re-connecting VM's network adapter
.vmx
configuration file..vmx
file name:vim-cmd /vmsvc/getallvms
cd /vmfs/volumes/mydatastore/myvm
.vmx
file before making any changes by running the command:cp myvm.vmx /backup_path
.vmx
file in a text editor. For more information, see Adding/Deleting/Editing a host entry on vCenter server or ESXi host using vi editor (345284) .scsi0:x.present = "TRUE"
line and change it to scsi0:x.present = "FALSE"
for the additional virtual disk causing the error.scsi0:1.present = "FALSE"
scsi0:1.fileName = "myvm.vmdk"
scsi0:1.deviceType = "scsi-hardDisk"
scsi0:1.redo = ""
.vmx
file and exit the text editor..vmx
file without removing it from inventory, see Reloading a vmx file without removing the Virtual machine from inventory (343248) .Error: Failed to clone a VM, error: Invalid configuration for device "0"
or
The clone operation fails at 99%
This issue occurs if the hosts used in the clone process are set with UTC time and are not in sync.
To workaround this issue, adjust the time settings on the hosts.
Scenario 4 - vCenter has lost network connectivity.
Error: When reconfiguring the vCenter or any other virtual machine, the error is 'Invalid configuration for device '0'"
To resolve this issue, you can follow vCenter network connectivity lost - Recover vCenter network when connected to a Distributed Switch
In the symptoms above:
device "0"
and
DVPort 542
You can determine which port group the DV port belongs to by correlating the number, in case 542, to the portKey in vpxa
<YYYY-MM-DD>T<HH:MM:SS>Z Er(163) Vpxa[opID]: --> device = (vim.vm.device.VirtualVmxnet3) {
<YYYY-MM-DD>T<HH:MM:SS>Z Er(163) Vpxa[opID]: --> dynamicProperty = <unset>,
<YYYY-MM-DD>T<HH:MM:SS>Z Er(163) Vpxa[opID]: --> key = 3541,
<YYYY-MM-DD>T<HH:MM:SS>Z Er(163) Vpxa[opID]: --> deviceInfo = (vim.Description) {
<YYYY-MM-DD>T<HH:MM:SS>Z Er(163) Vpxa[opID]: --> label = "Network adapter 2",
<YYYY-MM-DD>T<HH:MM:SS>Z Er(163) Vpxa[opID]: --> summary = "DVSwitch: XX XX XX XX XX XX XX XX-XX XX XX XX XX XX XX XX"
<YYYY-MM-DD>T<HH:MM:SS>Z Er(163) Vpxa[opID]: --> },
<YYYY-MM-DD>T<HH:MM:SS>Z Er(163) Vpxa[opID]: --> backing = (vim.vm.device.VirtualEthernetCard.DistributedVirtualPortBackingInfo) {
<YYYY-MM-DD>T<HH:MM:SS>Z Er(163) Vpxa[opID]: --> port = (vim.dvs.PortConnection) {
<YYYY-MM-DD>T<HH:MM:SS>Z Er(163) Vpxa[opID]: --> switchUuid = "b0 1a 38 50 b0 05 61 04-2a ad 48 5e 55 ae 51 5a",
<YYYY-MM-DD>T<HH:MM:SS>Z Er(163) Vpxa[opID]: --> portgroupKey = "dvportgroup-XXXX",
<YYYY-MM-DD>T<HH:MM:SS>Z Er(163) Vpxa[opID]: --> portKey = "542",
<YYYY-MM-DD>T<HH:MM:SS>Z Er(163) Vpxa[opID]: --> connectionCookie = 234125
<YYYY-MM-DD>T<HH:MM:SS>Z Er(163) Vpxa[opID]: --> }
<YYYY-MM-DD>T<HH:MM:SS>Z Er(163) Vpxa[opID]: --> },
Device "0" will also be the 1st device in the config spec list. Each device will start with the following:
<YYYY-MM-DD>T<HH:MM:SS>Z Er(163) Vpxa[opID]: --> deviceChange = (vim.vm.device.VirtualDeviceSpec) [
<YYYY-MM-DD>T<HH:MM:SS>Z Er(163) Vpxa[opID]: --> (vim.vm.device.VirtualDeviceSpec) {