Vsphere ICM 8 Lab 21
Vsphere ICM 8 Lab 21
0
INSTALL, CONFIGURE, MANAGE
Contents
Introduction .............................................................................................................................................. 3
Objectives ................................................................................................................................................. 3
Lab Topology ............................................................................................................................................. 4
Lab Settings ............................................................................................................................................... 5
1 Prepare the Lab Environment ........................................................................................................... 6
2 Migrate Virtual Machine Files from One Datastore to Another ...................................................... 14
3 Migrate Both the Compute Resource and Storage of a Virtual Machine ........................................ 18
Introduction
In this lab, you will use vSphere Storage vMotion to migrate Virtual Machines (VMs).
vSphere Storage vMotion is a feature in VMware vSphere that allows for the live migration of VMs and
their associated storage from one datastore to another, without interruption of service. This means
that the VMs can continue to run while their storage is being moved to a different location.
The process of Storage vMotion involves creating a copy of the VM files on the destination datastore,
while the original files remain on the source datastore. Once the copy is complete, the VM
configurations are updated to point to the new location of the files, and the original files are deleted.
It is important to note that Storage vMotion requires that both the source and destination datastores
are accessible to the host running the VMs, and that both datastores must be managed by the same
vCenter Server.
Objectives
Lab Topology
Lab Settings
The information in the table below will be needed to complete the lab. The task sections further below
provide details on the use of this information.
In this task, you will prepare the lab environment for vSphere vMotion Storage Migrations. In the
previous lab, you configured vMotion to migrate mainly the compute of a VM between hosts. It is
important to note that proper configuration of virtual networks is essential for ensuring that VMs
function and communicate effectively in a production environment. Additionally, gaining an
understanding of this concept can provide added benefits in terms of practice.
To launch the console window for a VM, either click on the machine’s
graphic image from the topology page, or click on the machine’s
respective tab from the Navigator.
2. Launch the Mozilla Firefox web browser by either clicking on the icon found in the bottom toolbar
or by navigating to Start Menu > Internet > Firefox Web Browser.
If the VMware Getting Started webpage does not load, please wait an
additional 3 - 5 minutes, and refresh the page to continue. This is
because the vCenter Server Appliance is still booting up and requires
extra time to initialize.
4. To log in to the vCenter Server Appliance, enter [email protected] as the username and
NDGlabpass123! as the password. Click LOGIN.
5. In the Navigator, ensure you are viewing the Hosts and Clusters tab, and select sa-
vcsa.vclass.local. In the right pane, select Datastores and right-click iSCSI-Datastore. In the Actions
menu, click Increase Datastore Capacity….
6. In the Increase Datastore Capacity window on the Select Device step, select LUN 3 and click NEXT.
7. On the Specify Configuration step, leave the defaults, and click NEXT.
8. On the Ready to Complete step, review the information, and click FINISH.
9. Repeat steps 5 – 8, and expand the iSCI-Datastore using LUN 4 and Lun 2. For Lun 2, you will only
increase the size by 10 GB for lab purposes.
10. Ensure you are still viewing the Datastores tab. Verify that the iSCSI-Datastore is showing a
capacity of 59 GB and at least 32 GB of free space.
11. In the Recent Tasks pane, verify that the iSCSI-Datastore tasks have successfully completed.
12. Ensure you are on the VMs and Templates tab. Expand sa-vcsa.vclass.local and ICM-Datacenter.
Right-click LinuxGUI-01 and select Migrate.
13. In the Migrate window, on the Select the migration type step, click Change compute resource only
and click NEXT.
14. On the Select a compute resource step, choose sa-esxi-02.vclass.local and click NEXT.
15. On the Select networks step, ensure that VM Network is selected from the Destination Network
drop-down menu, and click NEXT.
16. On the Ready to complete step, review the information, and click FINISH.
17. Monitor the Recent Tasks pane, and wait for the Relocate virtual machine task to finish, which
takes a couple of minutes.
18. Leave the vSphere Client open and continue to the next task.
In this task, you will use vSphere Storage vMotion and migrate the files of a VM from one datastore to
another while the VM is running.
There are several different ways to migrate VM storage, depending on the specific needs of the
environment and the resources available. Some common methods include:
• Hot Migration: as previously mentioned, hot migration in vSphere refers to the live migration of
a VM from one host to another without interruption to the VM’s operation, which is made
possible through the vSphere vMotion feature.
• Cold Migration: This method involves shutting down the VM before migrating the storage.
Once the storage migration is completed, the VM is powered on again. This method can be
useful for environments where live migration is not possible or not desired.
• P2V or V2V Migration: Physical to Virtual (P2V) or Virtual to Virtual (V2V) migration is the
process of migrating a physical machine or a VM from one platform to another. This method
can be useful for migrating VMs from one virtualization platform to another or for migrating
physical machines to VMs.
• Replication: This method involves creating a replica of the VM on another datastore, and then
switching the VM to use the replica. This can be useful for disaster recovery or HA scenarios.
• Backup and Restore: This method involves creating a backup of the VM, and then restoring the
backup to a new datastore. This method can be useful for scenarios where the VM needs to be
moved to a completely different environment.
It is important to consider the specific requirements of the environment and the resources available
when choosing a method for migrating VM storage.
1. In the Navigator, select the VMs and Templates tab. Expand sa-vcsa.vclass.local and ICM-
Datacenter.
2. Power on the machine by right-clicking LinuxGUI-01, and selecting Power > Power On. You may
also use the Power On icon highlighted in orange below.
3. In the LinuxGUI-01 Summary tab, locate the Related Objects pane. Verify that LinuxGUI-01 is
located on the VMFS01-01 Datastore.
5. In the Migrate window, on the Select a migration type step, select Change storage only. Click NEXT.
6. On the Select storage step, in the drop-down menu for Select virtual disk format, ensure that iSCSI-
Datastore is selected. Select Thin Provision for the virtual disk format, and click NEXT.
8. Monitor the Recent Tasks pane, and wait for the Relocate virtual machine task to finish, which
takes a couple of minutes.
9. In the Related Objects pane, on the Summary tab, verify that LinuxGUI-01 is on the iSCSI-
Datastore.
10. Leave the vSphere Client open, and continue to the next task.
In this task, you will perform hot migrations of VMs residing on a shared datastore that is accessible to
both the source and the target ESXi hosts. You will undertake the migration of the compute and
storage resources of a VM from the iSCSI-Datastore.
Migrating both the compute resource and storage of a VM is important for several reasons:
• Performance: Migrating both the compute resource and storage ensures that the VM is running
on the most appropriate host, with the most appropriate storage resources. This can help to
improve the overall performance of the VM.
• Resource utilization: Migrating both the compute resource and storage can help to optimize
resource utilization by ensuring that the VM is running on the most appropriate host, with the
most appropriate storage resources.
• High availability: Migrating both the compute resource and storage can be used in conjunction
with other HA features, such as vSphere HA, to provide improved disaster recovery capabilities.
• Maintenance: Migrating both the compute resource and storage allows for maintenance and
upgrades to be performed on both the compute and storage resources without affecting the
VMs running on them, which can help reduce downtime for maintenance and improve
availability.
• Flexibility: Migrating both the compute resource and storage allows for the movement of VMs
between hosts, clusters, and even datacenters, providing increased flexibility for managing
virtualized environments.
In summary, migrating both the compute resource and storage of a VM is important for improving
performance, resource utilization, HA, maintenance, and flexibility.
1. Migrate the LinuxGUI-01 compute to host sa-esxi-01.vclass.local and the storage to VMFS01-1.
a. Verify that the VMs and Templates tab is selected. Right-click LinuxGUI-01 and select
Migrate.
b. In the Migrate window, on the Select the migration type step, click Change both
compute resource and storage and click NEXT.
c. On the Select a compute resource step, expand ICM-Datacenter and choose sa-esxi-
01.vclass.local. Click NEXT.
d. On the Select storage step, in the drop-down menu for Select virtual disk format, select
Thin Provision. Ensure that VMFS01-01 is selected, and click NEXT.
e. On the Select networks step, ensure that the VM Network is selected from the
Destination Network drop-down menu, and click NEXT.
f. On the Select vMotion priority step, leave Schedule vMotion with high priority
(recommended) selected, and click NEXT.
g. On the Ready to complete step, review the information, and click FINISH.
2. In the Recent Tasks pane, monitor the progress of the VM migration. Confirm that the Relocate VM
task has successfully completed.
3. In the LinuxGUI-01 Summary tab, locate the Related Objects pane. Verify that LinuxGUI-01 is
located on the VMFS01-01 Datastore.