Lab 13: Modify a Virtual Machine’s Hardware and add a raw LUN to a Virtual Machine.

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

Prerequisites:

  • 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.1.jpg

I selected machine “Hot Clone02” to change the hardware size.

Powered on your VM if it does not power On.2.jpg3.jpg

Step 2: Right Click on “Hot Clone 02” [ in your case, select your hot clone machine] then click Edit Setting.4.jpg

Now you will get the Hardware Edit Setting wizard. Select “Hardware Disk 1“. 5.jpg

Previously It was 15 GB, I made it 16 GB6.jpg

In the summary tab, launch the Console or open with VMRC7.jpg8.jpg

Go to the My Computer on the virtual machine desktop. Check the size of the C: drive.

9.jpg10.jpg

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 confirmation1.jpg2.jpg

Step 2: Right-Click the Hot-Clone Virtual Machine after shutdown completed. Select “Edit Settings” 3.jpg

Step 3: Change the value of memory. In my case, I changed it 512 MB to 1024 MB 6.jpg7.jpg

Now You can see Memory size has been increased 1024 MB in the VM Hardware Section from VM Summary page.8.jpg

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 “Rename1.jpg

Step 2: Give an Appropriate Name in the ” Enter the new Name” place. Then Ok2.jpg

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]4.jpg

Step 2: Select RDM disk from the New Device drop-down menu and click “Add”8.jpg

Select the target LUN dialogue box, And Select the Assigned LUN9.jpg

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.10.jpg

In the Summary of the VM, You can see a New Hard disk 2 has been added in the VM Hardware Section.8.jpg

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.1.jpg

Select Start -> Search -> Administrative Tools 3.jpg

Select Computer Management from the Administrative Tools4.jpg

Click “Disk Management“. If you get disk wizard starts like the following screenshot. Click On Cancel.5.jpg

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.6.jpg

You can also verify your disk drives from the Device Manager of VM.2.jpg

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)1.jpg

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 GB2.jpg

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.

5

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 Center6.jpg

Right click on your datastore “PrivateVMFS0304″ and Browse Files.

7.jpg

8.jpg

Find the folder that belongs to your virtual Machine named. and Right-Click the yourVMname.vmdk [ in my case, It is “momatajvmclient”]9.jpg

Select the Inflate10.jpg

Wait until the operation has done11.jpg

Now Go to the “Related Objects -> Virtual Machines”12.jpg

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.13.jpg

Recommendations: 

  • 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 🙂

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s