Symptoms

Hyper-V task to autoprovision a new VDS fails with:

Task name   APS application 'Microsoft Hyper-V', id 107, instance 597 -> service 'ddc_membership_vm', instance 1049: executing configuration script
Execution of configuration script for instance with id 1049 of service with id ddc_membership_vm of instance with id 597 of application with id 107 failed - returned value: -1 output: '' errors: 'Failed to create VM: New-VM : VMM cannot complete the Hyper-V operation on the hyperv0001.vds.cloud
server because of the error: 'Subscription #1004235' failed to add device 'Microsoft Virtual Hard Disk'. (Virtual machine ID 60D418C7-940A-48C6-B54E-F6229CCD5C60)
'Subscription #1004235': User account does not have permission required to open attachment 'C:\ClusterStorage\Volume6\Subscription #1004235\W2K8R2X64SP1STD_di
sk_1.vhd'. Error: 'General access denied error' (0x80070005). (Virtual machine ID 60D418C7-940A-48C6-B54E-F6229CCD5C60) (Error ID: 12700, Detailed Error: Unknown error (0x8001))

Resolve the issue in Hyper-V and then try the operation again.

To restart the job, run the following command:
PS> Restart-Job -Job (Get-VMMServer 10.20.29.90 | Get-Job | where { $_.ID -eq "{fe6511b7-a217-4d4f-89df-08e613b8e626}"})
At C:\Program Files (x86)\SWsoft\PEM\APS\instances\597\scripts\createVM.ps1:414
char:9
+ New-VM <<<< -Template "$VMTemplate" -Name "$VMName" -Owner "$VMOwner" `
+ CategoryInfo : ReadError: (:) [New-VM], CarmineException
+ FullyQualifiedErrorId : 12700,Microsoft.SystemCenter.VirtualMachineManager.Cmdlets.NewVmCmdlet

Cause

Incorrect credentials were used when this task was set to execute on the Hyper-V server.

Resolution

Locate the Hyper-V server in SCVMM console, go to Properties > Credentials and ensure that the correct credentials for pem_admin user are specified

Internal content