cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
536
Views
0
Helpful
0
Replies

Error provisionning a SCVMM VM as a standard catalog item

Kral Two
Level 4
Level 4

I have configured UCS Director with a SCVMM Cloud and a standard catalog object. The goal is to provision a VM from a template existing in SCVMM.

When trying to provision this item through a new service request, it fails at this step :

VM provisioning failed with error Exception while performing vm action Error code: -1, error message: Exception while executing script: $TemplateJobGroup = [System.Guid]::NewGuid() New-SCVirtualScsiAdapter -VMMServer 10.96.0.49 -JobGroup $TemplateJobGroup -AdapterID 255 -ShareVirtualScsiA


The template VM in SCVMM is functional :

- I can deploy a VM from this template manually, through SCVMM,

- I can deploy a VM from this template using powshell.


I created a custom workflow, executing the powershell script need to deploy the VM, and it works. But obviously the result is an unmanaged item and the end user do not see the new ressource on the portal ...


Here is the code that is executed from the powershell cmd. You can see that the very first command is similar (only the SCVMM target -- localhost vs 10.0.0.49 -- is different) between UCSD Execution (failing) or Powershell task (succeeding).


My Powershell Agent connexion for SCVMM is OK.


New-SCVirtualScsiAdapter -VMMServer localhost -JobGroup 114415ce-363d-4c99-a9cd-6d84b0c12b38 -AdapterID 7 -ShareVirtualScsiAdapter $false -ScsiControllerType DefaultTypeNoType

$VMNetwork = Get-SCVMNetwork -VMMServer localhost -Name "__106-PEDA" -ID "252cbb06-727a-4721-aea5-ee37fd9216f3"

New-SCVirtualNetworkAdapter -VMMServer localhost -JobGroup 114415ce-363d-4c99-a9cd-6d84b0c12b38 -MACAddressType Dynamic -VLanEnabled $false -Synthetic -EnableVMNetworkOptimization $false -EnableMACAddressSpoofing $false -EnableGuestIPNetworkVirtualizationUpdates $false -IPv4AddressType Dynamic -IPv6AddressType Dynamic -VMNetwork $VMNetwork -DevicePropertiesAdapterNameMode Disabled

$CPUType = Get-SCCPUType -VMMServer localhost | where {$_.Name -eq "3.60 GHz Xeon (2 MB L2 cache)"}

$CapabilityProfile = Get-SCCapabilityProfile -VMMServer localhost | where {$_.Name -eq "Hyper-V"}

New-SCHardwareProfile -VMMServer localhost -CPUType $CPUType -Name "Profil42d8f564-d307-4e25-8740-7fca90987d22" -Description "Configuration matérielle temporaire utilisée pour créer un ordinateur virtuel/modèle" -CPUCount 1 -MemoryMB 1024 -DynamicMemoryEnabled $true -DynamicMemoryMinimumMB 32 -DynamicMemoryMaximumMB 8192 -DynamicMemoryBufferPercentage 20 -MemoryWeight 5000 -CPUExpectedUtilizationPercent 20 -DiskIops 0 -CPUMaximumPercent 100 -CPUReserve 0 -NumaIsolationRequired $false -NetworkUtilizationMbps 0 -CPURelativeWeight 100 -HighlyAvailable $false -DRProtectionRequired $false -SecureBootEnabled $true -SecureBootTemplate "MicrosoftWindows" -CPULimitFunctionality $false -CPULimitForMigration $false -CheckpointType Production -CapabilityProfile $CapabilityProfile -Generation 2 -JobGroup 114415ce-363d-4c99-a9cd-6d84b0c12b38

$Template = Get-SCVMTemplate -VMMServer localhost -ID "ab0aa7dc-7f2f-4902-9fd8-386d3bc0b5fd" | where {$_.Name -eq "Win2016_TPL_v1"}

$HardwareProfile = Get-SCHardwareProfile -VMMServer localhost | where {$_.Name -eq "Profil42d8f564-d307-4e25-8740-7fca90987d22"}

$OperatingSystem = Get-SCOperatingSystem -VMMServer localhost -ID "b808453f-f2b5-451f-894f-001c49db255a" | where {$_.Name -eq "Windows Server 2016 Standard"}

New-SCVMTemplate -Name "Temporary Template2c72a177-1d15-476f-8893-4849c60c7716" -Template $Template -HardwareProfile $HardwareProfile -JobGroup 297ba44b-37f2-4955-bbe5-0d0219dccd78 -ComputerName "*" -TimeZone 105  -FullName "" -OrganizationName "" -Workgroup "WORKGROUP" -AnswerFile $null -OperatingSystem $OperatingSystem

$template = Get-SCVMTemplate -All | where { $_.Name -eq "Temporary Template2c72a177-1d15-476f-8893-4849c60c7716" }

$virtualMachineConfiguration = New-SCVMConfiguration -VMTemplate $template -Name "NAMR5CKHV3MKKKY"

Write-Output $virtualMachineConfiguration

$cloud = Get-SCCloud -Name "DPOD-PEDA"

New-SCVirtualMachine -Name "NAMR5CKHV3MKKKY" -VMConfiguration $virtualMachineConfiguration -Cloud $cloud -Description "" -JobGroup "297ba44b-37f2-4955-bbe5-0d0219dccd78" -ReturnImmediately -StartAction "NeverAutoTurnOnVM" -StopAction "SaveVM"

0 Replies 0

Cisco UCS X-Series Energy Efficiency Offer