none
Hyper-V running Windows 8. spawn new vm from template/ snapshot for lab scenario of multiple users

    Question

  • Hi

    I'm new to windows server 2012 and have been able to use hyper-v to create VMs for different versions of windows. What I'm trying to do is create a lab for 10 people to connect to that doesn't require the pain of installing visual studio on a bunch of laptops running windows 8 etc etc. Is it possible to have hyper-v/ or some VM manager to create copies or spawn new VMs from a snapshot/ template VM so that a new user gets their own VM and at the end of the week I can purge the VMs or get the VM manager to remove them after X days without use. 

    I hope I'm not too vague here in my questioning.

    Friday, February 15, 2013 4:00 PM

Answers

  • As Ted says, there is a quick and easy way to deploy from a single template if you have SCVMM to work with.  If all you have is Hyper-V, it can be done, but in a different manner.

    You create your base image configured exactly as you want it.  Then you create what are known as differencing disks - one for each person.  The differencing disk contains all the changes made to the image.  In fact, you should make the base image (.vhd file) read-only so you don't accidentally make changes to it.  (More on that in a bit.)  Once you have the differencing disks created, you would log into each one and rename it so that everyone has their own unique machine.  If you use static IP addresses, you will have to change those - it's simpler if you are using DHCP.

    Now, about that base image.  Any change to the base image will break all the differencing disks.  That means that you can't patch the base image.  You would patch all the individual virtual machines.  Differencing disks work well for a lab because one assumes that the life of the differencing disk is not going to be long.  Once the people are done with the lab, you simply destroy the VM created from the differencing disk.  Someone else what a new machine, create another differencing disk.  At some point, you will most likely want to update the base image.  You will have to destroy all the virtual machines running on differencing disks, update the base image, and create new differencing disks.


    .:|:.:|:. tim

    Friday, February 15, 2013 10:37 PM
  • Yep. What you're talking about is a simple form of creating templates and deploying based off those templates. That functionality is built into System Center Virtual Machine Manager (SCVMM). http://technet.microsoft.com/en-us/library/gg610610.aspx
    Friday, February 15, 2013 8:13 PM

All replies

  • Yep. What you're talking about is a simple form of creating templates and deploying based off those templates. That functionality is built into System Center Virtual Machine Manager (SCVMM). http://technet.microsoft.com/en-us/library/gg610610.aspx
    Friday, February 15, 2013 8:13 PM
  • As Ted says, there is a quick and easy way to deploy from a single template if you have SCVMM to work with.  If all you have is Hyper-V, it can be done, but in a different manner.

    You create your base image configured exactly as you want it.  Then you create what are known as differencing disks - one for each person.  The differencing disk contains all the changes made to the image.  In fact, you should make the base image (.vhd file) read-only so you don't accidentally make changes to it.  (More on that in a bit.)  Once you have the differencing disks created, you would log into each one and rename it so that everyone has their own unique machine.  If you use static IP addresses, you will have to change those - it's simpler if you are using DHCP.

    Now, about that base image.  Any change to the base image will break all the differencing disks.  That means that you can't patch the base image.  You would patch all the individual virtual machines.  Differencing disks work well for a lab because one assumes that the life of the differencing disk is not going to be long.  Once the people are done with the lab, you simply destroy the VM created from the differencing disk.  Someone else what a new machine, create another differencing disk.  At some point, you will most likely want to update the base image.  You will have to destroy all the virtual machines running on differencing disks, update the base image, and create new differencing disks.


    .:|:.:|:. tim

    Friday, February 15, 2013 10:37 PM
  • Thanks for both the responses. Is it possible then with SCVMM to have to spawn a new VM from a template when a user tries to connect? or Does this have to be done manually by admin?
    Tuesday, February 26, 2013 10:05 AM
  • Not with VMM; however, there are other components of System Center that, when used in conjunction, make it possible for a user to provision themselves a machine.
    Tuesday, February 26, 2013 3:33 PM
  • What components are they?

    Thursday, February 28, 2013 10:05 AM