Quick powercli search for information on recently deleted VMs

Share This:

Above is quick and dirty syntax that’s quite easy to remember!

More syntax options can be found here: http://www.virtu-al.net/2009/08/27/powercli-one-liners-last-10-vms-created-and-removed/

 

 

vSphere 6.x Enable & Disable iSCSI Jumbo Frames on vmk & vswitches powershell script

Share This:

 

 

PowerCLI Core on Mac OS Sierra setup guide

Share This:

“PowerCLI Core uses Microsoft PowerShell Core and .Net Core to enable users of Linux, Mac and Docker to now use the same cmdlets which were previously only available on windows.”

This will allow you to use PowerCLI and connect to vCenter Server / Hosts directly from your Mac Terminal!

1.Download the fling from:

https://labs.vmware.com/flings/powercli-core#summary

2.Download and Install Homebew

“Homebrew installs the stuff you need that Apple didn’t” – is a free and open-source software package management system that simplifies the installation of software on Apple’s macOS operating system – Amazing tool!

Open Terminal and run:

Output:

3. Install OpenSSL and Curl (using homebrew!)

Output:

4. Install wget (using homebrew!)

Output:

5. Donwload Powershell for MAC

Output:

6.Install Powershell (via GUI or terminal)

7.Create modules directory

8.Unzip flig contents to modules directory

9.Run powershell!

10. Import modules

11. Ignore the certs

12. Connect to vC:

Enjoy!

 

vSphere ESXi Rolling reboots Safe powershell script – Calculate Cluster load / Safe MM

Share This:

 

 

Calculate Cluster Load vSphere powershell script / function

Share This:

I was surprised I couldn’t find this script/function when looking across WWW.

Here it is!

 

HPE Stackato 3.4.2 / 3.6.2 cloud deployment automated for vSphere – Powershell

Share This:

Build template:

In order to run the Invoke-VMscript cmdlet, we need to spin up stackato VM from ovf, install VMware tools, run some recent updates/patches and save this VM as template.

  1. Deploy stackato VM from OVF
  2. Open VM Console and configure OS:
    Login with stackato/stackato
    Reset stackato password to stackato123 using passwd
    Change IP: kato op static_ip (give it free temporary IP in 172.x.x.x) example:
  3. Restart server:
  4. Set passwordless SUDO
  5. Update Ubuntu OS (glibc)
  6. Install VMware tools & Hardware
  7. Change permission for interface settings
  8. Set the IP address to 192.168.100.100 (this will be overwritten by the script):
  9. Shutdown guest OS and upgrade virtual hardware
  10. Clone VM to template, name should be stackato-3.x.2-template-vm-tools

 

 

Update all Host profiles from reference host script

Share This:

 

 

Enable / Disable alerts on ESXi Cluster script

Share This:

 

 

Configure all vDS port groups as Elastic script – vSphere 6.0 (vds 5/5.5)

Share This:

Tested on vSphere 6.0u1 vDS 5 and 5.5, Nov 2016

 

vBlock upgrade: Cisco Nexus 1000v VSM upgrade guide – example target version 5.2(1)SV3(1.5a)

Share This:

Cisco Nexus 1000v VSM upgrade

1.Download the necessary files from VCE portal based on your target RCM


2.Verify all the prerequisites on Cisco documentation:

(here’s the example for version we are upgrading to 5.2(1)SV3(1.5a)

3.Make sure there is sufficient space on active and standby VSM:

Log into active VSM
check active VSM disk space:
check the standby VSM disk space
– If needed delete old files using ‘delete’ command (always leave the current VSM version files just in case for the restore)
– repeat the same for standby VSM:

4.Copy the files onto active VSM.
In order to transfer the files, log onto active VSM and run:
– copy those onto the standby VSM

5.Copy running configuration to startup configuration

6.Power off standby VSM and clone to template:
After that power on the standby VSM and wait until it comes back up.

7.Backup and pre-checks
Log onto active VSM.
Copy running configuration to startup configuration:
Run pre-checks:
pre-cheksblog
Looking above we can see that the impact state is non-disruptive, we can verify the current and new version as well as ESXi compatibility.
It’s crucial that ESX hosts are compatible at this stage as the VEMs are not upgraded yet.

8.Verify Cisco VSG is not present in configuration

9.Begin the install
This will show the pre-checks table again and will prompt if you would like to take a backup. Select N (if you select Y, the installer will quiet and the backups are to be taken manually via scp commands as done in step 7)
The installer will hang on “Switching over onto standby” : (SSH session may timeout here, it’s OK!)
standbyblo
At this point wait few minutes and log-in to VSM (which is the standby VSM which has now became the active VSM)
Once logged in run:
blogcompl

10. Post-Installation checks
Run show version command on both active and standby VSM:

This should return the target version in our case 5.2(1)SV3(1.5a)

Copy running configuration to startup configuration (IMPORTANT)

Upgrade completed!