You could use Code Capture and add a harddisk with the Web Client, that should show you which API methods and parameters the client uses.
Another option is to look in the vpxd log, with verbose logging turned on, and check if there differences between the methods called from the New-Harddisk cmdlet and from the Web Client.
You could also have a look in the vmware.log of the target VM if there are any calls made via VMware Tools to the guest OS.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Does the new disk show up in the Hardware Browser?
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
I'm sorry - I don't know what the hardware browser is. How do I check that?
I manually added a disk in the web client, and that worked as expected.
The Hardware Browser is a package (hwbrowser) for CentOS accessible via System/Administrator/Hardware Brwoser.
Not sure how the Web client does this, but when adding a new disk, with New-Harddisk, to a VM that runs CentOS 7.*, I normally have to do
partprobe
pvcreate /dev/sdb(x)
pvdisplay
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Thanks. hwbrowser requires kudzu which is no longer available since CentOS 5, so I can't install it. I can see the new disk with Get-HardDisk and when I look at the VM's directory on its host's datastore. When I look in the web client for the VM configuration, it's not there.
Regarding partprobe - exactly. partprobe finds the new disk device /dev/sdx, but in my case New-HardDisk isn't creating /dev/sdx and appears not to touch the OS. So though Get-HardDisk can see the additional disk, the OS can't.
Is there additional logging or a verbose setting we can use with New-HardDisk?
You could use Code Capture and add a harddisk with the Web Client, that should show you which API methods and parameters the client uses.
Another option is to look in the vpxd log, with verbose logging turned on, and check if there differences between the methods called from the New-Harddisk cmdlet and from the Web Client.
You could also have a look in the vmware.log of the target VM if there are any calls made via VMware Tools to the guest OS.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Pilot error. I was using the wrong VM name. Thanks for your speedy responses!