dharmendrarhce
Enthusiast
Enthusiast

How to change Guest OS type using powercli

Jump to solution

Hi ,

There are couple of VMs in my vcenter are having window 10 but in VM setting , it is showing Window 8 .

How can i change it in bulk using powercli . I have all the list of mismatch VM.

Any help

1 Solution

Accepted Solutions
LucD
Leadership
Leadership

You can create a VM and specify whatever OS you want.

When you install a guest OS in the VM, you are not obliged to follow what you specified in the settings.

You can change this setting with the Set-VM cmdlet.

Something like this

Get-Content -Path .\names.txt | %{

  Get-VM -Name $_ | Set-VM -GuestId windows9_64Guest -Confirm:$false

}


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

View solution in original post

0 Kudos
13 Replies
admin
Immortal
Immortal

see below article -

Scripts: PowerCLI: Detect and Change Guest Selected OS [SHIFT]

it might be help you to change Guest OS type.

If you found my answers useful please consider marking them as Correct OR Helpful

Regards,

Randhir

LucD
Leadership
Leadership

You can create a VM and specify whatever OS you want.

When you install a guest OS in the VM, you are not obliged to follow what you specified in the settings.

You can change this setting with the Set-VM cmdlet.

Something like this

Get-Content -Path .\names.txt | %{

  Get-VM -Name $_ | Set-VM -GuestId windows9_64Guest -Confirm:$false

}


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

View solution in original post

0 Kudos
dharmendrarhce
Enthusiast
Enthusiast

Thanks for response , to perform this command , i need to make sure , VM is power  off state  and having updated tool and hardware version ?

0 Kudos
LucD
Leadership
Leadership

The VM should be in the powered off state, the VMware Tools and HW version are not a hard requirement.


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

dharmendrarhce
Enthusiast
Enthusiast

but , when i am trying to do that manually ... i am unable to see the window 10 listed in the version tab ?/

Will that command work on that situation as well ?

0 Kudos
LucD
Leadership
Leadership

Which vSphere version are you using?

Support for Windows 10 was introduced in ESXi 5.5U3 and ESXi 6.0 and above.

In earlier versions you will have to create the VM for example as a Windows 8 machine.

Remember, this setting has little or no impact on the actual guest OS you install in the VM.


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

0 Kudos
dharmendrarhce
Enthusiast
Enthusiast

We are using 6.5...

0 Kudos
LucD
Leadership
Leadership

Then you should have the Windows 10 option.

See also the Guest OS Compatibility Guide (p 110).


But could it be that your HW version is that far behind? Which HW version do you have on those VMs?


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

0 Kudos
dharmendrarhce
Enthusiast
Enthusiast

Yea ... We are having hrdware version 8 in some of VM

0 Kudos
LucD
Leadership
Leadership

That's probably it, you should have at least HW v11 to get Windows 10.

You should be able to do that in one statement.

Get-Content -Path .\names.txt | %{

  Get-VM -Name $_ | Set-VM -GuestId windows9_64Guest -Version v11 -Confirm:$false

}


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

0 Kudos
dharmendrarhce
Enthusiast
Enthusiast

ok. Great so it will change the hardware version along with OS version ?

0 Kudos
LucD
Leadership
Leadership

Correct


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

0 Kudos
dharmendrarhce
Enthusiast
Enthusiast

Tanks much .. WIll update you once i tested in my env

0 Kudos