Auto convert dynamic disk when deploying template?

To save space and time we opted to make our server templates using dynamic disks. Part of the deployment guide for new servers was then to manually edit the VM and convert to fixed disk.

Problem is that this sometimes is forgotten and discovered after a server is in production, so we would need planned downtime to fix it...

Question;

1. is it possible to get VMM to do this automatically when deploying a new server? (add on PS script or something?)

2. is it possible to change the VHD on the library server from dynamic to fixed so the template would deploy with a fix disk? (to avoid making new templates :))

We're using VMM2012R2 with HyperV 2012R2 clusters. No. 1 would be preferable as we find deployment is slow with "large" fixed disks...

Thanks for any tips :)

August 28th, 2015 6:26am

Can the conversion be automated at deployment time?

Yes, it can.  But only if you use PowerShell to script the deploy and define the conversion action as a step.

Fixed vs dynamic virtual disks has really become a personal preference as performance has improved and there is no longer a performance benefit to fixed virtual disks.

You can change the VHD in your library, but you greatly extend your provisioning time. (considerably)

I thought I had an example of a script, but I am failing to find it at the moment.  I know I have done this.

Free Windows Admin Tool Kit Click here and download it now
August 28th, 2015 11:37am

Hi Sir,

>>is it possible to change the VHD on the library server from dynamic to fixed so the template would deploy with a fix disk?

Brian is right .

I also tested it in my lab , during converting the dynamic vhd to fixed , you need to put them to a new place , after you get the fixed vhd you can copy it back to the original place with same name as the old one (replace it or change the name for old one ).

Best Regards,

Elton Ji

August 30th, 2015 3:53am

But will the template "update" to understand that it's a fixed disk and not a dynamic then? 

I occasionally do something similar to update our Linux based templates - but it's still a dynamic disk.

One of our reasons for using fixed disk vs dynamic is to avoid "trashing" on the SAN disks, and also to have a better understanding of disk usage on the SAN. We've previously run into big issues when disks grow and suddenly there was 0 bytes free :)

I'm also well aware of the time difference in deployment, but right now I'm thinking it's better than discovering 10 servers in production running with dynamic disks and having to schedule down time of the services to "fix" it...

Free Windows Admin Tool Kit Click here and download it now
August 31st, 2015 4:29am

The only way to replace an item in the Library and not have SCVMM think that it is new / different is:

  • Stop the SCVMM agent on the Library Server you are replacing the item on.
  • Create your new item (VHD)
  • give it the exact same name as the original (the item you are replacing) / copy over the original
  • Start the SCVMM agent

In your case the stopping and starting of the SCVMM agent is important.  Since your file is large and SCVMM will most likely refresh the Library in the background while you are doing something with the VHD (copying it, replacing the original, etc.) and if SCVMM detects any change in the file in flight, it will consider it a new object and catalog it.

Then you have to manually update your templates.

The other option is to create a new VHD (the fixed disk) and store that in the Library and update the Templates that matter to use this new one.

It is really up to you, but there are two ways to go about this.

August 31st, 2015 10:57am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics