VCenter. Hints
Время сессии пользователя в веб-клиенте (session timeout)
Подключаемся по ssh
vi /etc/vmware/vsphere-client/webclient.properties
... Session.timeout = 1440 // в минутах (24 часа) ...
vi /etc/vmware/vsphere-ui/webclient.properties
... Session.timeout = 1440 // в минутах (24 часа) ...
service-control --stop vsphere-client
service-control --start vsphere-client
service-control --stop vsphere-ui
service-control --start vsphere-ui
Ошибка при миграции: Virtual ethernet card 'Network adapter 1' is not supported. "This is not a limitation of the host in general, but of the virtual machine's configured guest OS on the selected host."
Описание
Сетевой адаптер в ВМ был создан в другой инфраструктуре
Решение
Удалить сетевой адаптер и создать новый с типом VMXNET 3
Бэкап БД vcenter
https://<IP_vcenter>:5480/ui/backup
Ошибка при логине в https://<ip_vcenter>:5480: Exception in invoking authentication handler User password expired ИЛИ Unable to login
Решение
сначала меняем пароль в vcenter:
на главном экране vcenter https://<IP_vcenter>/ui справа вверху:
Administrator@vsphere.local - Change password
меняем пароль
логинимся по SSH в <IP_vcenter>
root
<pass_same_as_for_administrator@vsphere.local>
команды:
shell
chage -l root # смотрим действительно ли истек срок пароля
passwd # задаём новый пароль
логинимся в https://<IP_vcenter>:5480
Administration - Password expiration settings:
Password expires - NO
Syslog на удаленный сервер
https://<vcenter_IP>:5480
Syslog - Configure:
192.168.199.228
UDP
514
Сменить пароль vcenter (change password)
Log in to the vSphere Web Client using your vCenter Single Sign On credentials.
In the upper navigation pane, click your user name to pull down the menu.
Select Change Password and type your current password.
Type a new password and confirm it.
Click OK.
Изменить правила для пароля
Administration - Single Sign On - Configuration
Restore forgotten root password
https://www.ubackup.com/enterprise-backup/reset-vcenter-root-password.html
- Take a snapshot of the VM
- reboot vcenter
- Once the photon OS splash screen is showing, quickly press “e” to reveal the Grub boot menu.
- Then on the GNU GRUB menu, type:
$systemd_cmdline rw init=/bin/bash
..after "$conscleblank=0" via space
- Press F10 to boot.
- This will now boot vCenter server appliance into root shell directly. To reset the password, you can enter the following command and provide a new root password (twice for confirmation).
passwd
- Unmount the filesystem by running this command (yes, the unmount command is umount - it's not a spelling error):
umount /
Change root password ON ESXI HOST WHICH IS A MEMBER OF A CLUSTER
1) How to change root password on esxi host which is a member of a cluster.
2) Do i need to add again once the root password change ?
3) is there any other concerns to change the password
Solution
1) You can change root password by ssh ("passwd root"), by ESXi console (Customize System -> Configure Password), by vSphere client (connect direct to ESXi host -> Local users & group -> select root -> Edit -> Change password)
2) & 3) I don't see concern in procedure change root password, because the configuration of the cluster is saved in the vcenter and vcenter uses a special account vpxuser
Совместимость продуктов vmware
Например, необходимо узнать какая версия vcenter совместима с версией vsphere replication определенной версии
https://www.vmware.com/resources/compatibility/sim/interop_matrix.php
Single Sign-On (SSO)
(vsphere client на Adobe Flash)
https://192.168.172.45:9443/vsphere-client/
root
<pass-to-vcenter-same-as-for-administrator@vsphere.local>
VCenter управление через powershell
powershell (от Администратора)
Установка модуля
PS C:\WINDOWS\system32> Install-Module VMware.PowerCLI
Игнорирование "неправильного" сертификата vcenter
PS C:\WINDOWS\system32> Set-PowerCLIConfiguration -InvalidCertificateAction Ignore -Confirm:$false
... Scope ProxyPolicy DefaultVIServerMode InvalidCertificateAction DisplayDeprecationWarnings WebOperationTimeout Seconds ----- ----------- ------------------- ------------------------ -------------------------- ------------------- Session UseSystemProxy Multiple Ignore True 300 User Ignore AllUsers ...
Подключение к vcenter (одновременно разрешено подключение только к одному серверу vcenter)
PS C:\WINDOWS\system32> Connect-VIServer 192.168.199.16
... Name Port User ---- ---- ---- 192.168.199.16 443 VSPHERE.LOCAL\Administrator ...
Получение информации о ВМ
PS C:\WINDOWS\system32> Get-VM -Name centos7-zabbix
... Name PowerState Num CPUs MemoryGB ---- ---------- -------- -------- centos7-zabbix PoweredOff 6 8,000 centos7-zabbix PoweredOn 6 8,000 ...
Развернуть вм из ovf на vcenter
MyDatastore1 - имя Storage MyHost - имя (IP) esxi сервера в составе vcenter
PS6> $myDatastore = Get-Datastore -Name "MyDatastore1"
PS6> $vmHost = Get-VMHost -Name "MyHost"
PS6> $vmHost | Import-vApp -Source 'C:\Exported-OVF\My_VM_Template\My_VM_Template.ovf' -Datastore $myDatastore -Force
Ошибка при запуске консоли вм в vcenter через vsphere client windows app: Unable to connect to the MKS: Could not connect to pipe \\.\pipe\vmware-authdpipe within retry period.
Решение
Скорее всего проблема в том, что vSphere Client запускается за фаерволом из другой подсети
Попробовать запустить vSphere Client в той же подсети, где и vCenter
ERROR. Web interface: [400] An error occurred while sending a logout request to the vCenter Single Sign-On server - An error occurred when processing the metadata during vCenter Single Sign-On setup - Failed to connect to VMware Lookup Service - SSL certificate verification failed
Solution
- логинимся в vcenter по SSH
> Shell
# /usr/lib/vmware-vmca/bin/certificate-manager
- выбираем 8 пункт (reset all certs)
- отвечаем на все вопросы (самое главное вписать IP-адрес vcenter при соответствующем запросе)
- ждем (может быть долго)
- логинимся в веб-интерфейс, разрешаем новый серт
- если имеется Veeam сервер
- заходим в Inventory - ПКМ по IP vcenter - Properties - Credentials
- пересохраняем Credential для vcenter, соглашаемся с новым сертом, сохраняем
- ПКМ по IP vcenter - Rescan
- ждем обновления списка ВМ (может быть долго!)