Mostrando postagens com marcador vmware. Mostrar todas as postagens
Mostrando postagens com marcador vmware. Mostrar todas as postagens

Reiniciar VCenter

 

Opção 1: Pela Interface VAMI (Recomendado)
  1. Acesse o portal de gerenciamento pelo endereço: https://<IP_DO_VCENTER_OU_FQDN>:5480.
  2. Efetue login com as credenciais de root.
  3. No menu de navegação, clique em Actions (Ações).
  4. Selecione Reboot (Reiniciar). [1, 2]
Opção 2: Pelo Host ESXi
  1. Acesse o VMware Host Client diretamente no host ESXi onde o vCenter está alocado.
  2. Localize a máquina virtual do vCenter na lista e clique com o botão direito nela.
  3. Vá em Power e selecione Reboot Guest OS.

 

Ou por SSH e comando reboot 

View simplivity OVC disc use

Conectar, via SSH (usuário Administrator@vSphere.Local), em uma das OVCs


sudo su
. /var/tmp/build/bin/appsetup

dsv-balance-show --showNodeIP

VMWare vSphere: Managing Password Expiration Settings - VCenter

 You will need the dir-cli tool, which is located in /usr/lib/vmware-vmafd/bin/.

cd /usr/lib/vmware-vmafd/bin/

Check that the local user exists:

./dir-cli user find-by-name --account backup_user

You can change the password for this user:

./dir-cli password reset --account backup_user --password OldBackupP@$$ --new NewBackupP@$$

Or you can set password to never expire:

./dir-cli user modify --account backup_user --password-never-expires

You can change the password expiration settings for root or set it to never expire (if its value is 0).

Also you can check the root password expiration setting from your vCSA console:

chage -l root

source: https://woshub.com/vmware-password-expiration-settings/

Vmware Linux Guest Add a New Hard Disk Without Rebooting

List SCSI hosts
ls /sys/class/scsi_host

Update info
echo "- - -" > /sys/class/scsi_host/host#/scan

Update all

echo "- - -" | tee /sys/class/scsi_host/host*/scan


Now, you can create partition using fdisk and format it using mkfs.ext3 command:
cfdisk /dev/sdc

### [if you want ext4 fs] ###
mkfs.ext4 /dev/sdc3

Create a Mount Point And Update /etc/fstab

First, type the following mkdir command to make a dir/folder to mount the disk:
mkdir /disk3

Open the /etc/fstab file, enter:
vi /etc/fstab
/dev/sdc3               /disk3           ext4    defaults  



How Do I Delete a Single Device Called /dev/sdc?

In addition to re-scanning the entire bus, a specific device can be added or existing device deleted using the following command:
echo 1 > /sys/block/devName/device/delete
echo 1 > /sys/block/sdc/device/delete

 

source: https://www.cyberciti.biz/tips/vmware-add-a-new-hard-disk-without-rebooting-guest.html

Add new disc linux host vmware


Scan all existing hosts with a one-liner:

for host in /sys/class/scsi_host/*; do echo "- - -" | sudo tee $host/scan; ls /dev/sd* ; done


fdisk /dev/sdb
m to menu
n to new partition
w to write

mkfs.ext4 /dev/sdb1 to format

Resize disc: 

To make the kernel aware, one can issue the following command as root:

echo 1 > /sys/class/block/sdb/device/rescan
parted /dev/sdb
print
resizepart 1 
quit parted
sudo partprobe 
 
Resize File system 
umount /dev/block_device
e2fsck -f /dev/block_device
resize2fs /dev/block_device
 
 
 
 

Zabbix collect vSphere info

1) Create vSphere host
2) Add 3 macros:
- {$USERNAME} - username which has an administrative privileges on VMware
- {$PASSWORD) - password for username
- {$URL} - https://10.10.10.10/sdk (where 10.10.10.10 is the address of vSphere host, not VMware supervisor)
- {$UUID} - vsphere UUID - https://host/mob/?moid=ha-host&doPath=hardware.systemInfo
3) Add 3 templates to vSphere host:
- Template Virt VMware
- Template Virt VMware Guest
- Template Virt VMware Hypervisor

Enable Object Browser in vSphere 6.x

Starting with vSphere 6.0 the Managed Object Browser is disabled by default to avoid malicious configuration changes or actions. You can enable and disable the Managed Object Browser manually.

To enable or disable the Managed Object Browser by using the vSphere Client connected directly to the ESXi host, complete the following steps:

1 - In the vSphere Client, select the host in the inventory.
2 - In the right pane, click the Configuration tab.
3 - Under Software, select Advanced Settings.
4 - From the left pane of the Advanced Settings dialog box, select Config > HostAgent > plugins > solo.
5 - Select or deselect Config.HostAgent.plugins.solo.enableMob to enable or disable the Managed Object Browser.

To enable or disable the Managed Object Browser by using the vSphere Web Client, complete the following steps:

1 - Browse to the host in the vSphere Web Client navigator.
2 - On the Manage tab and click Settings.
3 - Under System, select Advanced System Settings.
4 - Select the Config.HostAgent.plugins.solo.enableMob option and click Edit to enable or disable the Managed Object Browser.

ESXI CLI

Activate SNMP on VSphere client
Configuration -> Security Profile -> Firewall -> Properties -> SNMP


Connect to ESXI using SSH and run the command below, changing community, contact email and location:

esxcli system snmp set -r && esxcli system snmp set -c public && esxcli system snmp set -p 161 && esxcli system snmp set -C contact@domain.com && esxcli system snmp set -L "City, State" && esxcli system snmp set -e yes


#firewall all hosts
esxcli network firewall ruleset set --ruleset-id snmp --allowed-all true
esxcli network firewall ruleset set --ruleset-id snmp --enabled true
#firewall for specific network
esxcli network firewall ruleset set --ruleset-id snmp --allowed-all false
esxcli network firewall ruleset allowedip add --ruleset-id snmp --ip-address 10.20.0.0.0/23
esxcli network firewall ruleset set --ruleset-id snmp --enabled true
#restart snmp
/etc/init.d/snmpd restart 



Set time:
esxcli system time set -d 31 -M 1 -y 2012 -H 18 -m 0 -s 0

source: https://kb.vmware.com/s/article/1003736


View log in browser:

https://server_ip_or_name/host/syslog.log





Use the Direct Console User Interface (DCUI) over ssh



1 - Browse to the host in the vSphere Web Client inventory.
2 - Click the Manage tab and click Settings.
3 - Under System, select Security Profile.
4 - In the Services panel, click Edit.
5 - Select a service from the list.

        ESXi Shell
        SSH
        Direct Console UI
      
6 - Click Service Details and select the startup policy Start and stop manually.
When you select Start and stop manually, the service does not start when you reboot the host. If you want the service to start when you reboot the host, select Start and stop with host.
7 - Select Start to enable the service.
8 - Click OK.

9 - Access the server over ssh andrun

dcui

ctrl+c to exit

ESXi Retrieving Networking Information

Linux commands for retrieving networking information are not included in the ESXi Shell. You can instead use ESXCLI commands.

On ESXi 5.0, ifconfig information is the information for the VMkernel NIC that attaches to the Management Network port group. You can retrieve that information by using ESXCLI commands.

    esxcli network ip interface list

    esxcli network ip interface ipv4 get -n vmk<X>

    esxcli network ip interface ipv6 get -n vmk<X>

    esxcli network ip interface ipv6 address list


You can retrieve information about DNS with the esxcli network ip dns command in the following two namespaces:

    esxcli network ip dns search

    esxcli network ip dns server


For information corresponding to the Linux netstat command, use the following ESXCLI command.

    esxcli network ip connection list

Shutdown VMWare guests


Method 1

#list Vms
vim-cmd vmsvc/getallvms

#get power state
vim-cmd vmsvc/power.getstate "VMID"

#Shutdown

vim-cmd vmsvc/power.shutdown "VMID"

Note: If the virtual machine fails to shut down, run this command:

vim-cmd vmsvc/power.off "VMID"


Method 2

#Get Vms info
esxcli vm process list |grep -i World |cut -d: -f2

#shutdown Vm
esxcli vms vm kill --type= [soft,hard,force] --world-id= WorldNumber
ex: esxcli vm process kill -w 69237 -t soft 


Enable wol in vmware host

list network adapters
esxcli network nic list

check if network adapter supports wake-on-lan and it is enabled
esxcli network nic get -n vmnic0 | grep Wakeon

enable wol in network adapter, add this line before the line init 0 in local.sh file
vi /etc/rc.local.d/local.sh

ethtool -s vmnic0 wol g

Adicionar registro DNS windows linha de comando

 Usando o Prompt de Comando (dnscmd)Abra o Prompt de Comando como Administrador e utilize a seguinte estrutura para adicionar um registro do...

Mais vistos