Quantcast
Channel: VMware Communities: Message List
Viewing all articles
Browse latest Browse all 293210

Re: Convert to VM and then to Template

$
0
0

Hello, Santosh-

 

You can do these tasks as follows:

 

## name of template to handle
$strTemplateName = "myTemplate0"
## convert template to VM, saving output VM to new variable
$vmToHandle = Set-Template $strTemplateName -ToVM -Confirm:$false

## power on the VM
Start-VM $vmToHandle -Confirm:$false

## shutdown the VM (assumes it is running VMware Tools)
Shutdown-VMGuest $vmToHandle -Confirm:$false

## convert VM to tempalte
Set-VM $vmToHandle -ToTemplate -Confirm:$false

 

Notice that the VM shutdown assumes that the VM is running VMware Tools.  If you want to just force a poweroff of the VM, you can use the Stop-VM cmdlet.

 

Enjoy.


Viewing all articles
Browse latest Browse all 293210

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>