VMware Cloud Community
madhanSakthi
Contributor
Contributor
Jump to solution

deploy a virtual machne from the template stored in EXSI server from command line

HI,

Is there a way to deploy a vm from a template stored in exsi server through command line ?

The structure is shown in the image attached. I want to deploy the template under "Templates" folder to a virtual machine under "VM" folder.

Thanks in advance,

mathan v

0 Kudos
1 Solution

Accepted Solutions
rcporto
Leadership
Leadership
Jump to solution

Here are some examples:

Back To Basics: Creating and Deploying Templates with PowerCLI – Part 7 | Mike Laverick...

http://blog.vmpros.nl/2011/01/16/vmware-deploy-multiple-vms-from-template-with-powercli/

Creating a New VM from a Template:

New VMs from existing templates can be created with a very simple script that reference the various variables required to create the VM including such requirements as the VM name, Template, Datastore, ResourcePool (which can be the host, cluster or resource pool name), VM Folder location and what Guest Customization to use.

New-VM -Name corphqdb03 -Template win2012-R2 -Datastore platinum -ResourcePool GoldCluster01 -Location CorpHQ -OSCustomizationSpec “Windows 2012 R2 – CorpHQ” Start-VM corphqdb03

---

Richardson Porto
Senior Infrastructure Specialist
LinkedIn: http://linkedin.com/in/richardsonporto

View solution in original post

1 Reply
rcporto
Leadership
Leadership
Jump to solution

Here are some examples:

Back To Basics: Creating and Deploying Templates with PowerCLI – Part 7 | Mike Laverick...

http://blog.vmpros.nl/2011/01/16/vmware-deploy-multiple-vms-from-template-with-powercli/

Creating a New VM from a Template:

New VMs from existing templates can be created with a very simple script that reference the various variables required to create the VM including such requirements as the VM name, Template, Datastore, ResourcePool (which can be the host, cluster or resource pool name), VM Folder location and what Guest Customization to use.

New-VM -Name corphqdb03 -Template win2012-R2 -Datastore platinum -ResourcePool GoldCluster01 -Location CorpHQ -OSCustomizationSpec “Windows 2012 R2 – CorpHQ” Start-VM corphqdb03

---

Richardson Porto
Senior Infrastructure Specialist
LinkedIn: http://linkedin.com/in/richardsonporto