How to create a virtual drive (Windows 7)

Creating a virtual hard drive or disk in Windows 7 does not require any external applications, all that must be done is carry out a few simple steps.

To create the virtual drive

Click on Start and in the Search box type: diskmgmt.msc. The Computer management window will open. Alternatively, another way to access this window is by right-clicking on “My Computer” and select “Manage”. The Computer Management window will then open and then the Disk Management window can be accessed.

Within the Disk Management window, click on “Action” and then “Create VHD” .

Virtual drive

Windows 7

The location of the virtual drive is indicated in this new window. To do so, click on “Browse” and select the folder (a new one should be created), give it a name and save it. This way the virtual drive will be created as a file with VHD format.

The next step consists in specifying the capacity of the virtual hard drive. This is indicated in the “Virtual hard disk size” box by providing a figure in MB (megabytes), GB (gigabytes) or TR (terabytes).

The disk format is then indicated: either “Dynamically expanding” or “Fixed size”. Windows 7 recommends the “Fixed size” option. The corresponding options are selected and the dialogue box is accepted.

The creation process will begin at this point, and the virtual drive will be visible in Disk Management.

Windows 7

Create a volume

As shown in the previous figure, the hard drive has been created, but it has to be assigned a volume, i.e. a letter, which does not coincide with any of the other physical or virtual hard drive letters the computer may contain. To do so, click, using the right mouse button, on “Disk 5 Unknown” and select “Initialize disk”. The following window will appear:

Windows 7

Choose “MBR” or “GPT” and accept the dialogue box. The virtual drive is no longer displayed as “Unknown” but as “Basic”. Finally right-click on “Unassigned” and choose “New Simple Volume”. A wizard is launched:

Windows 7

Windows 7

Where the following steps are carried out:

  • Configure the final size of the drive (the same size as was indicated when the VHD was created should be introduced).

Windows 7

  • Assign the Drive letter or Path:

Windows 7

  • Choose whether or not to format the partition and define a name or label for the new drive:

Windows 7

  • Finally, finish the wizard:

Windows 7

Automatic start of the VHD when launching Windows 7

Windows 7 does not automatically launch the virtual hard disk each time the computer is switched on, and so users must enter the Disk Management dialogue box and select the VHD each time. To avoid this, a file can be created with .bat format which carries out this task automatically. The process is as follows:

  1. Create a .txt file in Notepad with the following contents:

    Select vdisk file=C:\Path\VirtualDiskx.vhd
    Attach vdisk
    exit


  2. A .bat file also to be create in Notepad. To do so, use the option File ->Save as and for the type of file choose “All files” and so its .bat file extension can be included. Its contents are as follows:

    Diskpart /s C:\Path\previous_text_file.txt

    NOTE: the text displayed in bold within the described files represents that each user should change, in the previous commands, the locations of the virtual drive and of the text file for his/her specific case. If the path or name of the file contains strange characters, for example spaces etc. the complete name will have to be enclosed in quotation marks.

  3. Finally, the .bat file can be executed each time the computer is turned on to start off the drive or alternatively create a shortcut for the file and place it at “Start > All programs > Startup” so it opens upon launching Windows 7.

Top Top

©CYPE Ingenieros - Av. de Loring, 4 - 03003 ALICANTE. Spain
Tel. USA (+1) 202 569 8902 // UK (+44) 20 3608 1448 // Spain (+34) 965 922 550 - Fax (+34) 965 124 950
Home | CYPE | Legal Aspects | Products | Versions | Downloads | Contact us
Bulgarian | French | Italian | Portuguese | Spanish | Spanish (Mexico) | Other dealerships