Migrating Virtual Machines

Uncategorized

One of the advantages which virtual machines has over physical machines is migration, which is easy and fully restored. For migration, Compute resources and storage resources are grouped ,in which both can be moved to new ESXi or if the storage is already shared between ESXi’s only compute resources can be moved. Since its a set of configuration files, the movement and restoration is faster compared to physical machine migration

A dedicated switch with VMotion service needs to be enabled for migration .Systems cannot be migration with general VMKernel adapters.

In this lab, we migrate storage of a VM,then compute resouce and finally both resources and power on VM’s and check the connectivity by Pinging Gateways of VM after migration.

Task1:Migrate Virtual Machine files from local storage to the shared storage

Step1: Click VMs and templates>VM2-1 >Power on

Step2: Summary tab of VM2-1 and verify the storage – Local 02-1

Step3: RIght click VM2-1 and click Migrate

Step4: Migration window, select storage only and click next

Step5: Select Shared Iscsi VMFS storage to move the VM

Step6: Review and finish

Step7: verify datastore in summary tab of VM2-1

Task2:Create a Virtual Switch and a VMKernel Port group for Vsphere Vmotion Migration

Step1: Create a VMKernel adapter by selecting ESXI>Virtual Switches>Add host networking

Step2: Select the new switch

Step3: Select the dedicated adapter for VMotion

Step4: Edit the properties of port by naming it as Vmotion and enable Vmotion service

Step5: Provide the IP address for port as 172.20.12.51 with prefix length 24 and gateway as 172.20.12.10

Step6: Review and finish

Step7: Verify the switch in details pane

Step8: repeat the task for ESXi2 with IP address as 172.20.12.52

Task3: Perform a Vsphere VMotion Migration of Virtual Machine on a Shared DataStore

Step1: Rightclick VM1-2 and select edit settings

Step2: Select the CD/DVD Drive as Client Device. and make sure network adapter is storage (Repeat for all virtual machines)

Step3: Login to CLient

Step4: open CMD>Ipconfig

Step5: Ping the gateway

Step6:RIghtclick VM1-2 and migrate

Step7: Select computer resource only

Step8: Select ESXi 2 as new resource

Step9: Select the storage network adapter

Step10: Select the default vmotion with priority

Step11: Drag VM2-1 to ESXi1

Step12: Select computer resource only

Step13: Select ESXi1

Step14: Select storage adapter as new network adapter under esxi2

Step15: Verify the migration in hosts and clusters tab

Task4:Perform a compute resource and storage migration

Step1: Select VMFrom-lab and click migrate

Step2: Select both compute and storage resource

Step3: Select ESXi1

Step4: Select local storage of 1 which is LOCAL01-2

Step5: Select the new network adapter storage

Step6: Check the task pane for status update

Step7:Verify all the virtual machines and status in hosts and clusters

Trouble shooting: Since here we are configuring a new VMKernel adapter for vmotion, issues may arise related to it . One of it i faced was

1.vmotion failed because the destination host didn’t receive data ….timeout

Solution: redo the migration with adapters selected accurately as per ESXi (in my case Storage is name for ESXI1 and VStorage for ESXi2 ) change wasn’t done first time since both are through same network adapter of ESXi but it didn’t allow to migrate

Critical Thinking:

Migrating machines is a huge advantage , since as the business grows , the capacity of ESXi or hardware needs to be expanded, if Physical hardware is not extendable, a new set of Hardware can be purchased and wanted resources can be migrated to the new hardware esxi .

If there is a business growth or decline, VM’s can be easily managed by moving the resources and hardware changes can be made parallel without effecting the Availability of resources.

Leave a comment