vMA 配置 FastPass

  使用vMA管理ESX/ESXi的时候每条命令都需要输入–server 192.168.1.101 –usarname root,很是麻烦。其实可以使用vifp让vMA记住这些服务器的用户名密码。

使用下面的命令添加服务器,并输入root的密码。
vifp addserver 192.168.1.101 --username root
vifp addserver 192.168.1.102 --username root

使用vifp listservers可以显示在FastPass中的所有服务器:
[vi-admin@localhost ~]$ vifp listservers
192.168.1.101 ESXi
192.168.1.102 ESXi

使用vifptarget -s设置需要操作的主机,设置后所有的操作都针对此主机,使用完后可-s一个新的主机,或者-c退出。
[vi-admin@localhost ~]$ vifptarget -s 192.168.1.101
[vi-admin@localhost ~][192.168.1.101]$ esxcfg-ntp -l
Configured NTP servers:
192.168.1.1
[vi-admin@localhost ~][192.168.1.101]$ vifptarget -s 192.168.1.102
[vi-admin@localhost ~][192.168.1.102]$ esxcfg-ntp -l
No NTP servers configured.
[vi-admin@localhost ~][192.168.1.102]$ esxcfg-ntp -a 172.16.170.1
Configuring 172.16.170.1 as NTP server.
[vi-admin@localhost ~][192.168.1.102]$ esxcfg-ntp -l
Configured NTP servers:
192.168.1.1
[vi-admin@localhost ~][192.168.1.102]$ esxcfg-ntp -s
Stopped NTP service on host.
[vi-admin@localhost ~][192.168.1.102]$ esxcfg-ntp -r
Started NTP service on host.
[vi-admin@localhost ~][192.168.1.102]$ vifptarget -c
[vi-admin@localhost ~]$