VMware Cloud Community
erki72
Enthusiast
Enthusiast

PowerCli 6.5 > 6.7 Commands

Hi,

We deploy VMs with the System Center Orchestrator from Microsoft.
We have a PowerShell GUI for the information. The SCORCH then starts various scripts, including PowerCLI Script, to create and configure VMs.

Now we have upgraded the hosts from ESXi 6.5 to ESX6.7 U3. PowerCLI 6.5 is naturally still installed on the SCORCH.
The problem now:
We create VMs which also have disk controllers (Paravirtual) and other disks.
Commands we used:

Get-VM "VMNAME" | New-HardDisk -CapacityGB 10 -Datastore "DATASTORENAME" -Controller "SCSI Controller 2"
Get-VM "VMNAME" | New-HardDisk -CapacityGB 10 -Datastore "DATASTORENAME" | New-ScsiController -Type ParaVirtual

This is no longer possible on the 6.7 hosts.

Does anyone have any idea how I can do this without upgrading PowerCLI on the SCORCH? My concern is that if I adjust that, I have a lot of other scripts that I need to adjust.

Thanks for any advice

Reply
0 Kudos
9 Replies
LucD
Leadership
Leadership

What do you mean by "This is no longer possible on the 6.7 hosts"?

And the compatibility matrix is pretty clear that you will need to upgrade your PowerCLI version I'm afraid.

pcli-comp.jpg


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

Reply
0 Kudos
erki72
Enthusiast
Enthusiast

While I was writing below I see the problem in the matrix. We use vCenter 6.7 U3 😕

**

It is very confusing.

New VM> SCORCH> to ESXI 6.5 Host> Powercli 6.5 works
New VM> SCORCH> to ESXi 6.7 Host> Powercli 6.5 does not work

Configure the new VM on 6.7 Host, same commands with PowerCLi 12.1.0 works.

Why can't Powercli 6.5 do the disk configuration on hosts with ESXi 6.7U3?

 

Reply
0 Kudos
LucD
Leadership
Leadership

Those error messages do not really show me any incompatibility issues.
They just state the SCSI Controller with that name is not found.


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

Reply
0 Kudos
erki72
Enthusiast
Enthusiast

Of course, you are right.

What is the difference if it does not work for the same VM on PowerCLI version 6.5 and it works with 12.1?

Reply
0 Kudos
LucD
Leadership
Leadership

Is that SCSI controller supposed to be present on that VM?
How is the SCSI controller created?
Do you start from a Template?
Is the SCSI controller also created through a PowerCLI script?
You have to provide a bit more information to allow further analysis.


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

Reply
0 Kudos
erki72
Enthusiast
Enthusiast

We start a Powershell GUI. There the information is collected and transferred to a PowerCLI as variables.

The PowerCLI creates a new VM in the vCenter.
No template or no cloning. The VM is then installed with software distribution.

The VM is created in the vCenter, CPU, Memory and Disk C: \ is created.
Then another disk is made for special servers.

This is also stored in the PowerCLI and with the command which is in the PrintScreen.

The command works if the VM is on a 6.5 ESXi host. If the VM is on a 6.7 ESXi host, it doesn't work. It should create new disks and controllers each time

Get-VM VMNAME | New-HardDisk -CapacityGB 10 -Datastore DATASTORENAME | New-ScsiController -Type ParaVirtual
Get-VM VMNAME | New-HardDisk -CapacityGB 20 -Datastore DATASTORENAME | New-ScsiController -Type ParaVirtual
Get-VM VMNAME | New-HardDisk -CapacityGB 30 -Datastore DATASTORENAME -Controller "SCSI Controller 2"

Reply
0 Kudos
LucD
Leadership
Leadership

That first line does not correspond with the 1st line of the screenshot.
In the screenshot you provide the SCSIController parameter on the New-HardDisk cmdlet.
The error states that a controller with the name "SCSI Controller 2" is not found.



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

Reply
0 Kudos
erki72
Enthusiast
Enthusiast

I wanted to make it as easy as possible and therefore only post the essential part.

So that there is no misunderstanding, I'm sorry, I am posting the excerpt from the original process. 
Hope that brings more clarity now

Reply
0 Kudos
LucD
Leadership
Leadership

Ok, I understand.
But I'm afraid I can't help you any further.
That PowerCLI version is unsupported with the vSphere version you are using.
I tried those exact same commands with PowerCLI 12.1, and that works without a problem.

I think your only choice is to upgrade your PowerCLI version.


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

Reply
0 Kudos