How to open vhd file. Connecting a VHD disk in Windows. Creating virtual hard disks

💖 Do you like it? Share the link with your friends

The system image is intended to restore the entire system; if necessary, you can mount a VHDX disk with the image and extract individual files from it. This can be done both from the graphical snap-in and from the command line using the diskpart utility.

To launch the Disk Management snap-in, click Win+R and enter the command diskmgmt.msc. Open the menu item “Action” - “Attach virtual HDD"and specify the path to the VHDX file with the image.


After this, the drive will appear in the list, and all we have to do is assign a drive letter. Next, select the appropriate item in context menu. After this, the disk becomes visible in the system, you can go to it, view it or copy it necessary files. It is possible to change data on the disk, but it is not recommended, of course, if you plan to recover using it.

To disconnect the VHD, you need to right-click on the disk and select “Disconnect virtual hard disk".


The same can be done using the diskpart utility. To do this we open command console with administrator rights and enter the Diskpart command. Then select the VHDX file with the command:
select vdisk file=″path_to_file″
Mount the virtual disk with the default letter:
attach vdisk
To disable we use the command:
detach vdisk

In 2005, Microsoft developers introduced new format– VHD. It allows you to create virtual hard disk images that can be used to host programs, additional operating systems, and other files as images. This makes it possible to open and test old programs and applications on another virtual OS without any additional computer equipment. The contents of the virtual machine are determined by these files and are located on the host operating system. You can open the VHD file using special virtualization software. Let's consider the basic set of operations performed with such elements.

Working with the VHD extension.

The VHD (Virtual Hard Disc) format is an extension that has the structure of a hard drive: file system, partitions, folders, and so on. As mentioned above, components are launched using visualization programs.

Basic Operations

Such elements can be created, attached and detached, compressed, deleted, converted, and much more. Next, we will look in detail at how to use the VHD extension.

How to open a VHD file

There are several options for opening files. Microsoft developers actively support this format and release specialized applications to work with it. The VirtualBox and Microsoft Virtual PC utilities make it possible to run the OS directly from the host. Thus, you can have both Windows and Linux on your computer at the same time.

Method 1. To open the image and make the content available for viewing, do the following:

  • Click on it with the right mouse button.
  • In the context menu, click “Connect”.
  • We wait while the disk is mounted.

Everything is now available to you file system. You can disable it using the “Extract” tab by right-clicking the mouse button.

Method 2. You can work with the VHD extension through basic management.

  • Right-click on the Start menu.
  • Select the “Disk Management” section.
  • Find the “Actions” tab – “Attach virtual hard disk”.
  • Using the “Browse” button, select the location of the file we need.
  • Let's open it.

ADVICE. You can check the Read Only checkbox if you do not want to make any changes.

Disable it using the “Disconnect” item.

Method 3. Open using the VirtualBox application.

  • We go into the program and create a new virtual machine. In this case, select the type operating system, used on it.
  • Default application prompt to create new disk. You can select the file with the desired system.
  • On the menu additional settings on the panel you can adjust its operation and configure it as a SATA device.

ADVICE. With VirtualBox you can perform a huge number of operations and adjust the operation of the virtual machine.

Method 4. Use 7-Zip. As you know, this is one of the most popular free archivers, which allows you to work with images as well.

  • We launch the program and look for the file we need in it.
  • Click “Extract”.

Method 5. Mount using Daemon Tools. This utility is not as popular as it was before, but is still actively used to open and work not only with the VHD extension, but also with VDI, VMDK.

  • We launch the program and look for the component we need in it.
  • Click “Mount”.

Method 6. Mount in Microsoft Virtual PC. The utility makes it possible to create virtual machines in which we can open the documents and folders we need. The algorithm of actions is similar to that described in working with VirtualBox:

  • We go into the program and create a new car. In this case, we select the type of operating system used on it.
  • The default application will prompt you to create a new virtual component. You can also select a VHD file with a prototype of the desired system.

Is it possible to delete VHD files

Like any other elements, virtual images may be removed or disconnected. It's quite simple to do this:

  1. Select the drive that you want to disconnect or delete. Using the right mouse click, open the context menu and click “Disconnect”.
  2. If you completely remove VHD image If you don’t want to, then simply confirm the action with the “OK” button. For complete removal, in the window that opens, put a tick in the appropriate box.

A disconnected hard drive retains its functionality and all existing data. To resume operation, simply reconnect it. If you completely delete it, then all information stored there is erased irrevocably along with it.

As we can see, Virtual Hard Disc is a very useful and easy-to-use thing. Creating additional areas on your computer helps solve many problems. Using several operating systems allows you to test all kinds of programs, including studying malicious ones, without damaging the main OS. If you still have any questions, ask them in the comments.

If you have installed on your computer antivirus program Can scan all files on your computer, as well as each file individually. You can scan any file by right-clicking on the file and selecting the appropriate option to scan the file for viruses.

For example, in this figure it is highlighted file my-file.vhd, then you need to right-click on this file and select the option in the file menu "scan with AVG". When you select this option, it will open AVG Antivirus, which will perform the check this file for the presence of viruses.


Sometimes an error may occur as a result incorrect software installation, which may be due to a problem encountered during the installation process. This may interfere with your operating system link your VHD file to the correct application software , influencing the so-called "file extension associations".

Sometimes simple reinstalling Microsoft Notepad may solve your problem by linking the VHD to Microsoft Notepad correctly. In other cases, problems with file associations may result from bad software programming developer and you may need to contact the developer to obtain additional help.


Advice: Try updating Microsoft Notepad to latest version to make sure you have the latest patches and updates installed.


This may seem too obvious, but often The VHD file itself may be causing the problem. If you received the file via an attachment Email or downloaded it from a website and the download process was interrupted (for example, a power outage or other reason), the file may become damaged. If possible, try to get a new copy VHD file and try to open it again.


Carefully: A damaged file may cause collateral damage to a previous or existing malware on your PC, so it is very important to keep an updated antivirus running on your computer at all times.


If your file is VHD related to the hardware on your computer to open the file you may need update device drivers associated with this equipment.

This problem usually associated with media file types, which depend on successfully opening the hardware inside the computer, e.g. sound card or video cards. For example, if you are trying to open an audio file but cannot open it, you may need to update sound card drivers.


Advice: If when you try to open a VHD file you receive .SYS file error message, the problem could probably be associated with damaged or outdated drivers devices that need to be updated. This process can be made easier by using driver update software such as DriverDoc.


If the steps do not solve the problem and you are still having problems opening VHD files, this may be due to lack of available system resources. Some versions of VHD files may require a significant amount of resources (e.g. memory/RAM, processing power) to properly open on your computer. This problem occurs quite often if you are using a fairly old computer. Hardware and at the same time a much newer operating system.

This problem can occur when the computer has difficulty completing a task because the operating system (and other services running in background) can consume too many resources to open the VHD file. Try closing all applications on your PC before opening VHDL Source File. Freeing up all available resources on your computer will provide the best conditions for attempting to open the VHD file.


If you completed all the steps described above and your VHD file still won't open, you may need to run equipment update. In most cases, even when using older versions of hardware, the processing power can still be more than sufficient for most user applications (unless you're doing a lot of CPU-intensive work, such as 3D rendering, financial/scientific modeling, or intensive multimedia work) . Thus, it is likely that your computer does not have enough memory(more commonly called "RAM", or RAM) to perform the file open task.

05.09.2009 05:09

In Windows 7, you can easily create, connect, and disconnect virtual hard disks.

General information about VHD

Virtual hard disk(English: Virtual Hard Disk (VHD)) is a file format that has a structure and content similar to a hard disk.

A virtual hard disk is used to store data and even operating systems in a single image file that can be opened by virtualization programs or virtual machines. Windows 7 contains everything you need software to create, mount and boot from VHD files.

Creating, connecting and disconnecting virtual hard drives in Windows 7 is done through the interface Disk Management Microsoft management console.

A virtual hard disk can be created anywhere on a computer's hard drive except Windows folders and its subfolders.

Minimum virtual size hard drive– 3 megabytes. The maximum size is limited only by the amount of free space on the physical hard drive.

Create a virtual hard disk

1. Open Start, type in the search bar and press Enter.

2. In the menu Action select .

3. Click Review.

4. Select the location where the virtual hard disk will be stored, set the disk being created name and click Save.

5. If you want the virtual hard disk's capacity to increase as you store data on it, select Dynamic expansion. If you want the virtual hard disk capacity to remain fixed, select Fixed size and specify the size of the hard drive you are creating in megabytes, gigabytes, or terabytes.

6. Click OK and wait for Windows 7 to create the virtual hard disk and install the driver for it.

After creation virtual disk described here the Windows way 7 automatically attaches (mounts) it, so immediately after creating the disk we can see it in the console's disk management interface Windows management 7 in the list of all disks installed on the system.

7. To start using the created disk, .

Disconnecting a virtual hard disk

1. Right-click on the virtual hard disk and select .

2. Confirm your decision.

Once detached, the virtual hard disk will not be accessible until you attach it again.

The performance of such a system will be higher than when using virtual machines. Because When using virtualization, two systems run simultaneously on a computer. And in the case of VHD, there is only one and all computer resources are allocated to it.

Windows 7 and higher can be used as the main system. Using this method, you can install an operating system from Windows Vista and higher on a virtual disk.

Attention!

Booting from VHD disks in Windows 7 is supported only by the Ultimate and Enterprise editions.

In Windows 10, booting from VHD is supported by the Professional edition and higher.

So, let's begin.

Creating a virtual hard disk (VHD)

There are two ways to create a VHD in Windows 7 - using the Diskpart utility (using CMD), or through the visual interface of the Disk Manager. The second method is simpler and more visual, so we use it.

Open Disk Manager. This can be done in the following way: Start -> Control Panel -> Administration -> Computer management -> .

Specify the location of the VHD file.

The file size must be large enough to be enough to deploy the operating system, install updates, necessary programs and storage of various files. At the same time, the file size should not be larger than the free space on the disk where it is located.

I prefer to select the virtual hard disk format " Dynamic expansion", because this mode saves space.

Click OK, a VHD file is created.

After this, the created virtual disk appears in the "" console. But it is not initialized.

It is initialized through the context menu:

As a result, we created a virtual hard disk, it is located on drive D: ( D:\MyDisk.vhd) and is visible in the operating system. You can deploy another “OS” on it.

Deploying Windows Operating System on VHD

To do this you will need a utility imagex.exe from the Windows AIK or Windows ADK. I have already prudently taken this utility from WADK and attached it to the article. Download imagex for x64 and x86 you can at the bottom of the page.

You will also need the file install.wim from Windows distribution. In the distribution it is located in the folder Sources. Let's assume that we have an installation DVD inserted into the drive and the path to install.wim looks like this - E:\Sources\install.wim.

Deploying the OS from the install.wim file to disk is performed as follows.

Since one WIM file can contain several OS images, we will first determine the index of the image we need:

imagex /info E:\sources\install.wim

Let's assume that the required Windows is located under index 1.

We deploy 1 operating system from the index onto our VHD:

imagex /apply /check E:\sources\install.wim 1 Z:\

where Z: is the letter assigned to our VHD.

After you finish deploying the operating system, you can go to the VHD disk and make sure that its directory structure matches system disk Windows.

If everything went well, then we proceed to adding information to the OS bootloader that it is also possible to boot from our VHD.

Changing information in the Windows boot loader

Launch the command line with administrator rights.

We create a copy of the current operating system in the bootloader and give it the description “Windows 7 VHD”:

bcdedit /copy (current) /d "Windows 7 VHD"

Running this command will also display the GUID new entry. Write it down or copy it - we will need it.

If you forgot to write down the GUID, you can find it out by running the command bcdedit without parameters.

bcdedit /set (GUID) device vhd=\MyDisk.vhd

bcdedit /set (GUID) osdevice vhd=\MyDisk.vhd

Don't forget to change the drive letter and path of the VHD file to your own.

Some x86-based systems require you to change the boot configuration setting for the kernel to find specific hardware information and successfully perform a native boot from the VHD:

bcdedit /set (GUID) detecthal on

where GUID is the identifier of our new entry in the loader.

Completion

Now you can reboot your computer.

When you start the computer on a black background, you will be asked within 5 seconds to select an operating system. Choose your newly created system.

Disabling boot from VHD and returning to original state

To return your computer to original condition, you must complete the following steps (in any order):

  • Remove entry from bootloader.

    To do this we run the command bcdedit without parameters. She will show us all the records. We find our added entry and its GUID in the list.

    To remove it, run the command:

    bcdedit /delete (GUID)

  • Delete the virtual disk from the console "".
  • Delete VHD file.

P.S. Describe in the comments for what purposes do you use the technology of booting from a VHD virtual disk?



tell friends