Author Archives: rajeev

Powercli script to create a new vswitch and enable it for iscsi

By | 9th December 2014

The following script creates a new vswitch by name iscsi Adds vmnic1 as the physical adapter adds the portgroup iscsi Interesting Note: to make the portgroup as vmkernel easy method to say -ConsoleNic:$false. #Configs $VC=”172.16.1.17″ #vcenter server $user=”root” $password=’vmware’ Connect-VIServer -Server $VC -User $user -Password $password $esxall=Get-VMHost -Server $VC foreach($esx in $esxall){ $vswitch = New-VirtualSwitch… Read More »

Finding Boot disk esxi :-

By | 28th October 2014

Get the boot disk ~ # esxcfg-info -b d3423273-74866287-4957-deafeb817dc7 Get the naa id of the disk using vmkfstools ~ # vmkfstools -Ph /vmfs/volumes/d3423273-74866287-4957-deafeb817dc7 vfat-0.04 file system spanning 1 partitions. File system label (if any): Mode: private Capacity 249.7 MB, 103.6 MB available, file block size 4 KB UUID: d3423273-74866287-4957-deafeb817dc7 Partitions spanned (on “disks”): naa.600508b1001c9bf288be32a406a9974d:6 Is… Read More »

Adding a single vib to software depot using powercli

By | 23rd August 2014

Use the following -PackageURL command to add a single vib to software Depot. Once it added we can add it to the Image Profile >Get-ESXsoftwarePackage –PackageURL <url of the vib> e.g. Following example I am adding the tools for ESXVMs(nested ESX) – It is available as a fling in https://labs.vmware.com/flings >>Get-EsxSoftwarePackage -PackageUrl http://download3.vmware.com/software/vmw-tools/esxi_tools_for_guests/esx-tools-for-esxi-9.7.1-0.0.00000.i386.vib Name Version Vendor… Read More »

Patching ESX/ESXi using Powercli

By | 20th July 2014

Applying ESX patching using Powercli I always had problem remembering the fields needed for patching ESXi using Powercli. This time I thought I will write it down. Get the command as a variable $cli so that it is easy. PowerCLI C:Program Files (x86)VMwareInfrastructurevSphere PowerCLI> $cli=Get-VMHost myhost.cloudtick.com | Get-EsxCli Run the command to understand the fields… Read More »

openstack nova python api

By | 23rd March 2014

Exploring the python nova api/commands…. The easiest way to the learn Openstack api is to use the devstack. Install the devstack on an Ubuntu machine(I have a 13.10 where devstack is running and an LTS 12.05 where I have installed my Nova client) 1. GIT Clone using the command git clone https://github.com/openstack-dev/devstack.git 2. Once done… Read More »

ESXi third party bundle installation (async driver)

By | 10th February 2014

One of  the easiest method to install a third party bundle is to use esxcli.  Discovered this while trying to install bnx2 driver. This bundle was installed on a 5.1 GA machine. ~ # esxcli software vib install -d /vmfs/volumes/Softwares/BCM-NetXtremeII-xx.0-offline_bundle-xxxx.zip Installation Result Message: The update completed successfully, but the system needs to be rebooted for… Read More »

Powercli: Getting details of VM in a host/vCenter

By | 18th June 2013

1. Connect the to the server/vc : Connect-VIServer -server 2.List the parameters for which we need the information. e.g. HardDisks,PowerState,host Get-VM | Format-List name,HardDisks,PowerState,host HardDisks                                                                      : {Hard disk 1} CDDrives                                                                       : {CD/DVD drive 1} FloppyDrives                                                                   : {Floppy drive 1} NetworkAdapters                                                                : {Network adapter 1, Network adapter 2} UsbDevices                                                                     : {} Host                                                                           :  mycloudtick1.com Id                                                                             :… Read More »

ESXi Patching in vSphere 5.0/5.1

By | 13th January 2013

Powercli can be used to create Image profiles and rules. This rules can be customized for specific server(as an example taking mac id) Adding the bundle to the software depot. C:Program Files (x86)VMwareInfrastructurevSphere PowerCLI> Add-EsxSoftwareDepot ‘C:Documents and SettingsAdministratorDesktopESXi500-XXXXXXX.zip ‘ Getting the image profile:This will list down the image profile of the Bundle that was added.… Read More »