Creating template from VM - sysprep questions | Nutanix Community
Skip to main content
Question

Creating template from VM - sysprep questions


Forum|alt.badge.img+1

I have a question. We are migrating from VMware to AHV. While we’ve been running VMware on top of Nutanix for years, now we’re using AHV instead of ESXi.

On ESXi I had a number of VM templates for different OSes. I’m unclear on how to do the same under Nutanix. I have a working VM that want to convert into a template. On VMware, the sysprep step was kicked off by the “Create a VM from this template” option, when using a Customization configuration . Meaning I didn’t have to manually ever run sysprep, and the sysprep application was not needed in the template itself. Sysprep was run and invoked by the vSphere customization script.

How do I do the same in AHV? IOW, I want to just “Create VM from template”. Do I have to run the sysprep command manually myself, before I convert the VM to a template? Or does the customization step do that? If so, where do I upload sysprep so that the customization step has access to it?

https://portal.nutanix.com/page/documents/details?targetId=AHV-Admin-Guide-v6_8:mul-vm-template-create-pc-t.html

I see that one of the steps under “Guest Customization” says to run sysprep. How? I’m guessing I need to upload it into Prism somewhere, but it doesn’t say where or how. In my case, I want an interactive customization (i.e., I will give it hostname, and IP, at the time I create the VM from template. That is the “Allow users to overide” option, right?

Thanks. Sorry if these seem simple questions.

 

9 replies

JeroenTielen
Forum|alt.badge.img+8

Before creating a template you need to run sysprep. More info here https://www.jeroentielen.nl/creating-and-maintaining-a-template-virtual-machine-in-nutanix/

 

Sysprep is available on every windows machine. So no need to install it. 


Forum|alt.badge.img+1
  • Author
  • Adventurer
  • 7 replies
  • April 4, 2025

So I need to manually run it on the template first? This isn’t a step that Nutanix provides, the way VMware does?

This page says to use “No customization”. What happens if I choose the “Sysprep (windows)” option? If that’s an option, I would figure that means I don’t need to run it manually before creating the template. But that’s unclear.

 Will it run sysprep for me? That’s part of what I am asking. I realize I can run sysprep myself).

That page also doesn’t address my questions about interactive customization.

 


Forum|alt.badge.img+1
  • Author
  • Adventurer
  • 7 replies
  • April 4, 2025

Oh! Wait, I think I see. When *creating* the template, I choose “No customization”, and I have to run sysprep myself. That makes sense. 

Then, when *deploying* a VM from this template, I choose the “Windows (sysprep)” option. And Nutanix will run sysprep itself? That, and the “Guided” setup, is still not clear to me. 

But I’ll try cloning my soon-to-be-template first (so I can easily roll back), then sysprep it. Create Template from that VM.. Then try rolling a new VM based on it …

Thanks


JeroenTielen
Forum|alt.badge.img+8

No that is not how windows works. When creating a template you shutdown with the sysprep command. This will generate a new sid on the windows machine when started again. Now when deploying a windows machine from template you can choose to customize the deployment with sysprep script. This requires that the template is created with sysprep. The customization will make sure the deployment is done unattended. So the oobe from windows is skipped ;). 


Forum|alt.badge.img+1
  • Author
  • Adventurer
  • 7 replies
  • April 4, 2025
JeroenTielen wrote:

No that is not how windows works. When creating a template you shutdown with the sysprep command. This will generate a new sid on the windows machine when started again. Now when deploying a windows machine from template you can choose to customize the deployment with sysprep script. This requires that the template is created with sysprep. The customization will make sure the deployment is done unattended. So the oobe from windows is skipped ;). 

 

Well, that’s pretty much what I said, or meant, if it didn’t come across that way. That I’d only want Nutanix to run sysprep if it was a new VM being created from the template. VMware does that by default ..

 

BTW, why would I not want “/generalize” on the sysprep command for the template itself?

 


JeroenTielen
Forum|alt.badge.img+8
MikeLeone wrote:
JeroenTielen wrote:

No that is not how windows works. When creating a template you shutdown with the sysprep command. This will generate a new sid on the windows machine when started again. Now when deploying a windows machine from template you can choose to customize the deployment with sysprep script. This requires that the template is created with sysprep. The customization will make sure the deployment is done unattended. So the oobe from windows is skipped ;). 

 

Well, that’s pretty much what I said, or meant, if it didn’t come across that way. That I’d only want Nutanix to run sysprep if it was a new VM being created from the template. VMware does that by default ..

 

BTW, why would I not want “/generalize” on the sysprep command for the template itself?

 

Nutanix is not vmware ;). Maybe this will come in the future but for now you have to do this manually. The generalize is just for deploying the template on different hardware. Which in not the case when running virtualized ;) 


Forum|alt.badge.img+1
  • Author
  • Adventurer
  • 7 replies
  • April 4, 2025
JeroenTielen wrote:
MikeLeone wrote:

 

 

Nutanix is not vmware ;). Maybe this will come in the future but for now you have to do this manually. The generalize is just for deploying the template on different hardware. Which in not the case when running virtualized ;) 

 

Yeah, you aint kidding. LOL VMware was a whole lot more user-friendly for doing something that should be as simple as making a new VM based on a template. To me, anyway. 

OK, well, I filled in the Guided Script, we’ll see how the new VM works out. At this point, next week, as my shift is nearly done for the day.

 

Thanks for all your help.


Forum|alt.badge.img+2
  • Trailblazer
  • 34 replies
  • April 7, 2025
MikeLeone wrote:
JeroenTielen wrote:
MikeLeone wrote:

 

 

Nutanix is not vmware ;). Maybe this will come in the future but for now you have to do this manually. The generalize is just for deploying the template on different hardware. Which in not the case when running virtualized ;) 

 

Yeah, you aint kidding. LOL VMware was a whole lot more user-friendly for doing something that should be as simple as making a new VM based on a template. To me, anyway. 

OK, well, I filled in the Guided Script, we’ll see how the new VM works out. At this point, next week, as my shift is nearly done for the day.

 

Thanks for all your help.

yep agree with you templating isn’t as slick as with VMWare but it is just about the only thing I do miss about VMWare ;-)


JeroenTielen
Forum|alt.badge.img+8

Just for you guys some extra info ;) 

In this blogpost I created a powershell to sliptstream the VirtIO drivers into a Windows ISO. There is also a parameter to generate a autounattend.xml so the install will be done automatically: https://www.jeroentielen.nl/slipstream-virtio-drivers-into-windows-iso-to-use-on-nutanix-ahv/

 

The OOBE (Out Of Box Experience) from windows is done after the first reboot after installation or after the first start when sysprep is started. To automate the OOBE you need to create an unattend.xml

Microsoft has a nice tutorial how to create the unattend.xml: https://learn.microsoft.com/en-us/windows-hardware/manufacture/desktop/update-windows-settings-and-scripts-create-your-own-answer-file-sxs?view=windows-11

 

Yes VMware has this nicely integrated in their software suite, Nutanix not (yet). So if you already have a VMware generated unattend.xml (it should be attached to a floppy/cdrom when deploying a template in VMware you can copy it out and use that for your template deployments in Nutanix. 


Reply