viernes, 17 de abril de 2020

Creating Multiple Disk with VMware PowerCLI



Hello Guys,

In this post I'm going to show you how to create multiple disks on Vmware vSphere using VMware PowerCLI:


The command has the next parameters:


New Hard Disk: Start the command
CapacityGB: Capacity in GB
Datastore: The name of the Datastore
StorageFormat: Could Be Thin, Thick or EagerZeroedThick
ScsiController: The name of the scsi controller where we assign the disk.

For more visit:  https://pubs.vmware.com/vsphere-51/index.jsp?topic=%2Fcom.vmware.powercli.cmdletref.doc%2FNew-HardDisk.html

Save the virtual machine in a variable:

$vm=Get-VM -Name VMwareVirtualMachine

One Disk:

New-HardDisk -VM $vm -CapacityGB 1 -Datastore MyDatastore -StorageFormat EagerZeroedThick -Controller "SCSI Controller 1"

Multiple Disks:

ForEach ($HardDisk in (1..6))

      {

          New-HardDisk -VM $vm -CapacityGB 1 -Datastore MyDatastore -               StorageFormat EagerZeroedThick -Controller "SCSI Controller 1"


      }


No hay comentarios:

Publicar un comentario

Installing Kubernetes on RHEL 9

  Hello Guys, In this post I will show you how to install a Kubernetes cluster on RHEL8. Let's Start: Disablle Swapp: sudo swapoff -a Co...