2

I have a couple of LAMP servers (on a VMware ESXi host) for projects built on top of the CodeIgniter PHP framework. To mimic the original dev server installation I set up those 2nd and 3rd servers by manually installing Ubuntu Server then packages for openssh, git, ftp, unzip, etc. then implementing my web and file structures... needless to say its time consuming and tedious to have to do this every single time I have new dev server to build up. Is there a way to make a template dev server or something and instantly spawn new dev servers based on it with all the items mentioned above in place? A method with or without built-in ESXi features would be fine.

duenni
  • 2,959
  • 1
  • 23
  • 38
crashintoty
  • 261
  • 1
  • 4
  • 11

3 Answers3

3

You could manually create your basic "template" and clone from it, but you should remember to remove "unique" data. For example:

  • configure the template for DHCP networking, you'll assign static IPs after the cloning
  • configure an hostname like "template01" and remember to change it after cloning
  • delete SSH host key files just before shutting down the template, so they'll get automatically re-created when you start up the clones
  • etc...

Or, you could look into provisioning / configuration management tools (like Puppet + Razor, which is sponsored by VMware itself), but that'll be a longer and harder process for sure. Worth looking if you want to automatize a whole infrastructure and not just the spawning of new clones of a single template.

Luke404
  • 5,826
  • 4
  • 47
  • 58
2

In your case you can simple copy already installed web server virtual machine files or create base instalation configure it and then copy to another location. After copy you simple add copied machine to ESXi inventory start make all needed changes (host name ip etc) and that's all.

Here is simple tutorial how to clone wm in ESXi http://www.dedoimedo.com/computers/vmware-esxi-clone-machine.html

It's simple but ypu must remember to turn off vritual machine to copy files.

B14D3
  • 5,188
  • 15
  • 64
  • 83
2

You can convert VMs into a template or clone a VM. If you convert to a template you can not edit or power on the machine, the VM is marked as template and you can only deploy a new machine from the template. Power off your machine, right-click it and select Template > Convert to Template, that's it. You can then right-click the template and Deploy Virtual Machine from this Template. A new VM has the same settings and programs like the template, so you have to change its IP adress and/or hostname.

duenni
  • 2,959
  • 1
  • 23
  • 38