Scenario 1 - An invalid port group selection
To resolve this issue, ensure that a valid port group is selected for the network cards of a virtual machine.
- Connect vSphere Client to the vCenter Server.
- Right-click the virtual machine and select Edit Settings.
- Select the Network Card and change the Port Group settings to a different Port Group and click OK.
- Change the Port Group of the virtual machine back to the original Port Group and click OK.
Note: "Invalid configuration for device '0'" error when re-connecting VM's network adapter
Scenario 2 - Disks created during clone operations
To resolve this issue, manually remove the temporary disk entries from the .vmx
configuration file.
To remove the additional disk:
- Run this command to determine the path of the virtual machine and
.vmx
file name:
vim-cmd /vmsvc/getallvms
- Navigate to the virtual machine folder found from output of step 1.
For example:
cd /vmfs/volumes/mydatastore/myvm
- Backup the
.vmx
file before making any changes by running the command:
cp myvm.vmx /backup_path
- Open the
.vmx
file in a text editor. For more information, see Editing files on an ESX host using vi or nano (1020302) . - Locate the
scsi0:x.present = "TRUE"
line and change it to scsi0:x.present = "FALSE"
for the additional virtual disk causing the error.
Example:
After editing, the entries look similar to:
scsi0:1.present = "FALSE"
scsi0:1.fileName = "myvm.vmdk"
scsi0:1.deviceType = "scsi-hardDisk"
scsi0:1.redo = ""
- Save the changes to the
.vmx
file and exit the text editor. - For these changes to take effect in vCenter Server, right-click the virtual machine and click Remove from Inventory.
- Re-register the virtual machine by running this command:
In ESX/ESXi 4.x:
vmware-cmd -s register /vmfs/volumes/mydatastore/myvm/myvm.vmx
ESXi 5.x onward:
vim-cmd solo/registervm /vmfs/volumes/datastore_name/VM_directory/VM_name.vmx
Note: To reload the virtual machine's .vmx
file without removing it from inventory, see Reloading a vmx file without removing the Virtual machine from inventory (1026043) .
- Right-click the virtual machine in the vSphere Client and click Edit settings. Verify that the offending disk is not available. You can then switch the controller value for the existing disk to 0:1 to achieve consistency.
- If any virtual machines are observed with question marks, power on and select the virtual machine and click the Summary tab.
- If you are prompted to create new uuid (or copy it if you are using the vSphere Client), click Yes.
The virtual machine will now power on without the errors or question mark.
Scenario 3 - Cloning a virtual machine fails
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.
- Connect to vCenter Server via the vSphere Client.
- Select a host and click the Configuration tab.
- Click Time Configuration under Software.
- Click Properties
- Manually adjust the time so that it is correct and is in sync with the other hosts in the environment.
- Repeat Steps 2 to 5 on all hosts involved in the cloning process.