VMware Cloud Community
mavelite
Enthusiast
Enthusiast

Has Anyone had the -VMCpuCoreMHz variable in New-OrgVDC work?

It seems like the variable -VMCpuCoreMHz is broken when you try to use it when creating a new OrgVDC. The following error is thrown when you attempt to use it:

New-OrgVdc : Parameter set cannot be resolved using the specified named

parameters.

At C:\CreateOVDCv2.ps1:41 char:1

+ New-OrgVdc -Name $orgvDCName -AllocationModelAllocationPool

-CPUAllocationGHz $C ...

+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

~~~

    + CategoryInfo          : InvalidArgument: (:) [New-OrgVdc], ParameterBind

   ingException

    + FullyQualifiedErrorId : AmbiguousParameterSet,VMware.VimAutomation.Cloud

   .Commands.Cmdlets.NewOrgVdc

Anyone had luck using the AllocationModelAllocationPool and this variable?? The documentation seems to indicate this variable can be used for all VDC's for New-OrgVDC but when you look at set-orgvdc you get this:

"This parameter is only applicable to the Pay As You Go resource allocation model."

0 Kudos
2 Replies
mavelite
Enthusiast
Enthusiast

got this working, fairly simple after all. Order is important however, set your vCPU speed first then the guarantees otherwise setting the vCPU speed will set your guarantee to 100%

#Set the vCPU Core Speed

$orgVdc.ExtensionData.VCpuInMhz = '2400'

$orgVdc.ExtensionData.UpdateServerData()

 

#Set Org VDC CPU and Memory guarantees

Get-OrgVdc $orgvDCName | Set-OrgVdc -CpuGuaranteedPercent 5

Get-OrgVdc $orgvDCName | Set-OrgVdc -MemoryGuaranteedPercent 5

#Set the vCPU Core Speed
$orgVdc.ExtensionData.VCpuInMhz = '2400'
$orgVdc.ExtensionData.UpdateServerData()
 
#Set Org VDC CPU and Memory guarantees
Get-OrgVdc $orgvDCName | Set-OrgVdc -CpuGuaranteedPercent 5
Get-OrgVdc $orgvDCName | Set-OrgVdc -MemoryGuaranteedPercent 5
0 Kudos
RubinCompServ
Contributor
Contributor

I'm doing it this way:

$OrgVDCEx = (Get-OrgVDC 'MyOrgVDC').ExtensionData
$OrgVDCEx.VCpuInMhz = '2500'
$OrgVDCEx.UpdateServerData()

 

This works even for OrgVDCs that are configured for the Application Pool model

0 Kudos