When you manage physical PCs that have been in the field for some time, you will likely run into some problems that impact your approach to PC management. For example, in the early days, users would often partition their hard drives for various reasons: performance, ease of maintenance, personal data, or multiple OS support. Whatever the reason, this kind of partitioning can limit your approach to a fully automated Mirage-managed migration from Windows XP to Windows 7, or from Windows 7 to Windows 8.1. The reason: a lack of disk space.
Disk Space and Mirage OS Migrations
On average, a Mirage migration from Windows XP to Windows 7 requires at least 10 GB of free disk space, plus the amount of space required for your applications. On the other hand, a migration from Windows 7 to Windows 8.1 requires 16 to 20 GB of free disk space, plus the space required for applications. Therefore, in planning a Mirage OS migration, you should ensure at least 25 to 30 GB of free disk space.
So, before you begin your migration, you may have to re-partition the PC hard drives to ensure the requisite amount of free space is available on the system disk (in most cases, the C: drive).
This is a semi-manual process that should be completed prior to an OS migration. I say “semi-manual” because you can use third-party tools to remotely inventory the PCs in your environment. Then with the same tool, you can re-partition those PCs.
As an alternative, you can build a script to process this validation, which might look like:
Evaluate if the PC requires re-partitioning (PC)
- Calculate the hard drive total size (HDTS).
- Calculate the hard drive utilized space (HDUS).
- Calculate the hard drive space required for OS migration (through Mirage, with a base layer plus optional app layers) (HDSM).
If HDTS minus HDUS is less than or equal to HDSM, then the PC will need to be re-partitioned.
New Mirage Alerts
In Mirage 5.1 and later, a new alerting system can help you easily detect this kind of disk-space problem. If, for example, a Mirage administrator did not plan a free-space validation process before launching a Mirage OS migration, they see in the Mirage Console when a migration has stopped, and can then investigate the reason.
When the migration stops, the administrator can find the problematic desktop or desktops in the All CVDs section of the Mirage Console (Figure 1), where an alert in the form of a red bell symbol appears next to each problematic CVD. In addition, the administrator can check Problematic CVDs from the left pane of the Mirage Console to see a list of any problematic CVDs, as shown in Figure 2.
Figure 1: All CVDs
Figure 2: List of Problematic CVDs
The administrator can then right-click the CVD and review the alarms for that CVD. In Figure 3, you can see there is not enough disk space to complete the download of the OS image to this CVD. You can also see how much free disk space is missing (keeping in mind that this is the minimum free disk space, and that 15 to 20 percent above that number should be planned).
Figure 3: Alarm Properties for a Specific CVD
On the end-user side, if a desktop does not have enough free space to successfully complete the migration, the user sees the message shown in Figure 4:
Figure 4: End-User Notification of Not Enough Disk Space
As you can see, Mirage proactively informs both the user and the Mirage administrator of a lack of disk space. After the free disk space is made available, even if it requires a few reboots of the end-user PC, Mirage continues its migration without further action required by the Mirage administrator.
Disk Partitioning
There are several different ways to re-partition a hard drive. The free command-line method uses a tool embedded in the OS, DiskPart.exe.
There are plenty of examples on the Web that show how to script DiskPart, so we will not describe any advanced scenarios here. But, at a high level, the required command would look something like this:
- List volume (this shows you the existing volume present on the PC).
- Select volume X (where X is the disk you want to re-partition).
- Extend (this grows the disk size to the total available space).
Here are a couple of assumptions for this script to work properly:
- The physical hard disk was partitioned with a subset of the total disk space
- There was no need to delete or shrink a second partition (which is often the case when you encounter a physical hard drive with more than one partition where the second partition is underutilized)
Properly scripted, this tool could run remotely without the end user even noticing. (DiskPart has been part of the Windows OS for some time. If you want more information on the tool, visit the Microsoft article DiskPart Command-Line Options.)
In my opinion, this process should never be fully automated, as it requires validation both before and after the operation is complete. However, disk-space validation can certainly be done without having to actually visit the physical PC.
More Re-Partitioning Options
You can also use more robust tools that give you a graphical user interface (GUI) to manage the disk partitions within your organization. One of those tools, EaseUS Partition Master, is an example of a tool that can be used in combination with Mirage to re-partition hard disks as part of a migration project. You can find more information on this solution at EaseUS Partition Master Unlimited 10.2.
Also, the VMware knowledge base article Extending partitions in Windows using DiskPart discusses how to use DiskPart, as well as other options, when dealing with virtual desktops.
A Final Word
In my opinion, it is better to make a full inventory of all the PCs you need to migrate and to do a proper application assessment. Look at the number of partitions on each PC, go through the sizing exercise detailed in this blog post, and then go through the re-partitioning task for the PCs that require it.
If possible, complete this before your migration starts. If not, you will be able to leverage the Mirage Alerts to see which desktops need a little more love.