In 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).
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.
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.
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.
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.
Return to the VM summery tab, notice how the profile compliance status changed to Noncompliant.
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.
Return to the VM summery tab – the VM Storage Profiles are now in compliant.
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.
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.
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.
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.
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.
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.
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.
In the next part for this series I will share with you some automation scripts which will ease the advanced deployment process.