Friday, March 31, 2017

PowerCLI using Linux

How to Install and Use PowerCLI from Linux. 

Disclaimer

Don't expect to find all the commands typically found in the Windows counterpart.
Good luck finding autodeploy, imagebuilder and vum commands.

1. From a Linux system (Ubuntu in my case), launch your browser and to to labs.vmware.com.


2. Find PowerCLI Core and download it. In the process, download the Instructions.pdf.


3. Download PowerShell for Linux using the curl command.

# curl -SLO https://github.com/PowerShell/PowerShell/releases/download/v6.0.0-alpha.12/powershell_6.0.0.-alpha.12-11ubuntu1.14.04.1_amd64.deb

4. Install the package by force using the dpkg command.

# sudo dpkg -i powershell*.deb
# sudo apt-get install -f

5. Verify the package is install with the dpkg -l command


6. Create the Modules directory for PowerCLI

# mkdir -p ~/.local/share/powershell/Modules

7. Copy the PowerCLI file and extract it.

# cp PowerCLI_Core* ~/local/share/powershell/Modules

8. Extract the zip files, including PowerCLI.ViCore and PowerCLI.Vds. Verify the contents.

# cd ~/local/share/powershell/Modules
# unzip PowerCLI.ViCore.zip
# unzip PowerCLI.Vds.zip



9. Launch powershell


10. Import the PowerCLI Modules


11. Verify the are loaded


12. Instruct powercli to ignore invalid certificates and use it.



Some useful links:

http://www.virtuallyghetto.com/2016/09/vmware-powercli-for-mac-os-x-linux-more-yes-please.html

https://www.vmguru.com/2016/10/powercli-os-x-linux-fling/

Tuesday, March 21, 2017

Storage IO Control in vSphere 6.5


What is Storage I/O Control?

Storage IO Control is used to control the IO usage of virtual machines and gradually enforce pre-defined shares. Shares can be high, medium or low. This feature was introduced in vSphere 4.1 and requires the Enterprise Plus License.

Step 1: Create a datastore. VMFS was used in this case and a datastore called dy (datastore y) was created.



Step 2: SIOC is now managed via IO Filters Providers. You can easily see the filters are registered automatically. You can select the vCenter server and see these filters.


Step 3: To enable SIOC on a datastore, right click on the datastore and enable SIOC.


Step 4: Next, create a virtual machine policy. Click on Home and select VM Storage Policies to create a new SIOC policy.


Step 5: Name the policy and click on Next.


Step 6: Select SIOC and select High, Medium or Low Shares.





Step 7: Now, apply the policy to the virtual machine. Right click on an existing virtual machine  and edit Storage Policies. Select the policy to use and select Apply All.