VMware Cloud Community
odesey
Enthusiast
Enthusiast

Sysprep AutoLogon \Edit file to windows guest VM

I have 2 questions pertaining to Windows Guest VM's

I am using the:

Customize Windows with single NIC and credential

workflow to customize a windows VM I am deploying from template. I need to specify the account for the autologon option but cannot figure it out. Is there anyway I can specify the account and domain I would like to autologon with?

Also, is there anyway I can specify a custom sysprep.xml file OR customize attributes not specified in the workflow but available in the sysprep/unattend.xml spec?

Lastly, I need to create a file in the VM being deployed to pass some parameters for some custom software installs that are done as part of the sysprep process. I found the

guest script manager package

and was able to successfully create a blank file in the vm but I cannot figure out how to edit the file and write some data to it. When I try to edit the file I get access denied error even though its the same account used to successfully create the blank file. Is there anyway to create the file with data or edit it after the fact to add the data?

Thanks.

0 Kudos
3 Replies
Kagome
Enthusiast
Enthusiast

Well, Windos Deploying is one of the bigger challenges in Orchestrator.

What i did:

I created a GuestCustomizationSpec in my Vcenter Server (note that the Administrator User in the template must have empty Password)

With:

https://www.vmware.com/support/orchestrator/doc/vco_vsphere55_api/html/VcCustomizationSpecManager.ht...

you can get the spec

https://www.vmware.com/support/orchestrator/doc/vco_vsphere55_api/html/VcCustomizationSpec.html

If you need to modify the spec:

maybe behind the identy Property is for what you are looking for:

https://www.vmware.com/support/orchestrator/doc/vco_vsphere55_api/html/VcCustomizationSysprep.html#g...

0 Kudos
odesey
Enthusiast
Enthusiast

Thanks for your suggestions, do you have any code examples you can share?

The (sysprep) customization spec in vCO seems to be an after thought by VMware.

0 Kudos
redyouch
Enthusiast
Enthusiast

My initial implementation was modifying the built-in workflow for deploy custom virtual machine from template (with sysprep), but I found it to be inconsistent and not as clean as it could be.  The approach I prefer is generating a custom Windows ISO using the DISM toolset with slipstreamed updates, VMware drivers, and unattend.xml.  I create a new virtual machine with that ISO mounted, and upon first startup it automatically installs the OS on the first boot device.  One of the post-install tasks from the unattend.xml file is to install VMware Tools, which is what Orchestrator waits for to determine that the install completed successfully.  The ISO is then dismounted via Orchestrator and the remainder of the configuration tasks proceed (add to domain, install software, etc.).

Not sure if that would be something worth pursing for you, but thought you might want to know what is possible with Orchestrator.

Regarding the guest script manager, simply create a PowerShell or batch script that writes your text to the file:

"value1 value2 value3" | Out-File -Path C:\Temp\configdata.txt

Make sure that you are using a local username and password for authentication, as there may be issues with domain authentication if the template is off the domain or disconnected from the network as this can happen during different phases of the SysPrep process.

0 Kudos