...
Cloning a powered on virtual machine from one data center to another fails with the error message: Unable to find device or file / Failed to clone a VM, error: Invalid configuration for device "0"A virtual machine not powered down during a datastore re-signature fails with the error message: Invalid Configuration for Device 0Cannot connect a virtual machine's virtual NIC (vNIC) to a vSphere Distributed Switch (vDS) portgroup after performing a vMotion.Trying to connect the vNIC to a vDS portgroup after migration to the new ESXi host fails. In the /var/log/ hostd.log file, you see the entries similar to: <YYYY-MM-DD>T<time>.783Z [39282B70 verbose 'Hostsvc.NetworkProvider' opID=16d8c9f2-e3 user=vpxuser] DVPort 542 on dvs b0 1a 38 50 b0 05 61 04-2a ad 48 5e 55 ae 51 5a not found <YYYY-MM-DD>T<time></time>.783Z [39282B70 error 'Vmsvc.vm:/vmfs/volumes/547e2d16-3f592880-f6ae-0025b3a4b008/VM Folder/VM Name.vmx' opID=16d8c9f2-e3 user=vpxuser] Device spec doesn't match up with dvport/dvpg configuration </time> Note: The preceding log excerpts are only examples. Date, time, and environmental variables may vary depending on your environment.
This issue may occur for one of the following reasons: If virtual machine configuration differs from the vCenter Server database records for the virtual machine.If an invalid port group is selected for one of the network cards in the virtual machine.If the temporary disks created during the clone operation (which are not physically present) are not removed after the operation. For example, if you have two hard disks in the original virtual machine, on the new virtual machine you may have one additional disk which is unavailable if viewing from the Edit Settings screen for the virtual machine in the VI Client or vSphere Client. When the vCenter Server database does not match the virtual machine settings.Cloning operation fails at 99% or Cloning the virtual machine fails with the error: Failed to clone a VM, error: Invalid configuration for device "0"
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/getallvmsNavigate 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"orThe 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 PropertiesManually 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.
Enabling a virtual NIC for a virtual machine in a vDS portgroup fails with error: Invalid configuration for device '0' (2014469).Editing files on an ESX host using vi or nanoReloading a vmx file without removing the virtual machine from inventoryEnabling a virtual NIC for a virtual machine in a vDS portgroup after a storage migration fails with the error: Invalid configuration for device '0'仮想マシンのパワー オンが次のエラーで失敗する:デバイス 0 では無効な構成です(Invalid Configuration for Device 0)打开虚拟机电源失败,并出现以下错误:“设备 0 的配置无效 (Invalid Configuration for Device 0)”