Vmware CLI Value Commands

      Yorum yok Vmware CLI Value Commands

VM Power CLI

Connect-VIServer -Server 10.200.115.15

Set-PowerCLIConfiguration -InvalidCertificateAction Ignore -Confirm:$false
Set-PowerCLIConfiguration -Scope User -InvalidCertificateAction warn

ESXI host Register VM

find /vmfs/volumes/5e663972-baa48407-c77d-ac162d8cfb90 -name "*.vmx" -exec vim-cmd solo/registervm {} \;

ESXi
Register all VMs on a single datastore.

~ # find /vmfs/volumes/<datastorename>/ -maxdepth 2 -name '*.vmx' -exec vim-cmd solo/registervm "{}" \;
Register all VMs on all datastores.

~ # find /vmfs/volumes/ -maxdepth 3 -name '*.vmx' -exec vim-cmd solo/registervm "{}" \;
ESX
Register all VMs on a single datastore.

~ # find /vmfs/volumes/<datastorename>/ -maxdepth 2 -name '*.vmx' -exec vmware-cmd -s register "{}" \;
Register all VMs on all datastores.

~ # find /vmfs/volumes/ -maxdepth 3 -name '*.vmx' -exec vmware-cmd -s register "{}" \;
~ # find /vmfs/volumes/5e663972-baa48407-c77d-ac162d8cfb90 -name "*.vmx" -exec vim-cmd solo/registervm {} \;

 

RDM Disks

Use RDM disk in physical compatibility
Use RDM disk with lower size than 2TB in using virtual compatibility

LEGACY CPU SUPPORT (unsupported cpu vmware esxi)

Basically, you have to edit the boot.cfg file located in two places on the boot media. You can find this file in /bootbank/boot.cfg and in /altbootbank/boot.cfg.

There is a "kernelopt" section where you can append this parameter.
[root@ESX4:~] vi /bootbank/boot.cfg
[root@ESX4:~] vi /altbootbank/boot.cfg

kernelopt=autopartition=FALSE AllowLegacyCpu=true

 

VM Commands

Install-Module -Name VMware.PowerCLI
-----------------------------------------------

Set-PowerCLIConfiguration -InvalidCertificateAction Ignore -Confirm:$false
Connect-VIServer -Server 10.200.115.100

Get-VM -name *REPLICA
Get-VM -name *REPLICA | Get-NetworkAdapter
Get-VM -name *REPLICA | Start-VM
Get-VM -name *REPLICA | Get-VMQuestion | Set-VMQuestion -DefaultOption
Get-VM -name *REPLICA | Get-NetworkAdapter | Set-NetworkAdapter -Connected:$true
Get-VM -name *REPLICA | Get-NetworkAdapter | Set-NetworkAdapter -NetworkName ODM_VLAN_122
Get-VM -name *REPLICA | Get-NetworkAdapter | Set-NetworkAdapter -Connected:$true

Get-VM -name *REPLICA | Set-VMQuestion –Option "I Copied it"
Get-VM -name *REPLICA | Get-NetworkAdapter | Set-NetworkAdapter -NetworkName ODM_VLAN_122 -Confirm:$false
Get-VMQuestion | Set-VMQuestion –Option "I copied it"

Get-VM -name *REPLICA | Stop-VM
Get-VM -name *REPLICA | Remove-Inventory

ESXI Update CLI Commandline

esxcli software vib install --depot=/xsigo-6.0.0.ESX.1-1vmw.600.0.0.2494585.zip

esxcli software vib install -d "/vmfs/volumes/VSP-G700-DATASTORE-34-5029/ZIP/VMware-ESXi-6.5.0.update02-10719125-LNV-20190308.zip"

esxcli software profile update -d /vmfs/volumes/hl-flash-ds01/VMware-ESXi-6.7.0-8169922-depot.zip -p ESXi-6.7.0-8169922-standard

IBM & LENOVO

esxcli software vib remove -n concretejob
esxcli software vib remove -n filetrans
esxcli software vib remove -n fupb
esxcli software vib remove -n fwupdate
esxcli software vib remove -n hwckvm
esxcli software vib remove -n ilfu
esxcli software vib remove -n immpassthru
esxcli software vib remove -n pciinfo

HPE-HEWLETT PACKARD

esxcli software vib remove -n Mellanox
esxcli software vib remove -n net-mlx4-en
Remove the net-mlx4-core driver.
esxcli software vib remove -n net-mlx4-core
Remove the nmlx4-en driver.
esxcli software vib remove -n nmlx4-en
Remove the nmlx4-core driver.
esxcli software vib remove -n nmlx4-core
Reboot the server.
Install the new driver.


esxcli software vib list | grep Mel
esxcli software vib remove -n net-mlx4-en
esxcli software vib remove -n net-mlx4-core
esxcli software vib remove --vibname=net-mst
esxcli software vib remove -n Mellanox
esxcli software vib list | grep -i mellanox
esxcli software vib remove -n net-mst
esxcli software vib remove --vibname net-mlx4-en
esxcli software vib list | grep "net-mlx4-en"
esxcli software vib remove -n net-mlx4-en

Bir cevap yazın

E-posta hesabınız yayımlanmayacak. Gerekli alanlar * ile işaretlenmişlerdir

This site uses Akismet to reduce spam. Learn how your comment data is processed.