1

How could I automate the building of a VM machine with required software?

My idea is that I have a webpage which interfaces to a VM server (either ESX or Hyper-V), I choose what OS I want and what software I'd like installing on the machine. The webpage sends the required requests to which in turn builds the machine.

Pete
  • 11
  • 1
  • 2
  • ...for your internal use? – Bart Silverstrim Dec 22 '11 at 13:45
  • 9
    Without being nasty, this is a really /really/ big project in it's own right. There are lots and lots of components and so many questions and answers that I don't know where to begin. Essentially, you've asked how to build an ocean liner with the tools in your shed. I don't think you're going to get much of an answer. – Dan Dec 22 '11 at 13:46
  • I second Dan on the fac that this is a really big project. You can start from api documentation from vmware/microsoft – m0ntassar Dec 22 '11 at 13:59

6 Answers6

1

This highly depends on the guest OS and the software installed on it. If the set of software is known in advance, then you can simply create VM templates, and deploy VMs from templates on demand.

For a detailed list of required software, the guest OS will start playing a part

  • For Linux you might be able to use either a kickstart setup, or a combination of a VM template and Chef/Puppet.
  • For Windows There are different ways of deploying software automatically, starting with GPO/MSI and ending with Altiris and the likes.

Either way, this is not a simple task in a small home environment, though doing some basic templating under libvirt should be easy enough.

dyasny
  • 18,802
  • 6
  • 49
  • 64
0

Start here for Microsoft Hyper-V - http://technet.microsoft.com/en-us/library/bb740810.aspx

This is do-able, but is a huge undertaking from a planning and policy perspective.

From: http://technet.microsoft.com/en-us/library/bb740785.aspx

Virtual machine self-service enables the Virtual Machine Manager (VMM) administrator to grant users permission to create and operate their own virtual machines within a controlled environment on a limited group of virtual machine hosts. The Virtual Machine Manager administrator configures self-service policies, which determine the scope of the users' actions on their own virtual machines.

ewwhite
  • 197,159
  • 92
  • 443
  • 809
0

Your idea is correct, but devil is in the details.If you need reliable, scalable and usable solution this will require a lot of effort.For hobby project, some scripting would suffice.

Sergei
  • 1,226
  • 16
  • 25
0

OpenNebula supports ESXi (and Hyper-V but it's not so production-ready), and include a Contextualization feature that permits to configure a VM during the first boot using a set of scripts placed on an autogenerated cd-rom ISO.

Take a look at http://opennebula.org/documentation:rel3.0:cong#generic_contextualization

As a real-world example, I use this function to configure and deploy virtualized LAMP stacks using an unique template image of Ubuntu LTS.

Giovanni Toraldo
  • 2,587
  • 19
  • 27
0

Would have thought this would be possible with a combination of PowerCLI for the VMWare side and then Group Policy assignements. You could use the web page to generate either an XML or CSV for the creation of the VM using New-VM cmdlet. The software assignment could be generated using GPO software deployment. These can also be managed using the modules for AD in Powershell 2.0 but would require a 2008 R2 DC if I remember correctly.

As Dan pointed out this would be a fairly chunky amount of work but if it is a common occurence then well worth it. Would definitely be easier if there were templates for the various machines required which may ease the initial generation.

-1

Someone already did this : easyvmx

lolfrog
  • 1
  • 1
  • The question mentions ESXi and/or Hyper-V, while the configuration tool you linked to is for VMWare Player. – pauska Dec 28 '11 at 12:37
  • er, ESX is made by vmware in case you didnt notice. but that wasnt actually my point, my point was to tell the poster than someone has already realised his or her idea. nice one for voting a new comer down though. – lolfrog Dec 29 '11 at 00:33
  • VMWare ESX and VMWare Player are two different products, so the page you linked to doesn't apply. – pauska Dec 29 '11 at 13:52