VMware Cloud Community
dharmendrarhce
Enthusiast
Enthusiast
Jump to solution

How to change Guest OS type using powercli

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
Jump to solution

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

Reply
0 Kudos
13 Replies
admin
Immortal
Immortal
Jump to solution

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
Jump to solution

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

Reply
0 Kudos
dharmendrarhce
Enthusiast
Enthusiast
Jump to solution

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

Reply
0 Kudos
LucD
Leadership
Leadership
Jump to solution

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
Jump to solution

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 ?

Reply
0 Kudos
LucD
Leadership
Leadership
Jump to solution

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

Reply
0 Kudos
dharmendrarhce
Enthusiast
Enthusiast
Jump to solution

We are using 6.5...

Reply
0 Kudos
LucD
Leadership
Leadership
Jump to solution

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

Reply
0 Kudos
dharmendrarhce
Enthusiast
Enthusiast
Jump to solution

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

Reply
0 Kudos
LucD
Leadership
Leadership
Jump to solution

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

Reply
0 Kudos
dharmendrarhce
Enthusiast
Enthusiast
Jump to solution

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

Reply
0 Kudos
LucD
Leadership
Leadership
Jump to solution

Correct


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

Reply
0 Kudos
dharmendrarhce
Enthusiast
Enthusiast
Jump to solution

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

Reply
0 Kudos