In this lab, I am going to show how to modify a virtual machine’s Hardware and add a raw LUN to the Virtual Machine. This task is important for control, handle and managing Hardware resources for the VMs.
The tasks list for the lab 13:
- Increase the size of the VMDK file
- Adjust Memory Allocation on a Virtual Machine
- Rename a Virtual Machine in the vCenter Server Inventory
- Add a Raw LUN to a Virtual Machine
- Expand a Thin-Provision Virtual Disk
- Log in the VMware vSphere web client portal: https://vCenter Server Appliance Name.domainname:9443/vshpere-client/# or VMware vSphere Client via root user and password.
Steps for the task: Increase the size of the VMDK file
In this task, I will show how to increase VMs VMDK file size. And How to operating system detect the additional space
Step 1: Select vCenter Home -> Virtual Machines.
I selected machine “Hot Clone02” to change the hardware size.
Powered on your VM if it does not power On.
Step 2: Right Click on “Hot Clone 02” [ in your case, select your hot clone machine] then click Edit Setting.
Now you will get the Hardware Edit Setting wizard. Select “Hardware Disk 1“.
Previously It was 15 GB, I made it 16 GB
In the summary tab, launch the Console or open with VMRC
Go to the My Computer on the virtual machine desktop. Check the size of the C: drive.
Step 3: Now Go to the C:\dell\extpart folder. Double click on the extpart.exe file
In Volume to extend, type C:
Type 16 000 megabytes to extend the volume 16 GB.
Now Go to the My computer of your VM again and check the size of the drive C:
Steps for the task: Adjust Memory Allocation on a Virtual Machine
In this task, I am going to add, change and configure Virtual memory Resouces or options for enhancing the VMs Performace
Step1: You need to shut down your Hot-Clone # VM. Right-Click on the VM and select “Shut Down Guest OS”. Press “Yes” to give shutdown confirmation
Step 2: Right-Click the Hot-Clone Virtual Machine after shutdown completed. Select “Edit Settings”
Step 3: Change the value of memory. In my case, I changed it 512 MB to 1024 MB
Now You can see Memory size has been increased 1024 MB in the VM Hardware Section from VM Summary page.
Steps for the task: Rename a Virtual Machine in the vCenter Server Inventory
In this section, I will show how to change the name of the virtual Machine. Note that, When you change the name of the VM, try to give an appropriate name so that you can identify the VM in the vCenter Server inventory.
Step 1: To change the name. Right-click the VM which you want to rename [ In my case, I chose Hot-Clone02]. Then Select “Rename“
Step 2: Give an Appropriate Name in the ” Enter the new Name” place. Then Ok
Steps for the task: Add a Raw LUN to a Virtual Machine
An RDM ( raw device mapping) allows a VM to directly access and use a logical unit number (LUN).
Step1: Right-Click the VM in the inventory in which VM you want to add a Raw LUN. [As your preference]
Step 2: Select RDM disk from the New Device drop-down menu and click “Add”
Select the target LUN dialogue box, And Select the Assigned LUN
Step 3: Now you need to perform the following action as I showed on my screenshot.
Option: Location: Store with the Virtual Machines
Option: Compatibility Mode: Virtual
Other Options keep the default
Then Press ‘Ok‘ to apply the change.
In the Summary of the VM, You can see a New Hard disk 2 has been added in the VM Hardware Section.
Step 4: Verification and mount the new RDM with Guest Operating system of VM: Now you need to ensure that your guest Operating system can access the disk.
Login the VM Machine as an Administrator user and administrator Password.
Select Start -> Search -> Administrative Tools
Select Computer Management from the Administrative Tools
Click “Disk Management“. If you get disk wizard starts like the following screenshot. Click On Cancel.
Disk 1 is the RDM, You can use the guest operating system utilities to format the drive. In this lab, It doesn’t require to format the drive.
You can also verify your disk drives from the Device Manager of VM.
Steps for the task: Expand a Thin-Provisioned Virtual Disk
You can convert a virtual disk from the thin to thick provision,eager-zeroed or thick to thin provision any time as per your hardware requirement.
Step 1: Select Home -> Hosts and Clusters -> Datacenter [ in your case, training if you are following the VMware Lab Instruction guide] -> Lab Servers folders-> Your ESXi ( I selected vesxi01.momataj.local)
Step 2: Click “Related Objects” tab and Click “Virtual Machines“. Check your Provision space and used space from the windows.
My provision Space: 18.13 GB and used space: 7.12 GB
Step 4: Click the “Summary” tab of your VM. Note the DataStore name from the VM Hardware Section under the Hard disk 1. You can see my Datastore name is “PrivateVMFS-0304″ and Powered off your VM.
Step 5: When you inflate a thin-provision disk, An inflated Virtual disk occupied the full datastore space originally provisioned to it.
After Inflating a thin Provision disk, It converts the thin disk to a virtual disk in thick-provision format.
In this Section, I am showing how to inflate the thin provisioned virtual disk
Go to the Home -> Storage -> Data Center
Right click on your datastore “PrivateVMFS0304″ and Browse Files.
Find the folder that belongs to your virtual Machine named. and Right-Click the yourVMname.vmdk [ in my case, It is “momatajvmclient”]
Select the Inflate
Wait until the operation has done
Now Go to the “Related Objects -> Virtual Machines”
Power on the virtual machine and observe the used space and provision space column. both space size must be equal. In my case: Provision Space = 18.13 GB and Used Space=18.13 GB.
- You can increase the virtual disk size even if it belongs to a powered On VM. But Disk must be a flat virtual disk in persistent mode and the VM lacks snapshots
- If you increase the size of the virtual disk, you must increase the size of the file system on this disk.
- Use the appropriate tool utility in the guest operating system during enable the file system for newly allocated disk space.
- You can only do inflate if you create a virtual disk in the thin format.
- Migration of VMs with RDM can be performed with VM powered ON or OFF.
- You can not migrate a Raw LUN because Raw LUN presented from the SAN but you can relocate file that is RDM pointer files.
Thank You 🙂