Перейти до основного вмісту

Міграція VM між серверами ESXI

Enable SSH Service on Source and Destination ESXI Servers

To enable the SSH service, log in to the web interfaces for your ESXI servers. Then click on Host at the top right. Click Actions -> Services -> Enable Secure Shell (SSH) (if it is not already enabled).

Enable SSH Client Service on Source ESXI Server.

Log in to the SSH of the source ESXI server using the putty tool. You may need to run the below commands:

esxcli network firewall ruleset list --ruleset-id sshClient

Check if the SSH client service is enabled. If disabled, the command will return a result of ‘False’. If a ‘False’ response is returned, run this next command. If ‘False’ is not the returned response, proceed to the next step!

esxcli network firewall ruleset set --ruleset-id sshClient --enabled=true

Copy the VM from Source to Destination

Before running the below commands, make sure the VM that will be migrated is turned off in the source ESXI server.

Connect to your source ESXI server using putty or your favorite SSH client (depending on Windows or Mac OS).

Navigate to your datastore where your guest VM resides. By default, it will show as below.

cd /vmfs/volumes/datastore1/

Next, migrate the data to the proper datastore path in the Destination VM.

Afterward, execute the below command in the source ESXI server:

scp -rv /vmfs/volumes/datastore1/VM_NAME root@xx.xx.xx.xx:/vmfs/volumes/datastore1/

Press ‘Enter.’ You should be prompted for a password – then the migration process will begin. The time to complete the transfer depends on the network speed between the ESXI servers.


Convert Thick Provisioning to Thin Provisioning

Log in to your SSH console of the destination server. Then, navigate to the datastore path where the new VM data will be migrated from the old server.

cd /vmfs/volumes/datastore1/ VM_NAME

Run the below command to clone the VMDK to a thin provisioned disk using vmkfstools

vmkfstools -i VM_NAME.vmdk -d thin VM_NAME -thin.vmdk.

After the cloning is complete, list the files in the directory and verify that two files were created:

VM_NAME.vmdk and VM_NAME -thin.vmdk.

Rename the old flat file to a different name (e.g., mv VM_NAME-flat.vmdk VM_NAME-flat.vmdk.old)

Rename the new flat file to a different name (e.g., mv VM_NAME-thin-flat.vmdk VM_NAME-flat.vmdk)


Register the Migrated VM on the ESXI Host

Log in to the web interface of the destination ESXI server where the VM was migrated from the source server.

Click on Virtual Machines --> Create/Register VM

Select ‘Register an Existing Virtual Machine.' Then select one or more virtual machines, a datastore, or a directory. Select the folder of the VM Guest you moved to the new server. Click: Select --> Next --> Finish

Once you turn on the migrated VM in the destination ESXI server for the first time, you will be prompted to answer if you moved or copied the guest machine. Leave the default “I Copied It” and click “Answer.”

If the migration was completed without any errors, the VMs should start in the new host.



Пораду знайшов тут

https://www.filecloud.com/blog/2022/07/migrating-vms-between-esxi-servers-using-scp-command/




Коментарі

Популярні дописи з цього блогу

Подключение Cisco 7911/7912 по SIP к Asterisk

Аппарат Cisco IP Phone 7911 по-умолчанию настроен на использование протокола SCCP. Можно в Asterisk указать использование модулей SCCP, но для единообразия удобнее использовать SIP. Для использования протокола SIP в аппарате Cisco 7911 нужно обновить программное обеспечение.  Код обновления для загрузки в аппарат нужно скачать с сервера Cisco: http://tools.cisco.com/support/downloads/pub/Redirect.x?mdfid=278875240 Самое последнее обновление (на данный момент версия 9.3) может не работать c Asterisk, с  версии 9.X Cisco переходит на использование только TCP для SIP соединений. Поэтому для использования UDP удобнее скачать обновление версии 8.5.2 или 8.5.4. Может понадобится  вначале   установить обновление 8.5.2, а затем 8.5.4. Например, для обновления с SCCP11.8-2-2SR-4S надо вначале установить 8.5.2 Обновление будет производится с сервера  TFTP, поэтому д ля начала нужно настроить сервер DHCP, TFTP. Причем в DHCP нужно настроить опцию 150, которая используется для указания аппа

Панель инструментов Remmina в полноэкранном режиме Ubuntu 12.04

Пакет Remmina 0.9.99 (протокол RDP) в системе Ubuntu 12.04 используется как клиент для доступа к терминальному серверу. Обнаружено странное поведение панели инструментов в полноэкранном режиме на терминальном сервере- панель инструментов исчезает и невозможно перейти в другое окно или закрыть сеанс. Для сворачивания окна можно использовать комбинацию клавиш CTRL+F9. Комбинации клавиш задаются в настройках Remmina, а CTRL нужно, чтобы комбинацию не перехватил терминальный сервер. В настройках Remmina есть параметр "Спрятать панель инструментов в полноэкранном режиме". Но иногда, даже если не указан этот параметр, меню не отображается. Можно, не закрывая терминальную сессию, изменить этот параметр на противоположный и после возврата в сессию, меню начнет появляться. В следующий раз перед открытием новых сессий в Remmina нужно правильно указать значение этого параметра. Размер иконок в панели инструментов можно изменить через основное меню Remmina

Изменение размера бумаги LibreOffice(OpenOffice)

Если при установке Ubuntu указать локаль «USA», то размер бумаги по-умолчанию установится «Letter». Если потом через «Система- Администрирование- Локализации» изменить локаль на «Украинский» («Русский»), изменится язык системы, формат даты, но размер бумаги по-умолчанию и единица измерения останутся прежними.  Совет нашел в http://www.nixp.ru/recipes/%D0%9A%D0%B0%D0%BA-%D1%83%D1%81%D1%82%D0%B0%D0%BD%D0%BE%D0%B2%D0%B8%D1%82%D1%8C-%D1%80%D0%B0%D0%B7%D0%BC%D0%B5%D1%80-%D0%B1%D1%83%D0%BC%D0%B0%D0%B3%D0%B8-%D0%B2-OpenOffice-org-%D0%BF%D0%BE-%D1%83%D0%BC%D0%BE%D0%BB%D1%87%D0%B0%D0%BD%D0%B8%D1%8E-%28libpaper%29.html Нужно в терминале запустить sudo dpkg-reconfigure libpaper1 В открывшемся списке выбрать формат А4. Можно напрямую в файле конфигурации (/etc/papersize) указать размер А4. Проверить можно в LibreOffice(OpenOffice) через меню «Формат-Страница». Еще в LibreOffice(OpenOffice) нужно изменить единицу измерения через «Сервис- Параметры- LibreOffice Writer- Общие»