Recently we faced with one problem. We have to have many CMS on different virtual machines located on our ESX server. One CMS for one VM (it is important). But we don't want to store them all simultaneously and we're searching for solution to configure VMs on demand. All machines are differed only by CMS, underlying OS and all soft (apache, php etc) are the same. Can anybody help us with this? May be there are existing opensource (or not very expensive) solutions? Thanks in advance!


There are at least 2 oob ways to clone a VM with EXS.

  1. If you have vCenter you can just use Clone option
  2. If you don't have vCenter then you can just create a copy of VM disk and then create a new VM pointing it to that disk

If you don't want to bother with vSphere client for these tasks, then you can just create simple scripts with vCLI or PowerCLI. If you are cloning Windows VM, then it might be useful to do to this over syspreped image.

While the above is the answer to the question you asked, but this is probably not the answer you want, because, as far as I understood, your primary problem is configuring of CMS inside of VM (I might be mistaken here) which is actually not the thing that ESX should worry about. If so, then you need to elaborate your question and provide as much details as you can, e.g.:

  • What is "different" CMS's? Are these really different CMS's or just different versions of the same CMS
  • CMS is you SUT or you run your SUT at the top of some third-party CMS's?
  • What OS is inside your VM
  • Yes, the primary goal is to install/configure completely new CMS on a clean OS AFTER machine is cloned. What OS it doesn't matter. It can be Windows or Linux. CMS are all different (joomla, drupal, wordpress etc) and they are not our SUT. So, roughly speaking, I want clone machine, may be pass a param with CMS name, after cloning OS is boot and then magic happens which installs software for me :) – dgodov Jul 30 '13 at 10:53

There's a couple of options I can think of right now.

The low-impact version is to have an off-server data store where your VM images are kept and moved to the ESX server on demand. This can be automated fairly easily using the sysinternals tools and command line (I'm presuming you have command line access to manage your ESX server).

If you need to install and configure the VM and then the CMS on the fly things get more complex: you could probably still do this with a command line interface but it would be a whole lot more complicated to set up.

If your issue is purely with drive space, I'd recommend investing in some hard drives and use these as your template locations so the server platters are only hosting the currently active VMs.

If your issue relates to IO then things get more awkward.

  • No, we don't have problems with disk space, but we are limited in CPU and RAM (CPU is the main problem). And yes, I want to install soft on the fly :) One thing I'm thinking of is a python automation (WebDriver). But it can be quite difficult to maintain. – dgodov Jul 29 '13 at 11:33
  • Any automation you use to install on the fly is going to be difficult to maintain - I'd suggest having your automation pull as much of the config data as it can from some external data source to minimize the data you code in. That helps with maintainability. – Kate Paulk Jul 29 '13 at 11:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy