Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

We are trying to provide our Linux engineers with a CLI to deploy VMWare vSphere VMs using templates.

The vSphere CLI looks promising but the documentation doesn't mention templates.

Does anyone have any suggestions on how to go about this?

share|improve this question

3 Answers 3

up vote 4 down vote accepted

The only option I've found would be using the PySphere SDK

I've used it to do snapshot consolidation and cleanup, but it can certainly do VM creation from a template.

share|improve this answer

A couple of thoughts on this...

  • It's almost easier to install Linux operating systems anew if you have a deployment solution and configuration management in place (e.g. Cobbler and Puppet/Chef). I tend not to use vSphere templates for anything other than canned Windows server installations.

  • If that's not possible, and the template deployment process is infrequent, the standard vSphere Web Client and thick client are adequate.

The fact that you've phrased this as "[providing] our Linux engineers with a CLI", makes me wonder if there's been some pushback, or reluctance to use the standard VMware tools.

Is there more context here?

share|improve this answer
    
Lack of VMWare Mac client seems to be the primary reason for the request. As is usually the case with Linux folks (myself included), there's a strong preference for CLI processes. –  Belmin Fernandez Aug 6 at 19:03
1  
So this has changed over time. The last two releases of vSphere (5.1 and 5.5) have good Mac browser support. As someone who does this professionally, but is technically a Linux engineer by trade, I gravitate towards the right/appropriate tools for the job. For a loooong time, that meant keeping a Windows VM or RDP session around in order to use the vSphere client. –  ewwhite Aug 6 at 19:20

There's a fling, Ruby vSphere Console, that you can make use of.

If your Linux admins prefer Python they could use pyVmomi, but it's more of a library (although you can start Python, import pyVmomi and then use it as a "shell").

There's also virsh but it looks like you can't deploy templates with it. However, googleing for virsh + deploy + template I found vm-easy-deploy that might help you.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.