Welcome to my VMWare resource pool!
"One small step for man, One giant leap for virtualization!
Monday, April 27, 2015
Monday, April 20, 2015
UtilityUNetbootin ISO to USB
UNetbootin allows you to create bootable Live USB drives for Ubuntu, Fedora, and other Linux distributions without burning a CD. It runs on Windows, Linux, and Mac OS X. You can either let UNetbootin download one of the many distributions supported out-of-the-box for you, or supply your own Linux .iso file if you've already downloaded one or your preferred distribution isn't on the list.
Wednesday, April 15, 2015
VCAP-DCA: esxcli Command List for Storage
In studying for the VCAP-DCA5 I have been using several great resources, Jason Nash’s VMware vSphere Optimize and Scale class @ Pluralsight, the #vbrownbag videos on You Tube, and The Unofficial VCAP-DCA5 Study Guide by Jason Langer and Josh Coen. One thing that I have learned is that I really need to study the esxcli command namespace and know when and how to use it.
To that end I have complied a concise list of all the commands from Langer and Coen’s guide in one place so I can quickly reference them as practice in my lab. This is not meant to teach or explain the commands, their guide does a great job of that already. The goal here was to create quick study sheet for lab use.
Because of the size of the Blueprint I have broken the list down by section. The following list contains all the esxcli commands that one needs to know for Section One: Implement and Manage Storage.
Disable automatic host registration
esxcli system settings advanced set -i=0 -o “/Disk/EnableNaviReg”
esxcli system settings advanced set -i=0 -o “/Disk/EnableNaviReg”
Increase Max NFS volumes
esxcli system settings advanced set -i=32 -o “/NFS/MaxVolumes”
esxcli system settings advanced set -i=32 -o “/NFS/MaxVolumes”
Increase the TCP Heap Size
esxcli system settings advanced set -i=16 -o “/Net/TcpipHeapSize”
esxcli system settings advanced set -i=16 -o “/Net/TcpipHeapSize”
Adding a LUN with an Existing VMFS Volume
esxcli storage vmfs snapshot list
esxcli storage vmfs snapshot mount -l ‘replicated_lun’
esxcli storage vmfs snapshot resignature -l ‘replicated_lun’
esxcli storage vmfs snapshot list
esxcli storage vmfs snapshot mount -l ‘replicated_lun’
esxcli storage vmfs snapshot resignature -l ‘replicated_lun’
Understand and apply LUN masking using PSA-related commands
esxcfg-scsidevs -m — the -m
esxcfg-mpath -L | grep naa.5000144fd4b74168
esxcli storage core claimrule add -r 500 -t location -A vmhba35 -C 0 -T 1 -L 0 -P MASK_PATH
esxcli storage core claimrule load
esxcli storage core claiming reclaim -d naa.5000144fd4b74168
esxcfg-scsidevs -m — the -m
esxcfg-mpath -L | grep naa.5000144fd4b74168
esxcli storage core claimrule add -r 500 -t location -A vmhba35 -C 0 -T 1 -L 0 -P MASK_PATH
esxcli storage core claimrule load
esxcli storage core claiming reclaim -d naa.5000144fd4b74168
Unmask a LUN
esxcli storage core claimrule remove -r 500
esxcli storage core claimrule load
esxcli storage core claiming unclaim -t location -A vmhba35 -C 0 -T 1 -L 0
esxcli storage core adapter rescan -A vmhba35
esxcli storage core claimrule remove -r 500
esxcli storage core claimrule load
esxcli storage core claiming unclaim -t location -A vmhba35 -C 0 -T 1 -L 0
esxcli storage core adapter rescan -A vmhba35
Identify and tag SSD devices
esxcli storage core device list
esxcli storage nmp device list
esxcli storage nmp satp rule add -s VMW_SATP_DEFAULT_AA -d naa.5000144f60f4627a -o enable_ssd
esxcli storage core claiming unclaim -t device -d naa.5000144f60f4627a
esxcli storage core claimrule load
esxcli storage core claimrule run
esxcli storage core device list
esxcli storage nmp device list
esxcli storage nmp satp rule add -s VMW_SATP_DEFAULT_AA -d naa.5000144f60f4627a -o enable_ssd
esxcli storage core claiming unclaim -t device -d naa.5000144f60f4627a
esxcli storage core claimrule load
esxcli storage core claimrule run
Display Hardware Acceleration Plug-Ins and Filter
esxcli storage core plugin list -N VAAI — displays plugins for VAAI
esxcli storage core plugin list -N Filter – displays VAAI filter
esxcli storage core plugin list -N VAAI — displays plugins for VAAI
esxcli storage core plugin list -N Filter – displays VAAI filter
Displaying whether the device supports VAAI and any attached filters
esxcli storage core device list -d naa.6006016014422a00683427125a61e011
esxcli storage core device list -d naa.6006016014422a00683427125a61e011
Display VAAI status of each primitive on a device
esxcli storage core device vaai status get -d naa.6006016014422a00683427125a61e011
esxcli storage core device vaai status get -d naa.6006016014422a00683427125a61e011
Display the current claim rules for filters and for VAAI
Filter — esxcli storage core claimrule list –c Filter
VAAI – esxcli storage core claimrule list –c VAAI
esxcli storage core claimrule add -c Filter -P VAAI_FILTER -t vendor -V vlabs -u
esxcli storage core claimrule add -c VAAI -P VMW_VAAI_VLABS -t vendor -V vlabs -u -f
esxcli storage core claimrule load -c Filter
esxcli storage core claimrule load -c VAAI
esxcli storage core claimrule run -c Filter
Filter — esxcli storage core claimrule list –c Filter
VAAI – esxcli storage core claimrule list –c VAAI
esxcli storage core claimrule add -c Filter -P VAAI_FILTER -t vendor -V vlabs -u
esxcli storage core claimrule add -c VAAI -P VMW_VAAI_VLABS -t vendor -V vlabs -u -f
esxcli storage core claimrule load -c Filter
esxcli storage core claimrule load -c VAAI
esxcli storage core claimrule run -c Filter
Unmount a Datastore
esxcli storage filesystem unmount -l vmfs_vcap_masking
esxcli storage filesystem unmount -l vmfs_vcap_masking
Mount a Datastore
esxcli storage filesystem mount -l vmfs_vcap_masking
esxcli storage filesystem mount -l vmfs_vcap_masking
Upgrade VMFS3 to VMFS5
esxcli storage vmfs upgrade -l vmfs3_upgrade
esxcli storage vmfs upgrade -l vmfs3_upgrade
Check to see if a new plug-in is registered
esxcli storage core plugin registration list
esxcli storage core plugin registration list
Register a plugin
esxcli storage core plugin registration add -m vcap_satp_va -N SATP -P VCAP_SATP_VA
esxcli storage core plugin registration add -m vcap_satp_va -N SATP -P VCAP_SATP_VA
Set a new default PSP for a SATP
esxcli storage nmp satp list
esxcli storage nmp satp set -s VMW_SATP_CX -P VMW_PSP_RR
esxcli storage nmp satp rule add -s VMW_SATP_CX -d naa.5000144f60f4627a
esxcli storage nmp satp rule list -s VMW_SATP_CX
esxcli storage nmp satp list
esxcli storage nmp satp set -s VMW_SATP_CX -P VMW_PSP_RR
esxcli storage nmp satp rule add -s VMW_SATP_CX -d naa.5000144f60f4627a
esxcli storage nmp satp rule list -s VMW_SATP_CX
Changing the PSP on a particular device
esxcli storage nmp device list -d naa.5000144fd4b74168
esxcli storage nmp device set -d naa.5000144fd4b74168 -P VMW_PSP_FIXED
esxcli storage nmp device list -d naa.5000144fd4b74168
esxcli storage nmp device set -d naa.5000144fd4b74168 -P VMW_PSP_FIXED
View the device configurations for devices assigned the RR and Fixed PSPs and the generic
esxcli storage nmp psp fixed deviceconfig get -d naa.5000144ff548121b
esxcli storage nmp psp generic deviceconfig get -d naa.5000144fd4b74168
esxcli storage nmp psp roundrobin deviceconfig get -d naa.5000144fd4b74168
esxcli storage nmp psp fixed deviceconfig get -d naa.5000144ff548121b
esxcli storage nmp psp generic deviceconfig get -d naa.5000144fd4b74168
esxcli storage nmp psp roundrobin deviceconfig get -d naa.5000144fd4b74168
Set the preferred path on a device using VMW_PSP_FIXED and customize different parameters for a device using VMW_PSP_RR
esxcli storage nmp psp fixed deviceconfig set -d naa.5000144ff548121b -p vmhba35:C1:T0:L0
esxcli storage nmp psp fixed deviceconfig get -d naa.5000144ff548121b
esxcli storage nmp psp roundrobin deviceconfig set -d naa.5000144fd4b74168 -I 2500 -t iops
esxcli storage nmp psp roundrobin deviceconfig get -d naa.5000144fd4b74168
esxcli storage nmp psp fixed deviceconfig set -d naa.5000144ff548121b -p vmhba35:C1:T0:L0
esxcli storage nmp psp fixed deviceconfig get -d naa.5000144ff548121b
esxcli storage nmp psp roundrobin deviceconfig set -d naa.5000144fd4b74168 -I 2500 -t iops
esxcli storage nmp psp roundrobin deviceconfig get -d naa.5000144fd4b74168
Set the device back to the VMW_PSP_RR default
esxcli storage nmp psp roundrobin deviceconfig set -d naa.5000144fd4b74168 -t default
esxcli storage nmp psp roundrobin deviceconfig set -d naa.5000144fd4b74168 -t default
Changing a device that is using the VMW_PSP_RR plug-in
esxcli storage nmp psp generic deviceconfig get -d naa.5000144fd4b74168
esxcli storage nmp psp generic deviceconfig set -d naa.5000144fd4b74168 -c ‘iops=5000′
esxcli storage nmp psp generic deviceconfig get -d naa.5000144fd4b74168
esxcli storage nmp psp generic deviceconfig set -d naa.5000144fd4b74168 -c ‘iops=5000′
iSCSI port binding
esxcli iscsi networkportal add -A vmhba35 -n vmk1
esxcli iscsi networkportal list
By Byron Schaller |
esxcli iscsi networkportal add -A vmhba35 -n vmk1
esxcli iscsi networkportal list
By Byron Schaller |
Monday, April 13, 2015
Friday, April 10, 2015
Thursday, April 9, 2015
The ultimate VM batch deployment script - VMWare
The ultimate VM batch deployment script - VMWare
link
*.ps1
# Load Windows PowerShell cmdlets for managing vSphere
Add-PsSnapin VMware.VimAutomation.Core -ea "SilentlyContinue"
#
# PowerCLI to create VMs from existing vSphere VM
# Version 1.0
# Magnus Andersson RTS
#
# Specify vCenter Server, vCenter Server username and vCenter Server user password
#Get vCenter Details : vCenter name, User, password
Write-Host "Please enter the vCenter Host Name :"
Write-Host " "
$vCenterName = vcenter.local
$Username = domain\user
$SecurePassword = Read-Host Password -AsSecureString
#Convert Secure Password to Plain Text
$PASS = `
[System.Runtime.InteropServices.Marshal]::SecureStringToBSTR($SecurePassword)
$PlainPassword = [System.Runtime.InteropServices.Marshal]::PtrToStringAuto($PASS)
#Connect to vCenter
Connect-VIServer -Server $vCenterName -User $Username -Password $PlainPassword
#
# Specify number of VMs you want to create
$vm_count = “10“
#
# Specify the VM you want to clone
$clone = “test“
#
# Specify the Customization Specification to use
$customspecification=”test-customization“
#
# Specify the datastore or datastore cluster placement
$ds = “DataStore1“
#
# Specify vCenter Server Virtual Machine & Templates folder
$Folder = “test folder“
#
# Specify the vSphere Cluster
$Cluster = “Cluster-LAB“
#
# Specify the VM name to the left of the – sign
$VM_prefix = “Test-0“
#
# End of user input parameters
#_______________________________________________________
#
write-host “Connecting to vCenter Server $vCenter” -foreground green
Connect-viserver $vCenter -user $vCenterUser -password $vCenterUserPassword -WarningAction 0
1..$vm_count | foreach {
$y=”{0:D2}” -f $_
$VM_name= $VM_prefix + $y
$ESXi=Get-Cluster $Cluster | Get-VMHost -state connected | Get-Random
write-host “Creation of VM $VM_name initiated” -foreground green
New-VM -Name $VM_Name -VM $clone -VMHost $ESXi -Datastore $ds -Location $Folder -OSCustomizationSpec $customspecification -RunAsync
}
#Remove-VM -VM $delete -DeleteFromDisk -Confirm:$false -RunAsync | Out-Null}
link
*.ps1
# Load Windows PowerShell cmdlets for managing vSphere
Add-PsSnapin VMware.VimAutomation.Core -ea "SilentlyContinue"
#
# PowerCLI to create VMs from existing vSphere VM
# Version 1.0
# Magnus Andersson RTS
#
# Specify vCenter Server, vCenter Server username and vCenter Server user password
#Get vCenter Details : vCenter name, User, password
Write-Host "Please enter the vCenter Host Name :"
Write-Host " "
$vCenterName = vcenter.local
$Username = domain\user
$SecurePassword = Read-Host Password -AsSecureString
#Convert Secure Password to Plain Text
$PASS = `
[System.Runtime.InteropServices.Marshal]::SecureStringToBSTR($SecurePassword)
$PlainPassword = [System.Runtime.InteropServices.Marshal]::PtrToStringAuto($PASS)
#Connect to vCenter
Connect-VIServer -Server $vCenterName -User $Username -Password $PlainPassword
#
# Specify number of VMs you want to create
$vm_count = “10“
#
# Specify the VM you want to clone
$clone = “test“
#
# Specify the Customization Specification to use
$customspecification=”test-customization“
#
# Specify the datastore or datastore cluster placement
$ds = “DataStore1“
#
# Specify vCenter Server Virtual Machine & Templates folder
$Folder = “test folder“
#
# Specify the vSphere Cluster
$Cluster = “Cluster-LAB“
#
# Specify the VM name to the left of the – sign
$VM_prefix = “Test-0“
#
# End of user input parameters
#_______________________________________________________
#
write-host “Connecting to vCenter Server $vCenter” -foreground green
Connect-viserver $vCenter -user $vCenterUser -password $vCenterUserPassword -WarningAction 0
1..$vm_count | foreach {
$y=”{0:D2}” -f $_
$VM_name= $VM_prefix + $y
$ESXi=Get-Cluster $Cluster | Get-VMHost -state connected | Get-Random
write-host “Creation of VM $VM_name initiated” -foreground green
New-VM -Name $VM_Name -VM $clone -VMHost $ESXi -Datastore $ds -Location $Folder -OSCustomizationSpec $customspecification -RunAsync
}
#Remove-VM -VM $delete -DeleteFromDisk -Confirm:$false -RunAsync | Out-Null}
Wednesday, April 8, 2015
Tuesday, April 7, 2015
Subscribe to:
Posts (Atom)
Vmware NSX SSL creation
Using OpenSSL for NSX Manager SSL import: Creates CSR and 4096 bit KEY Creating NSX 6.4.2 SSL openssl req -out nsxcert.csr -newkey rsa:40...
-
vmware converter – p2v – partition number must be set for the boot volume Leave a reply I was trying to archive old machine running R...
-
root@vcsa1 [ ~ ]# service-control –stop –all Perform stop operation. vmon_profile=ALL, svc_names=None, include_coreossvcs=True, i...
-
Adding a TCP/IP stack esxcli network ip netstack add -N "NFS" If vmkernal was pre-create then you will need to delete and...