Wednesday, July 16, 2014

tiredserver died now let's clean up or adventures in powercli and finding vmware templates

so tiredserver died and templates are all over the place. where are they, really?
 PowerCLI C:\Program Files (x86)\VMware\Infrastructure\vSphere PowerCLI>   
 foreach($vmhost in get-vmhost){get-template -Location $vmhost | select name,@{n='VMHOST';e={$}},@{n='VMTX';e={$_.extensiondata.config.files.VmPathName}}}  
 Name               VMHOST          VMTX  
 ----                ------           ----  
 win2008           [tiredserver] win2k8R2-64-ffan/win2k8R2-64-ffan.vmtx  
 SLES11-64-JAVA1.7-15GB     [esx--host05] clone-vm/clone-vm.vmtx  
 SLES11-64     [awakeserver] SLES11-64/SLES11-64.vmtx  
 SLES11Clone     [esx--host05] SLES11Clone/SLES11Clone.vmtx  
 SLES11-64-JAVA1.7     [awakeserver] SLES11-64-JAVA1.7/SLES11-64-JAVA1.7.vmtx  
 win2012-gui      [esx--host05] win2012-gui/win2012-gui.vmtx  
 win2012-core      [esx--host05] win2012-core/win2012-core.vmtx  
 tmpl          [esx--host05] tmpl/tmpl.vmtx  
and then you edit the vmtx files to point somewhere else. and then you register them. yes, you do. vim-cmd solo/registervm /vmfs/volumes/datastore_name/VM_directory/VM_name.vmtx
Post a Comment