Creating a VM with customization(answer file) with the Powershell cmdlets v2.0 | Nutanix Community
Skip to main content

Hello,

With the Nutanix Powershell v1.0 cmdlets, I was able to use a customization file:

$VMCustomizationFile = "adsf:///Transfer/VMCustomization/unattend.xml"
$VMCustomization = New-NTNXObject -Name VMCustomizationConfigDTO
$VMCustomization.userdataPath = $VMCustomizationFile

New-NTNXVirtualMachine -Name $VMName -NumVcpus $vCPU -MemoryMb $MemmoryMB -BootConfig $Boot -VmCustomizationConfig $VMCustomization


I have now rebuilt my script with the Powershell v2.0 cmdlets, and everything is working except the customization part. I cannot find anything about customization in the v2.0 cmdlets reference. 😞


$VMCustomization = New-NutanixObject -Name VMCustomizationConfig
$VMCustomization.userdataPath = $VMCustomizationFile


Has anyone else successfully used a customization file when creating a VM with the Powershell v2 cmdlets?

Be the first to reply!

Reply