Creating a virtual machine in VMware vSphere ESXi 6.0 fails with the error: Invalid operation for device '4'.
search cancel

Creating a virtual machine in VMware vSphere ESXi 6.0 fails with the error: Invalid operation for device '4'.

book

Article ID: 340172

calendar_today

Updated On:

Products

VMware vCenter Server VMware vSphere ESXi

Issue/Introduction

Symptoms:
When you create a new virtual machine in VMware vSphere ESXi 6.0, you experience these symptoms:
  • You see the error:

    Invalid operation for device '4'.
     
  • In the /var/log/vpxa.log file of the host, you see entries similar to:

    2015-07-23T00:14:50.077Z info vpxa[4ED14B70] [Originator@6876 sub=Default opID=EA28A43A-00028505-a5-36-80] [VpxLRO] -- ERROR task-103 -- vpxa -- vpxapi.VpxaService.createVm: vim.fault.InvalidDeviceOperation:

    -> Result:
    --> (vim.fault.InvalidDeviceOperation) {
    --> faultCause = (vmodl.MethodFault) null,
    --> property = "virtualDevice.backing",
    --> deviceIndex = 4,
    --> badOp = <unset>,
    --> badFileOp = "create",
    --> msg = "Invalid operation for device '4'."
     
  • In the /var/log/hostd.log file of the host, you see entries similar to:

    2015-07-23T00:14:49.876Z info hostd[FFD40B70] [Originator@6876 sub=Vmsvc opID=EA28A43A-00028505-a5-36-80-8679 user=vpxuser:VSPHERE.LOCAL\Administrator] CreateVm: Path is not on object datastore ([]/vmfs/volumes/5252cdac-d9b13f3f-a93c-0050560304da/VirtualMachineName/VirtualMachineName.vmx)
    2015-07-23T00:14:49.956Z error hostd[FFA30A70] [Originator@6876 sub=Hbrsvc] Failed to retrieve VM config (id=5)
    2015-07-23T00:14:49.956Z error hostd[FFA30A70] [Originator@6876 sub=Hbrsvc] Replicator: VmReconfig failed to retrieve replication config for VM 5, ignoring: vim.fault.ReplicationVmConfigFault
    2015-07-23T00:14:49.958Z info hostd[FFD40B70] [Originator@6876 sub=Vmsvc.vm:/vmfs/volumes/5252cdac-d9b13f3f-a93c-0050560304da/VirtualMachineName/VirtualMachineName.vmx opID=EA28A43A-00028505-a5-36-80-8679 user=vpxuser:VSPHERE.LOCAL\Administrator] Storage policy for disk '/vmfs/volumes/5252cdac-d9b13f3f-a93c-0050560304da/VirtualMachineName/VirtualMachineName.vmdk' not specified.
    2015-07-23T00:14:49.958Z error hostd[FFD40B70] [Originator@6876 sub=Vmsvc.vm:/vmfs/volumes/5252cdac-d9b13f3f-a93c-0050560304da/VirtualMachineName/VirtualMachineName.vmx OpID=EA28A43A-00028505-a5-36-80-8679 user=vpxuser:VSPHERE.LOCAL\Administrator] ConfigRules validation failed for key-value pair {'scsi0:0.fileName', '/vmfs/volumes/5252cdac-d9b13f3f-a93c-0050560304da/VirtualMachineName/VirtualMachineName.vmdk'}
    2015-07-23T00:14:49.958Z info hostd[FFD40B70] [Originator@6876 sub=Vimsvc.ha-eventmgr opID=EA28A43A-00028505-a5-36-80-8679 user=vpxuser:VSPHERE.LOCAL\Administrator] Event 114 : Cannot create virtual disk []/vmfs/volumes/5252cdac-d9b13f3f-a93c-0050560304da/VirtualMachineName/VirtualMachineName.vmdk
    2015-07-23T00:14:49.959Z info hostd[FFD40B70] [Originator@6876 sub=Vmsvc.vm:/vmfs/volumes/5252cdac-d9b13f3f-a93c-0050560304da/VirtualMachineName/VirtualMachineName.vmx opID=EA28A43A-00028505-a5-36-80-8679 user=vpxuser:VSPHERE.LOCAL\Administrator] Reconfigure failed: vim.fault.InvalidDeviceOperation 505-a5-36-80-8679 user=vpxuser:VSPHERE.LOCAL\Administrator] Create failed with given spec: /vmfs/volumes/5252cdac-d9b13f3f-a93c-0050560304da/VirtualMachineName/VirtualMachineName.vmx
    --> (vim.vm.ConfigSpec) {
    --> changeVersion = <unset>,
    --> name = "VirtualMachineName",


Environment

VMware vCenter Server 6.0.x
VMware vSphere ESXi 6.0

Cause

This issue occurs when the scratch location for the host is configured as the root of the local datastore with virtual machines running on the the datastore.

Resolution

Configuring a VMware vSphere ESXi host scratch partition to the root of its local datastore is not recommended.
 
To resolve this issue, set the scratch location of the host to a sub-directory within the VMware vSphere ESXi host's local datastore. For more information, see Creating a persistent scratch location for ESXi 4.x/5.x/6.0 (1033696).

Additional Information

Creating a persistent scratch location for ESXi 4.x/5.x/6.x
VMware vSphere ESXi 6.0 で仮想マシンを作成すると次のエラーで失敗する デバイス「4」の無効な操作です。