vSphere ‘Invalid configuration for device ‘0’ error’ Solution

Using vSphere 4 hosts (in this case a legacy un-patched host that was being migrated off and decommissioned), we came across an interesting and ambiguois error – ‘Invalid configuration for device ‘0’, plus a note of time, the target object and the vCenter Server.

In this case, I was trying to migrate a powered-off VM to different storage – resulting in the error. I also found that the issue was related to the second disk attached to the VM. Editing the VM showed the size as 0MB, but removing this disk also threw the error in vCenter.

The solution was to follow these steps:

  • Remove the VM from the vCenter inventory.
  • Update the VM VMX file. There are 2 ways to do this – SSH to the host / datastore using a tool like Putty, or use the datastore browser to download the VMX file, then edit the it in Notepad.
  • Inside the VMX file. look for the following entries:

scsi0:1.present = “true”

scsi0:1.fileName = “vmname.vmdk”

Update these entries to the following:

scsi0:1.present = “false

scsi0:1.fileName = “vmname.vmdk”

  • Re-add the VM to the vCenter inventory, either through the GUI or using ‘vmware-cmd -s register \path\to\your\vm.vmdk’.
  • Check the VM properties, you should now show the offending drive as missing and it can be re-added from the datastore.

Jeremy loves all things technology! Has been in IT for years, loves Macs (but doesn't preach to others about their virtues), loves virtualization (and does shout about it's virtues), and sometimes skis, bikes and directs amateur plays!

Comments

  1. ReMad says

    I read all solutions on the web and made me scared cause i couldnt restart Networking Services on ESX or so

    you need to power off the VM with the Problem

    vim-cmd vmsvc/getallvms – To list all the registered VM’s on a host.

    will show list of VMs with name and VMID

    vim-cmd vmsvc/reload VMID – Re-scan & refresh the vmx file.

    power it on and it will be working

    Thank god :) that saved alot of time as I had Vcenter with Network which cant be connected to and that was really annoying

  2. Kevin says

    This one made me crazy as well. It turned out that, in my case, this is caused by older VMs in an upgraded View environment. My hardware versions were HW version 8 when View was 5.2 (now 5.3). It seems as though the video card settings are not pleased by my beefy pool settings. One thing I did change on the VM, besides upgrading to HW version 10, was to set the video card settings to auto detect. I did all of that and this stupid message stopped popping up! :)

  3. bitTalker says

    This one is easy, you just need to restart the management agents
    I just did it this morning

Leave a Reply

Your email address will not be published. Required fields are marked *