VMware Cloud Community
Bachii
Contributor
Contributor

Downgrade VM Hardware version

Hey Guys,

Hope you're all doing well, I have been having issues with downgrading the hardware version of the VM from 13 to 10 through powercli,  although I can upgrade the HW version by using

"Set-VM "name of the VM" -Version v13 -confirm:$false"

However when doing the same for downgrading to v10 powercli doesn't like it.

I have ensured that when making this change the VM is powered off but still no luck.

Do you guys know any solution for this problem?

Any help will be appreciated!

Thanks,

0 Kudos
2 Replies
LucD
Leadership
Leadership

There are a couple of options, but none through a single PowerCLI cmdlet I'm afraid.

In KB1028019 you find the 3 supported methods (revert to snapshot, Converter Standalone, new VM & attach disks).

There is a fourth, but unsupported, method.

Edit the VMX file, and change the virtualHW.version value.


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

0 Kudos
moomeacow
Contributor
Contributor

replying to a old post but I was searching for the same thing so incase anyone goes searching heres a script I wrote 

vms have to be shut down

///

$mylist = @"
servers here
"@

mkdir c:\vmx
mkdir c:\vmx\newvmx

($mylist -split "`n").trimend() | % {

if(test-path fromds:){remove-psdrive fromds -Force}
$vm = (get-vm $_ ).extensiondata
$VMPathName = $vm.Config.Files.VmPathName
$dsname= $VMPathName.split(" ")[0].TrimStart("[").TrimEnd("]")
$vmfolder= $VMPathName.split(']')[1].TrimStart(' ')
new-psdrive -name fromds -location (get-datastore $dsname) -psprovider vimdatastore -root '/' |out-null
copy-datastoreitem fromds:\$vmfolder c:\vmx
$myvmx = get-content "c:\vmx\$($vmpathname.split("/")[1])"
$myvmx.replace('virtualHW.version = "14"','virtualHW.version = "13"') | set-content "c:\vmx\newvmx\$($vmpathname.split("/")[1])"
rename-item "fromds:\$($vmfolder.split('/')[0])\$($vmfolder.split('/')[1])" "$($vmfolder.split('/')[1]).old"
Copy-DatastoreItem "c:\vmx\newvmx\$($vmfolder.split("/")[1])" "fromds:\$($vmfolder.split('/')[0])"


}

///

0 Kudos