VMware vSphere: VM Management - Cloning/Templating

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hi welcome to using templates and cloning my name is Chris Skinner from VMware education services although you can create a virtual machine from scratch each and every single time by simply building the virtual machine manually mounting an ISO image to that virtual machine installing the guest operating system installing VMware tools and the other additional applications such as antivirus software or other types of applications that you might install in your traditional gold or master virtual machine that can be quite time-consuming if you have a lot of virtual machines to build one of the techniques that we can use in vCenter is templates and cloning for mass-producing virtual machines much quicker we basically take a master or gold version of a virtual machine and we simply build other virtual machines from it in an automated fashion we also have the capacity to do things such as customizing that guest operating system so that we can provide uniqueness to it templates and cloning are techniques that we can use to rapidly provision a virtual machine over and over and over again we are basically taking a virtual machine making a photocopy of that virtual machine with the option to be able to customize it to give it uniqueness so we don't have duplicate IPS or duplicate names or in the case of some windows guest operating systems potentially duplicate SIDS the customization process is basically allowing us to give uniqueness in a wizard type fashion or wizard driven fashion through a guest customization wizard as you deploy a virtual machine part of the process of creating that virtual machine you will be prompted as to whether or not you want to provide uniqueness or customization to that these specifications can be stored inside of the virtual Center database for reusability over and over and over again we can also go back and always edit the customizations that have been created if we make changes to things like product IDs or we have other networks that we want to connect a virtual machine to we can also even make customization or copies of those customization scripts as well let's take a look at first of all how do I pave the way in a vCenter environment for creating that customization or giving it uniqueness okay in this demonstration we're going to look at how we can prepare the vCenter server for guest customization now in the guest customization world we need to be able to provide some sort of a mechanism for the unique elements that are associated with certain operating systems specifically this demonstration is going to deal with how to provide uniqueness to Windows based operating systems one of the elements of a Windows operating system that can be problematic or potentially problematic in the domain is the SID or the unique identifier for that Windows virtual machine vmware can accomplish this the vCenter server can accomplish this by simply adding the assist prep files into a specific path or directory on the vCenter server such that the customization wizard when prompted will reach out to these files and use them to strip the virtual machine that you've made a copy of of its unique identifiers and then allow you to repopulate back unique elements or parameters to that newly created virtual machine so I've already taken the liberty here of pre downloading or extracting the sysprep files from a Windows 2003 servers DD these are operating system specific Windows Server 2003 has on its installation media or it's it's cd-rom a folder that will allow a cabinet file that has the tools that are in there specifically what we're looking for is we're looking for two executables in that cd-rom that are entitled set up CL dot exe and sysprep dot exe down here in the bottom window as you can see is a path to this local vCenter server and specifically you can see that it goes to the C Drive documents and settings all users application data VMware vCenter server and sysprep inside this sysprep folder here are a number of additional folders what you might notice listed not listed in here in this list of operating systems are some of the more current Windows operating systems such as Windows 7 Windows 2008 and so on that's because those particular Windows operating systems have embedded within the OS itself its own versions of sysprep so in other words they are local to that guest operating system where these versions it is not local to the windows guest operating system so we're going to simply choose the setup CL and the sysprep dot exe and we're going to make a copy of those into the SRV 2003 folder so now if you look inside that folder you can see that I have those two particular system setup CL executables that reside in this path at this point in time now vCenter server is configured to guest uh to customize the guest operating system if you have Windows XP clients perhaps for a view engagement or some other operating systems as you saw the folders listed there you would need to extract those versions of the executables specifically for those guest OSS and copy them into the appropriate folder okay using templates this slide is about how do I make use of the templates as I've deployed to use them to deploy virtual machines to reiterate once again a template is basically a gold or master image of a virtual machine that you maybe use a repurpose over and over and over again as a source of provisioning or mass-producing other virtual machines it is typically a virtual machine that is OS specific perhaps even service pack specific or patch specific and perhaps also has some software that is relevant to your environment that is of course makes it part of your standards they would include not only the guest itself but perhaps some additional applications perhaps some very specific machine configurations memory requirement CPU requirements etc but it becomes the basis of a virtual machine from which I am now going to mass-produce in combination with the customization wizard which we just finished looking at preparing the vCenter server for so now let's take a look at how we can go about creating templates managing and using templates in our next segment looking inside the vSphere client connected to the vCenter server here I'm now going to use that newly created virtual machine with the guest operating system the VMware tools that were installed into that and I'm going to treat that virtual machine as the basis of my template for deploying future virtual machines and the easiest way to do that is simply right click that virtual machine go to template and convert it once I convert that virtual machine to a template which you can see is a fairly instantaneous process the icon for this virtual machine is also now changed the state that this virtual machine is now because it's a template virtual machine it can't actually be powered on if we take a look at right-clicking that virtual machine we no longer have power operations available to it but what we do have is the ability to use this template or this standard gold master image to deploy other virtual machines from it and to do that I simply right-click I say deploy virtual machine from template and the wizard will pop up asking me once again for a unique identifier or name for this virtual machine in this case here we'll say that we're going to call it a win 2003 server and we of course will be prompted where do we want this virtual machine to live what data center will choose training will also be once again as we did in the initial virtual machine creation asked where do we want this virtual machine to run so we're going once again we'll choose the first server in the list and click Next okay once again in the same way that we saw the storage available to a virtual to the ESX server for the virtual machine deployment we're also going to put this particular virtual machine in that same shared storage so once again we can see that the the capacity what's remaining and so forth and we click on next one of the things that we have on this next screen is the ability to turn it on when it's finished now if we choose the option that says power on this virtual machine after creation it will become immediate live on the network if you elect not to choose that option then this virtual machine will simply be deployed with you having the capacity to power it on manually at the bottom here because we've prepped the vCenter server with the sysprep files we're given the opportunity to use the customization wizard we can either leave it uncut simply create an absolute duplicate of when 2003 a we have another option it will let me walk through a wizard that will give me the unique elements of the new deployed virtual machine or if I had already pre-configured a customization specification file or perhaps reusing an existing customization wizard that I've created earlier I can move to creating that without having to fill in some prompts since we've not created a customization file yet we're going to go ahead and walk through the customization wizard here so once again we're going to be prompted for the owner's name of the organization this of course is the registration information that when the windows guests would be looking for in this particular case here we're going to enter the username and password a user name and organization my apologies we're also going to be given never several options here to either force the name of the new machine again we can also create uniqueness by using this check box here to append a unique identifier or value to the end of that string we can use the virtual machine name so that is whatever I gave it in its initial screen as a name we can use that or we can enter a name through the deployment process and lastly you also have in some cases the ability to auto generate a name we're going to use consistent here and we're going to create a virtual machine by the same name that we gave it when we started this process which happened to be win 2003 server at this point we need to enter a product key we also will choose whether or not we want this per seat or per server mode license in the Mac den this is standard windows options that are available to us we need to give it a password or we can choose to give that virtual machine a password so in this example we'll just simply enter the password that we will use in our environment we also have the ability to automatically log on for the first time when the virtual machine boots up now what's nice about this option here is you can define the number of times that you want to allow it to automatically log in when it boots up and this could be helpful in cases where you have subsequent applications that you want installed as part of the deployment process perhaps a run once or something along those lines I will go ahead and just leave that deselected we'll click on next at this point we enter the timezone information that's relevant to this particular deployment so for simplicity purposes we'll just choose we can choose something clever here like Central Time click on next any particular commands that we want as part of the typical run once command this might be as simple as a string that processes some sort of a batch file perhaps this one actually installs subsequent software such as office or some other third-party application that you might want installed into this guest OS as a typical run once command so it will add the run once command to the sysprep file that will be generated for this customization here we can choose typical or custom settings depends on the level of granularity if we want to manually configure the network interfaces we can do that if we leave it at typical settings then we will be using this or will deploy this virtual machine as a DHCP client and of course presumes that there's some sort of DHCP server out there that can issue an IP address to this guest next or domain or workgroup options here again we can predefined a domain if one exists out there or you want this particular virtual machine to connect to a particular domain for simplistic purposes once again we'll just use the workgroup and of course here's the all-important generate a new cid or identify our security identifier for this windows guest for Windows guests unless you're doing an outright straight duplicate this is probably a wise idea to have it generate a new city each time last but not least if you tend to use this customization wizard or settings that we have here and you want to save them and you intend to use them over and over again we can give them a name and key fact I'll call this win 2003 custom and we could put even a descriptor in here for example this is just a customization script for Windows 2003 and again you can put whatever you want to here but this allows me to save that in the vCenter database for reusability in the future I also once again as we mentioned earlier we can customize the actual scripts if something changes click Next at this point you're given a summary page and you're about ready to go once we click on finish and we click on whether or not we want to edit any additional virtual hardware at this point which we aren't going to do for this demo we simply click on finish and we simply now will see in the progress bar the cloning operation and then followed by the customization operation you'll notice in the inventory right now although not readily available we see that the virtual machine appears right away so vCenter server now is in the process of actually cloning the original template and then followed by a customization okay as we see the cloning process taking place which is the first step in building the virtual machine that is to take a copy of the template that we used as the basis made a copy of it for the new virtual machine target and then customize it we'll notice here in just a few minutes in the console window that we will see this virtual machine powerup now during the powerup process or during the cycle power cycle process there's a number of steps that are taking place to perform the customization since it's the first boot of the virtual machine from the clone operation it actually will boot as a virtual machine by the same name as the template but what makes it unique is that it will actually powerup not connected to the network so that we don't have a conflict as the power cycle finishes then the vCenter server will then insert into the guest OS the sysprep files execute those cyst prep files which will strip it of its unique identifier which naturally is going to require to reboot once again because it's now devoid of its unique elements when it comes up yet another time it will process the sysprep answer file that we created via the customization wizard and that customization wizard answer file will repopulate the stripped or missing components that we took out as part of the SIS prep operation last but not least when that process is complete it'll boot for the final time and should come up oftentimes we have clients who have attempted to login to the virtual machine before it's completed its process it's complete customization process and that can potentially interrupt the customization process so that it can't go any further and will of course need to be restarted the simple fix to that by the way is to simply restart the virtual machine and allow the customization wizard to continue once again so as we see here through the process we'll see the virtual machine coming up we see the guest OS coming up for the very first time in its clone state and now we see the process rebooting once again because recenter has now inserted the sysprep and executed that's this prep on this machine or inserted the file which is going to sysprep this virtual machine here we can see the customization occurring this is sysprep in action here so we're stripping of this guest OS of its unique identifiers and then it will of course repopulate the aunt those which have been stripped out of it with the answer file that we created by the customization process so there's still one more reboot in our future and now we see the final boot process for the last time at this time now it will be reestablished on to the network that was chosen from the customization specification and this virtual machine will now be back live as a fully templated vm by the name of wynn 2003 server another alternative to deploying virtual machines is a cloning alternative this is essentially nothing more than an exact copy of a virtual machine and this would of course be an isolated case but there may be a need in which you want to have an absolute duplicate version of an existing virtual machine this could include a duplicate copy of a virtual machine that you want to test in an offline or test in dev environment from an already existing virtual machine perhaps you're doing something along the lines of you want to deploy a file server to be used in an offline or testing dev environment and you've already got one in place but once again the fundamental difference between a template and a clone is that a template is a virtual machine that can't boot from which I can create other VMs and a clone is a virtual machine that I can also copy as well but it's an exact replica of the existing virtual machine let's take a look at a quick demonstration is how to start a cloning operation next once again not unlike the templating option that we saw earlier the clone operation is also very easy to complete simply choose an existing virtual machine right-click choose the clone operation and give it a unique name or give it a name not unlike you had before here so in this case we'll just call it clone win 2003 once again we choose data center that we want this to live in and we choose next server that we want this to reside on the storage that we want this virtual machine to exist on and whether or not we want to customize in this case since we're doing a clone or a duplicate of this virtual machine we're going to choose not to customize it once again a summary screen when we click on finish in the same way that a virtual machine that was being templated is being done a clone is also being created in its state this concludes our demonstration of a cloning operation for more information about the Sphere infrastructure go to vmware education services on the web vmware education services provides training in over 500 centers in 60 countries this is delivered both by vmware direct as well as our partners authorized training centers you can take classes in an instructor-led classroom environment class can also be delivered remotely via live online we also have private on-site capability as well as a number of free e-learning modules that are available on our web site as well you can find us online at any of the links listed below you
Info
Channel: VMware
Views: 167,129
Rating: undefined out of 5
Keywords: vm management, how to clone vm, virtual templating, virtual clone, vsphere getting started, vsphere video training series, vmware install help, free vmwarer training, vmware training video
Id: 4eN5iiQSCBw
Channel Id: undefined
Length: 22min 13sec (1333 seconds)
Published: Fri Mar 30 2012
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.