Quantcast
Channel: i'm all vIRTUAL » pagefile
Viewing all articles
Browse latest Browse all 2

Keeping your VM Swapfile and Guest OS virtual memory away from everything – Part 3

$
0
0

imagesIn part 2 of this series, we have created our new “pagefile” and “OS-W2008″ datastore storage profiles.

Now, let’s create our VMDK-to-Datastore relationships. For the purpose of this demonstration I’ve created a Windows 2008 R2 Standard virtual machine and named it W2008-Demo-01 with two virtual hard disks –
One 50GB virtual hard disk (thin-provisioned) stored in V5.1-Lab-W2008-NFS-01 datastore which will be used for the OS.
The second virtual hard disk (thin-provisioned) which will be used for the OS pagefile stored in V5.1-Lab-pagefile-NFS-01. The size for this VMDK configured as 3GB which is 1.5 times the configured memory size (2GB).

W2008-Demo-01 Disks 1

W2008-Demo-01 Disks 2

Create a new Simple Volume and format the pagefile hard disk. As you can see, I’ve assigned “P” as the new drive letter and provided an intuitive label.

W2008-Demo-01 Drive P

Remove the paging file from drive C and change its location to drive P. Allow the system to manage the drive size and perform a reboot in order for the configurations to kick-in.

pagefile location

After finishing the OS pagefile preparations we now need to assign the relevant storage profile for the VM. In the VM summery tab, notice how when nothing is configured the VM Storage Profiles window is blank.

W2008-Demo-01 VM Storage Profiles windows is blank

Go to VM properties > Profiles tab. We can see 2 sections. The upper section used for assigning a profile to the VM configuration files such as .vmx, log files, nvram, etc. The lower section used for assigning a profile to the VM VMDK files which in our case we have two – one for OS and the second for the pagefile.

For the purpose of this demonstration, select the W2008 profile from the dropdown menu and click the “Propagate to disks” button.

W2008-Demo-01 VM Storage Profiles - non-compliant 1

Return to the VM summery tab, notice how the profile compliance status changed to Noncompliant.

W2008-Demo-01 VM Storage Profiles - non-compliant 2

In order to fix this, return to the VM profiles tab and from the dropdown menu change the VM storage profile for Hard disk 2 only to the pagefile profile.

W2008-Demo-01 VM Storage Profiles - compliant 1

Return to the VM summery tab – the VM Storage Profiles are now in compliant.

W2008-Demo-01 VM Storage Profiles - compliant 2

In order for me to demonstrate the manual deployment process, I’ve cloned the W2008-Demo-01 VM into a template, named it W2008-Profile-Template and stored it on my dedicated templates datastore.

I did this with the profiles configuration “locked in” which is why my template is in Noncompliant state.

template is in Noncompliant state

Basic Deployment

Start the Deploy from Template wizard. Now, the tricky part is at the storage section of the wizard.

Because the template has storage profiles configuration “locked-in” and each hard disk assigned with its own profile, you can see that in the storage basic mode selection we can choose only one VM Storage profile.

If we choose the W2008 profile it will show only the datastores with the W2008 profile assigned to them, which in our case the only one is the V5.1-Lab-W2008-NFS-01 datastore.

W2008-BasicDeploy - W2008 profile

If we choose the pagefile profile it will show only the datastores with the pagefile profile assigned to them, which in our case the only one is the V5.1-Lab-pagefile-NFS-01 datastore.

W2008-BasicDeploy - pagefile profile

For the purpose of this demonstration, I chose the W2008 profile and deployed the VM to the only compatible datastore – V5.1-Lab-W2008-NFS-01 and named it W2008-BasicDeploy.

As you can see, all the VM files, including the VMDKs, were deployed in one datastore which eventually caused the VM to be in a noncompliant VM Storage Profile state.

W2008-BasicDeploy - non-compliant

Advanced Deployment

Start a new Deploy from template wizard and at the storage selection stage enter the advanced mode.

Because of the fact that the template is already configured with its VM Storage Profiles “locked-in”, you can see that unlike in the basic deployment mode, the wizard “knows” which VM Storage Profile related to each hard disk and to the VM configuration files as well.

W2008-AdvDeploy - the wizard “know”

The problem with this is that the only way to make sure the VM configuration files and each hard disk will be stored in the right datastore is to choose it manually.

If you click the Browse button under the Datastore column for each line, the datastore selection window will appear with the compatible datastore for you to choose.

W2008-AdvDeploy - the wizard “know” 2

I named the VM W2008-AdvDeploy and after the deployment is finished you can see the VM is spread across the two datastores and it’s in a VM Storage Profile compliant state.

W2008-AdvDeploy - compliant

In the next part for this series I will share with you some automation scripts which will ease the advanced deployment process.

The post Keeping your VM Swapfile and Guest OS virtual memory away from everything – Part 3 appeared first on i'm all vIRTUAL.


Viewing all articles
Browse latest Browse all 2

Trending Articles