0% found this document useful (0 votes)
42 views30 pages

Vsphere ICM 8 Lab 15

Uploaded by

123ankitjoshi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
42 views30 pages

Vsphere ICM 8 Lab 15

Uploaded by

123ankitjoshi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 30

VMWARE VSPHERE 8.

0
INSTALL, CONFIGURE, MANAGE

Lab 15: Modifying Virtual Machines

Document Version: 2023-03-08

Copyright © 2023 Network Development Group, Inc.


www.netdevgroup.com

NETLAB+ is a registered trademark of Network Development Group, Inc.

VMware is a registered trademark of VMware, Inc.


117BLab 15: Modifying Virtual Machines

Contents
Introduction .............................................................................................................................................. 3
Objectives ................................................................................................................................................. 3
Lab Topology ............................................................................................................................................. 4
Lab Settings ............................................................................................................................................... 5
1 Adjust Memory Allocation on a Powered-On Virtual Machine ......................................................... 6
2 Increase the Size of a Virtual Disk ................................................................................................... 15
3 Configure the Guest OS to Recognize the Additional Disk Space .................................................... 22
4 Rename a Virtual Machine in the vCenter Inventory ...................................................................... 27

3/13/2023 Copyright © 2023 Network Development Group, Inc. www.netdevgroup.com Page 2


117BLab 15: Modifying Virtual Machines

Introduction

In this lab, you will modify a Virtual Machine’s (VM) memory size, increase its storage size, and rename
it.

Modifying VMs in VMware refers to the process of making changes to the configuration of an existing
VM. This can include changing the amount of memory, CPU, or disk space allocated to the VM, as well
as adding or removing virtual devices such as network adapters or storage controllers.

To modify a VM, you can use the vSphere Client or the VMware Host Client. The process typically
involves opening the VM settings, making the desired changes, and then applying the changes.

Additionally, you can use various VMware Tools like vCenter Converter, VMware vCenter Update
Manager, and VMware vCenter Orchestrator to perform modifications on multiple VMs at once.

In summary, modifying VMs in VMware allows you to adjust the resources allocated to a VM and to
add or remove virtual devices.

Objectives

• Adjust Memory Allocation on a Powered-On VM


• Increase the Size of a Virtual Disk
• Configure the Guest OS to Recognize the Additional Disk Space
• Rename a VM in the vCenter Inventory

3/13/2023 Copyright © 2023 Network Development Group, Inc. www.netdevgroup.com Page 3


117BLab 15: Modifying Virtual Machines

Lab Topology

3/13/2023 Copyright © 2023 Network Development Group, Inc. www.netdevgroup.com Page 4


117BLab 15: Modifying Virtual Machines

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.

Virtual Machine IP Address Account Password

sa-student eth0: 172.20.10.80 sysadmin NDGlabpass123!

sa-vcsa eth0: 172.20.10.94 [email protected] NDGlabpass123!

sa-esxi-01 eth0: 172.20.10.51 root NDGlabpass123!

sa-esxi-02 eth0: 172.20.10.52 root NDGlabpass123!

sa-aio eth0: 172.20.10.10 sysadmin NDGlabpass123!

3/13/2023 Copyright © 2023 Network Development Group, Inc. www.netdevgroup.com Page 5


117BLab 15: Modifying Virtual Machines

1 Adjust Memory Allocation on a Powered-On Virtual Machine

In this task, you will add, change, and configure VM memory resources and options to enhance VM
performance.

Adjusting the memory allocation of a VM is done to ensure that the VM has enough memory to
perform its tasks efficiently. Memory is an essential resource for a VM and is used for storing data that
it needs to access quickly, such as the operating system and applications.

There are several reasons why you may need to adjust the memory allocation of a VM:

• Performance: If a VM is running low on memory, it may start to experience performance issues


such as slow response times or application crashes. By increasing the memory allocation, you
can improve the performance of the VM.
• Resource allocation: Memory is a shared resource, and multiple VMs running on the same host
may compete for the same memory. By adjusting the memory allocation of VMs, you can
ensure that each VM has the resources it needs to perform its tasks.
• Scalability: As the workload of a VM changes over time, the memory requirements may also
change. By adjusting the memory allocation, you can ensure that the VM can scale as needed to
meet the changing workload.
• Compliance: Some industries have specific compliance requirements, such as memory
requirements. By adjusting the memory allocation of a VM, you can ensure that it meets these
requirements.

In summary, adjusting memory allocation of a VM is important for ensuring its performance and
resource allocation, as well as scalability, power savings, and compliance.

1. Launch the sa-student VM to access the graphical login screen.

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.

3/13/2023 Copyright © 2023 Network Development Group, Inc. www.netdevgroup.com Page 6


117BLab 15: Modifying Virtual Machines

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.

3. In Firefox, click LAUNCH VSPHERE CLIENT.

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.

3/13/2023 Copyright © 2023 Network Development Group, Inc. www.netdevgroup.com Page 7


117BLab 15: Modifying Virtual Machines

4. To log in to the vCenter Server Appliance, enter [email protected] as the username and
NDGlabpass123! as the password. Click LOGIN.

You may ignore the “browser-OS combination” warning message


presented on the VMware vCenter Single Sign-On page and continue
moving forward with the lab.

5. In the Navigator, select the VMs and Templates tab. Expand sa-vcsa.vclass.local and ICM-
Datacenter. Right-click on the LinuxGUI-01 VM, and navigate to Power > Power On.

6. In the LinuxGUI-01 window, select the Summary tab.

3/13/2023 Copyright © 2023 Network Development Group, Inc. www.netdevgroup.com Page 8


117BLab 15: Modifying Virtual Machines

7. Locate and view the Capacity and Usage pane.

8. In the Navigator, right-click LinuxGUI-01, and select Edit Settings.

9. In the Edit Settings window, expand Memory. Notice that Memory Hot Plug is not checked.

3/13/2023 Copyright © 2023 Network Development Group, Inc. www.netdevgroup.com Page 9


117BLab 15: Modifying Virtual Machines

The Memory Hot Plug option in VM memory allows you to add or remove
memory to a VM while it is powered on.

Memory Hot Plug also enables you to add or remove memory to a VM without
having to power off the VM. This can be useful in situations where you need to
quickly adjust the memory allocation of a VM to meet changing workloads or
to resolve performance issues.

When you use Memory Hot Plug to add memory to a VM, the additional
memory is immediately available for use by the VM. When you remove
memory, the VM releases the memory back to the host, and the host can then
use it for other VMs.

It is important to note that not all Guest Operating Systems support Memory
Hot Plug. Additionally, Memory Hot Plug should be used with caution as it can
cause a temporary interruption to the VM during the process of adding or
removing memory, and a reboot of the Guest Operating System may be
required.

In summary, Memory Hot Plug is a feature that allows you to add or remove
memory to a VM while it is powered on. This feature can be useful for quickly
adjusting the memory allocation of a VM to meet changing workloads or
resolve performance issues.

10. Enable the Memory Hot Plug setting.

a. In the Edit Settings window, click Cancel.

b. In the LinuxGUI-01 pane, click Shut Down Guest OS.

3/13/2023 Copyright © 2023 Network Development Group, Inc. www.netdevgroup.com Page 10


117BLab 15: Modifying Virtual Machines

If the Shut Down Guest OS icon is greyed out, please refresh the vSphere
Client.

c. In the Confirm Guest Shut Down window, click YES.

Confirm that LinuxGUI-01 is shut down before proceeding to the next step.
This will take 1 - 2 minutes to complete.

11. In the Navigator, right-click on LinuxGUI-01, and select Edit Settings.

3/13/2023 Copyright © 2023 Network Development Group, Inc. www.netdevgroup.com Page 11


117BLab 15: Modifying Virtual Machines

12. In the Edit Settings window, expand Memory. Activate the Memory Hot Plug setting by checking
the Enable box. Click OK.

13. In the LinuxGUI-01 pane, click the Power On icon.

3/13/2023 Copyright © 2023 Network Development Group, Inc. www.netdevgroup.com Page 12


117BLab 15: Modifying Virtual Machines

14. In the Navigator, right-click on LinuxGUI-01, and select Edit Settings.

15. In the Edit Settings window, expand Memory. Enter 3 to change the amount of memory to 3 GB.
Click OK.

3/13/2023 Copyright © 2023 Network Development Group, Inc. www.netdevgroup.com Page 13


117BLab 15: Modifying Virtual Machines

The Memory Hot Plug function is active for LinuxGUI-01. Therefore you can
add memory to LinuxGUI-01 while it is powered on.

16. View the Capacity and Usage pane, and verify that the value for memory allocated has increased to
3 GB.

17. Leave the vSphere Client open, and continue to the next task.

3/13/2023 Copyright © 2023 Network Development Group, Inc. www.netdevgroup.com Page 14


117BLab 15: Modifying Virtual Machines

2 Increase the Size of a Virtual Disk

In this task, you will increase the size of the VM virtual disk.

Increasing the size of a virtual disk allows for more data to be stored on the VM. This may be necessary
if the current disk size is approaching capacity and additional storage is needed for the VM to function
properly. As the data grows, it can cause performance issues or even lead to application failures. By
increasing the size of the virtual disk, you provide more space for the VM to store its data and run its
applications.

There are several reasons why you may want to increase the size of a virtual disk:

• Lack of storage space: If the VM is running out of storage space, increasing the size of the
virtual disk can provide more storage for the operating system, applications, and data.
• Future growth: If you anticipate future growth in the amount of data that will be stored on the
VM, increasing the size of the virtual disk can help ensure that there is enough space to
accommodate that growth.
• Improved performance: Increasing the size of a virtual disk can also improve the performance
of the VM. A larger disk can provide faster access times and lower disk contention, resulting in
better overall performance.
• Application requirements: Some applications may have specific storage requirements that
must be met in order for them to function properly. In this case, increasing the size of the
virtual disk may be necessary to meet those requirements. Virtual hardware can be added,
removed, or modified according to the needs of the VM. This allows the VM to have the
resources it needs to run efficiently, while also providing a level of isolation and abstraction
that allows multiple VMs to share the same physical resources.

As data and applications grow, it may become necessary to increase the storage capacity of the virtual
disk to ensure that the operating system and any necessary applications have sufficient space to run
properly.

It is important to note that increasing the size of a virtual disk is not a cure-all solution for managing
storage in a virtual environment. Implementing effective storage management practices, such as
conducting regular backups, archiving data, and removing redundant information, is still crucial even
after increasing the size of a virtual disk. This will help maintain efficient operation of the VMs and
ensure that they have adequate resources to function correctly.

3/13/2023 Copyright © 2023 Network Development Group, Inc. www.netdevgroup.com Page 15


117BLab 15: Modifying Virtual Machines

1. In the Navigator, right-click on LinuxGUI-01 and select Edit Settings.

2. In the Edit Settings window, Virtual Hardware tab, notice that the Hard Disk 1 size is 10 GB, but
that it is greyed out.

3/13/2023 Copyright © 2023 Network Development Group, Inc. www.netdevgroup.com Page 16


117BLab 15: Modifying Virtual Machines

3. You can also view the same information on the Summary tab, in the VM Hardware pane of the
LinuxGUI-01 pane.

4. In the Edit Settings window, click CANCEL.

5. In the Navigator, expand sa-vcsa.vclass.local and ICM-Datacenter. Select the Storage tab, and click
the VMFS01-01 datastore. In the VMFS01-01 pane, select the Files tab, Files pane, and select
LinuxGUI-01. Click the Filter icon in the Name column. Enter .vmdk and notice the two .vmdk files.
Close the Filter window.

3/13/2023 Copyright © 2023 Network Development Group, Inc. www.netdevgroup.com Page 17


117BLab 15: Modifying Virtual Machines

When a virtual disk file is appended with the -####.vmdk extension, it


indicates that the disk has a snapshot associated with it. In this task, it is not
possible to expand the disk without first removing the snapshot. To increase
the size of the virtual disk, the snapshot must be deleted.

It is important to consider the impact of deleting a snapshot before doing so. It


is usually recommended to keep only the most recent and necessary
snapshots and delete the rest, while considering the above points.

For this lab, you will delete the snapshot to increase the size of Hard disk 1. In
a later lab, you will work with snapshots.

6. Navigate back to the VMs and Templates tab, ensure that sa-vcsa-vclass.local and ICM-Datacenter
are expanded. Select LinuxGUI-01. In the LinuxGUI-01 pane, click Shut Down Guest OS.

7. In the Confirm Guest Shut Down window, click YES.

8. In the Recent Tasks pane, confirm that LinuxGUI-01 has successfully shutdown.

3/13/2023 Copyright © 2023 Network Development Group, Inc. www.netdevgroup.com Page 18


117BLab 15: Modifying Virtual Machines

Confirm that LinuxGUI-01 is shut down before proceeding to the next step.
This will take 1 - 2 minutes to complete.

9. In the Navigator, on the VMs and Templates tab, select LinuxGUI-01.

10. In the LinuxGUI-01 pane, Snapshots tab, select the BASE snapshot and click DELETE.

11. In the Delete snapshot window, click DELETE.

3/13/2023 Copyright © 2023 Network Development Group, Inc. www.netdevgroup.com Page 19


117BLab 15: Modifying Virtual Machines

12. In Recent Tasks pane, confirm that the BASE snapshot removal on LinuxGUI-01 has completed.

13. In the Navigator, right-click on LinuxGUI-01 and select Edit Settings.

14. In the Edit Settings window, Virtual Hardware tab, Hard disk 1 text box, increase the disk size by 2
GB to 12 GB. Click OK.

3/13/2023 Copyright © 2023 Network Development Group, Inc. www.netdevgroup.com Page 20


117BLab 15: Modifying Virtual Machines

15. In the LinuxGUI-01 pane, Summary tab, verify that Hard disk 1 shows the correct disk size of 12 GB
in the VM Hardware pane.

16. Leave LinuxGUI-01 selected in the vSphere Client, and continue to the next task.

3/13/2023 Copyright © 2023 Network Development Group, Inc. www.netdevgroup.com Page 21


117BLab 15: Modifying Virtual Machines

3 Configure the Guest OS to Recognize the Additional Disk Space

In this task, you will configure the Ubuntu Linux Guest OS in the Linux-GUI-01 VM to detect the
additional space that has been added to virtual hard disk 1.

For a Linux Ubuntu Guest OS to recognize and use additional disk space, the operating system must be
made aware of the new disk space by resizing the partition. This can be done using command line
utilities such as fdisk or parted. For this lab, you will use the KDE Partition Manager.

The file system must be resized to use the new disk space. Without configuring the operating system,
the additional disk space will not be recognized or usable by the Guest OS. This means the system is
not able to access that space and it would be wasted, not allowing for the necessary expansion of
storage for the application or data.

1. In the LinuxGUI-01 pane, click the Power On icon.

2. On the Summary tab for LinuxGUI-01, click LAUNCH WEB CONSOLE.

If the Launch Web Console will not open a console to the LinuxGUI-01 VM,
please refresh the vSphere Client.

3/13/2023 Copyright © 2023 Network Development Group, Inc. www.netdevgroup.com Page 22


117BLab 15: Modifying Virtual Machines

3. Start the KDE Partition Manager.

a. In the LinuxGUI-01 VM, click the Applications icon located at the lower left of the
window. Navigate to System Tools > KDE Partition Manager.

b. In the Authentication Required window, enter NDGlabpass123! for the Password. Click OK.

4. Increase the size of the disk partition.

a. In the /dev/dsa – KDE Partition Manager window, select /dev/sda1, and click
Resize/Move.

3/13/2023 Copyright © 2023 Network Development Group, Inc. www.netdevgroup.com Page 23


117BLab 15: Modifying Virtual Machines

5. In the Resize/move partition window, enter 11,985.00 MiB for the Size, and click OK.

3/13/2023 Copyright © 2023 Network Development Group, Inc. www.netdevgroup.com Page 24


117BLab 15: Modifying Virtual Machines

There are several reasons why a 12 GB disk in Linux may only show 11.7 GB as
usable:

• File system overhead: File systems, such as ext4, use a small amount of
space to store metadata, such as inodes and block pointers. This
overhead can vary depending on the file system, but it typically ranges
from a few megabytes to a few percent of the total disk space.
• Disk partitioning: When a disk is partitioned, some space may be
reserved for partition table entries and boot sectors. This space is not
usable for file storage.
• Disk alignment: Some disk controllers and file systems have specific
alignment requirements, which can result in some space at the end of
the disk being unused.
• Disk fragmentation: Over time, as files are created, deleted, and
modified, disk space can become fragmented, resulting in small
amounts of unusable space scattered throughout the disk.
• Disk compression and deduplication: If disk compression or
deduplication is enabled, the disk space usage may be different than
the physical disk size.
• Reserved space: Some file systems, like ext4, reserve a percentage of
disk space for root user, so that when the disk gets full, there's still
some space left for root user to perform important operations.

It is important to note that the specific reason why the disk may only show
11.7 GB as usable will depend on the specific configuration of the Linux
system.

6. Verify that the File system has been extended to 11.70 GiB on sda2.

3/13/2023 Copyright © 2023 Network Development Group, Inc. www.netdevgroup.com Page 25


117BLab 15: Modifying Virtual Machines

7. Close the LinuxGUI-01 tab.

8. Ensure you are back on the VMs and Templates tab, and select LinuxGUI-01.

9. Leave the vSphere Client open, and continue to the next task.

3/13/2023 Copyright © 2023 Network Development Group, Inc. www.netdevgroup.com Page 26


117BLab 15: Modifying Virtual Machines

4 Rename a Virtual Machine in the vCenter Inventory

In this task, you will rename an existing VM in the vCenter Appliance inventory.

There are several reasons why you might want to rename a VM in vCenter inventory:

• To better reflect the purpose or role of the VM: For example, you might want to change
the name from TestVM to WebServer if the VM is being used as a web server.
• To improve organization and readability: Renaming VMs in vCenter inventory can make it
easier to identify and locate specific VMs in large environments.
• To reflect changes in naming conventions: Renaming a VM can be useful if the
organization's naming conventions change and the existing names no longer conform to the
new standards.
• To reflect ownership changes: Renaming a VM can be useful if the VM changes ownership
and the new owner wants to reflect that in the name.
• To reflect changes in the underlying hardware: Renaming a VM can be useful if the
underlying hardware changes and the new name reflects the new hardware.
• To reflect changes in the guest OS: Renaming a VM can be useful if the guest OS changes
and the new name reflects the new OS.

Overall, renaming a VM in vCenter inventory can be useful in maintaining an organized and informative
inventory, and make it easier to manage and locate VMs.

1. While in the vSphere Client, right-click LinuxGUI-01 and select Rename.

3/13/2023 Copyright © 2023 Network Development Group, Inc. www.netdevgroup.com Page 27


117BLab 15: Modifying Virtual Machines

2. In the Rename window, enter Linux-New and click OK.

3. Ensure that Linux-New is selected from the Navigator, and click the Datastores tab. You may
ignore the Alert in the Status column, if it appears.

VMFS01-01 appears in the list. This datastore is where the Linux-New VM files
are located.

4. In the main workspace, right-click VMFS01-01 and select Browse Files.

3/13/2023 Copyright © 2023 Network Development Group, Inc. www.netdevgroup.com Page 28


117BLab 15: Modifying Virtual Machines

5. Rename Linux-New back to LinuxGUI-01.

a. Navigate back to the VMs and Templates tab. Right-click Linux-New and select Rename.

b. In the Rename window, enter LinuxGUI-01 and click OK.

c. Verify that LinuxGUI-01 appears in the Navigator.

3/13/2023 Copyright © 2023 Network Development Group, Inc. www.netdevgroup.com Page 29


117BLab 15: Modifying Virtual Machines

When you change the name of a VM, you change the name used to identify
the VM in the vSphere Client inventory, not the name of the VM’s folder or
files on the datastore. To change the name of the files, you will need to
migrate the VM storage to another datastore, and then back to the original
datastore for the name to reflect the same name in the vSphere Client
inventory. Note this can be a timely process.

6. The lab is now complete; you may end the reservation.

3/13/2023 Copyright © 2023 Network Development Group, Inc. www.netdevgroup.com Page 30

You might also like