When I try to add a new Harddisk to a VM with the New-Harddisk cmdlet to a Windows Server 2008 VM, i get the following error:
New-HardDisk : 1/18/2010 2:59:48 PM New-HardDisk B8EDFDDF-ACF6-43AC-B111-51D332290FC7 The operation for the entity vm-315 failed with the following message: "Number of virtual devices exceeds the maximum for a given controller."
At line:1 char:13
+ new-harddisk <<<< -vm $vm[5] -capacityKB 4194304
+ CategoryInfo : InvalidArgument: (vm-315:String) ,ViError
+ FullyQualifiedErrorId : Client20_TaskServiceImpl_CheckServerSideTaskUpdates_OperationFailed,VMware.VimAutomation.Commands.NewHardDisk
When I assign a different controller to the VM, e.g. the LSI Logic Parallel, there isn't a problem at all. When I add extra disks using the VI Client, there is also no problem, regardless of the SCSI controller I use.
Anyone had this problem as well? Is there a known fix?
Hi rengelen,
I admit I've been quite murky regarding when the fix will be available. The thing is that VMware has a policy that employees shouldn't mention release timeframes unless we're 100% certain we can keep the promise. Hence statemens like "will be available in a future release"
Are you actually using 15 devices on that VM? The vSphere Client will automatically create new SCSI controllers when one is full. PowerCLI doesn't do that.
=====
Carter Shanklin
Read the PowerCLI Blog
[Follow me on Twitter|http://twitter.com/cshanklin]
Hey c_shanklin,
Thnx for the reply but I don't think the number of devices is my problem here, I'm not even getting near 15 devices, the problem already pops up with adding a second disk to a VM with the LSI Logic SAS controller. And as I mentioned before, when I use the "LSI Logic Parallel" instead of the "LSI Logic SAS" controller, there isn't a problem at all...
Hi rengelen,
Can you confirm that in the situation in which New-Harddisk fails, vSphere Client successfully adds a disk with the same parameters? I'm asking this question to locate the cause of the issue (PowerCLI vs. VC).
Hi,
I tried to do the same at my end, it worked successfully with VC version 4.0.0, build 162856 and ESX version4.0.0, build 164009.
If possible try to create a VM with VI client having LSI Logic SAS controller and add new hard disk to it via PowerCLI script. Does it give same error?
I get this same error on VM's (Guest OS irrelevant) that I have configured to use VMWare Paravirtual SCSI controller.
The command runs fine when using the "LSI logic Parallel" or "BusLogic Parallel" controller.
It fails when "VMWare Paravirtual" or "LSI Logic SAS" are used with the following message:
New-HardDisk : 2/9/2010 11:03:30 AM New-HardDisk The operation for the en
tity vm-##### failed with the following message: "Number of virtual devices exceeds the maximum for a given controller.
"
At line:1 char:33
++ get-vm testvm | New-HardDisk <<<< -CapacityKB 5242880+
++ CategoryInfo : InvalidArgument: (vm-37527:String) , ViError+
++ FullyQualifiedErrorId : Client20_TaskServiceImpl_CheckServerSideTaskUpdates_OperationFailed,VMware.VimAutomation+
.Commands.NewHardDisk
Configuration:
VM Hardware Version 7
vCenter 4.0 U1
ESX 4.0 U1
Powershell 2.0
PowerCLI 4.0 U1
K. Chris Nakagaki (Zsoldier)
Message was edited by: Zsoldier
Hi Zsoldier,
Can you try the equivalent of the failing action in vSphere Client and tell me whether it succeeds or it fails like the cmdlet? The answer will help locate the cause of the issue (PowerCLI vs. VC).
Thanks,
Andrey
It succeeds when I do the same in the VC client GUI. It's a cmdlet error.
Also of note, the VM I was working against only had one vmdk.
K. Chris Nakagaki (Zsoldier)
Message was edited by: Zsoldier
Zsoldier, thank you for your help.
All, I have filed the problem with high priority for investigation by the development team. Thank you for taking the time to report it.
The investigation showed that PowerCLI 4.0 U1 does not support the "VMWare Paravirtual" or "LSI Logic SAS" controllers. This is a bug. It has been fixed already and the fix will be available in a future release.
Hi Andrey,
Thanks for the investigation, do you know when this next release for PowerCLI is available? We currently have to use some workarounds for Windows Server 2008 VM's since the LSI Logic SAS controller is the default controller for this guest OS...
Hi rengelen,
I admit I've been quite murky regarding when the fix will be available. The thing is that VMware has a policy that employees shouldn't mention release timeframes unless we're 100% certain we can keep the promise. Hence statemens like "will be available in a future release"
Hi, any news on a fix for this?, I'm getting the same error and it's a big problem since we are trying to automate our deploys 100%
regards
/Mikael
Add me to the list of people impacted by this bug. Our VM deployments are pretty much 100% automated except this, so I'd definitely like to see this bug addressed.