I deleted the file with the vhd extension, what to do. Create VHD and Boot from VHD

VHD is a file that contains virtual hard disk image, used by Microsoft Windows Virtual PC. A single VHD file can contain all the data stored on a physical hard drive, stored in one structure - partitions, system files, regular files, and folders.

Possibilities derived from VHD files

VHD files are commonly used as virtual machine disks, allowing you to install and run multiple operating systems without the need for multiple physical disks or separate computers. This gives many possibilities, for example: support for programs and applications in different environments. VHD files also allow you to restore only selected directories or the entire hard drive.

A Brief History of the VHD Format

The VHD format was created by Connectix, bought in 2003 by Microsoft, which created the Mircosoft Virtual PC product. Since 2005, Microsoft has rolled out a free license for the VHD format. In 2012, certain updates were introduced and deployed in a new format - .

VHD File Types

VHD files can be identified in several types, making them easy to manage. This:

  • fixed hard disk image - has a fixed size equal to the size of the hard disk;
  • dynamic hard disk image - the file size is equal to the size of the files on the virtual disk and additionally to the size of the file header;
  • differencing disk image - a separate file that works provided that the current disk is the mother disk;
  • linked - contains only a link to a physical disk.

Users working with hypervisors may sometimes be faced with the need to access the disk of a virtual machine (VM) from the host system environment - the main operating system (OS) installed on the physical disk. For example, when you need to copy data to the guest OS, which does not support the installation of add-ons. Or when errors occur in the operation of the hypervisor that make it impossible to start the VM, and the necessary files are hidden inside it.

How to mount a VM disk for display in the host system? Below we will consider how, in the host Windows environment, virtual hard disk files used by hypervisors are connected, Hyper-V and VMware .

The article will offer options for accessing VM disks:

Allowing you to write data to their files;
not providing for recording, but only offering the possibility of reading and copying information in case it is necessary to extract it.

To be able to write data to a virtual disk file (i.e. so that files moved from the host system appear in the guest OS) The VM in its hypervisor environment must be turned off. It is turned off, not suspended. Not every hypervisor program recalls this subtlety.

1. Connecting VHD and VHDX using Windows

vhd and VHDX– virtual disk file formats used by the built-in Windows 8.1 and 10 hypervisor Hyper-V- in the environment of these versions of the host system, you can mount it using its own standard tools.

On the disk file, call the context menu, select .

And we are looking for sections of the new device in the explorer. This option provides for both reading and writing data. To remove a disk VM from the host system, call the context menu on any of its displayed sections and click .

2. Connecting the VMDK using VMware Workstation

VMDK and vhd- disc formats VM with whom it works ON VMware- can be connected to display in the host Windows Explorer using the program tools VMware Workstation. Its mount tools provide for both reading and writing data. Open the options for the desired VM. On the tab "Equipment" left click HDD, click the button on the right "Map". The Connect Disk Wizard window will appear. Here we select the desired section, focusing on its size. In our case, this is the Windows system partition. Uncheck the box to open in read-only mode. And we press "OK".

Important nuance: when opening system guest partitions OS installed on virtual GPT -disks, in the wizard window, you must select not the partition itself with the installed OS (section C in the case of guest Windows) , and the preceding MSR - section with size usually 16 or 128 MB. Of course, if MSR - the section is in the structure EFI -systems. It won't be there in every case.

The mounted partition will open in the host system explorer. To disable, close it open in the explorer (or file manager) . And we go to the same place where we mounted it - in the parameters VM. But now we press the button "Disable".

3. Converting VDI to VHD using VirtualBox

Does not allow you to mount disks on your own VM to access them from the Windows host system environment. But among its arsenal there is a converter that can convert native format discs VDI v vhd , VMDK and other types. And, for example, vhd-file in host environment Windows 8.1 or 10 can be opened by regular means OS. Moreover, if necessary, continue working with VM, it can be recreated on the basis of an already converted disk vhd. In the window switch to section "Tools". Click on the desired disk VM, in the context menu select "Copy".

Here's an important point: count "File name" need to clean up - remove the extension from the name ".vdi". And trace below to how the type was set VHD. We press "Save".

And now - "Copy".

The converted file is subsequently opened using Explorer.

We remove it from the host system by extracting it, as shown in clause 1 of the article.

However, if the associated goal of resuscitation VM not prosecuted if it is only about the removal of valuable information from a file VDI, it is easier to resort to the following two options for resolving the issue.

The free version can mount various types of virtual disks for reading and writing data, including hard disks that work with VMVMDK , VDI , vhd , VHDX. In the program window, click "Quick mount", specify the path to the disk file VM, open.

We remove it using the delete option in the context menu on the icon of the mounted device.

5. Plugin for Total Commander

Working with Total Commander only to view and copy valuable data stored on the disk VM you don't have to go far. The issue is resolved inside this file manager using a plugin for it. The primary mission of this plug-in is to provide access in the Windows environment to partitions and media with file systems used in linux. And unsupported by Windows. In addition to the main features, the plugin can mount disks for reading VM formats VMDK , VDI , vhd , VHDX and HDS .

Unpack it inside Total Commander. We answer "Yes" for installation proposal. Follow the steps of the installation wizard.

We launch Total Commander (fundamentally) on behalf of the administrator. Switch to . We go into.

VM. We press Next.

In the overview, specify the folder VM. Then we will see all the disks connected to the machine. We can uncheck unnecessary ones if there are several of them. And we click Mount.

Press Ctrl + R to refresh the contents of the panels Total Commander. And we will see the mounted partitions of the virtual disk.

We copy its contents with the usual for Total Commander way - the button below or the F5 key. The procedure for unmounting disks is not provided by the plugin. Yes, it is not needed as such: just restart Total Commander.

In 2005, Microsoft introduced a 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 hardware. The content of the virtual machine is defined by these files and resides on the host operating system. You can open a VHD file using special virtualization software. Consider the basic set of operations performed on such elements.

Working with the VHD extension.

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

Basic operations

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

How to open VHD file

There are several options for opening files. Microsoft developers actively support this format and release specialized applications for working 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 are waiting for the disk to be mounted.

Everything, now the file system is available to you. You can turn it off by clicking the "Extract" tab with the right mouse button.

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

  • Right click on the "Start" menu.
  • Select the "Disk Management" section.
  • We find the tab "Actions" - "Attach a virtual hard disk".
  • Using the "Browse" button, select the location of the file we need.
  • We open it.

ADVICE. You can check the "Read Only" box if you don't 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, we select the type of operating system used on it.
  • The default application prompts you to create a new drive. You can also select a file with the desired system.
  • In the advanced settings menu 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 behavior of the virtual machine.

Method 4. Use 7-Zip. As you know, this is one of the most popular free archivers that 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. We mount in Microsoft Virtual PC. The utility allows you to create virtual machines in which you 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 machine. In this case, we select the type of operating system used on it.
  • The default application prompts 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 item, virtual images can be removed or detached. To do this is quite simple:

  1. Select the drive you want to detach or remove. Using the right mouse button, open the context menu and click "Disconnect".
  2. If you do not want to completely delete the VHD image, then simply confirm the action with the "OK" button. For complete removal, in the window that opens, check the appropriate box.

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

As we can see, Virtual Hard Disk is a very useful and easy to use thing. Creating additional areas on the computer helps to solve many problems. The use of several operating systems allows you to test all kinds of programs, including malware, without affecting the main OS. If you have any questions, ask them in the comments.

If your computer has antivirus program can scan all files on the 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, file my-file.vhd, then you need to right-click on this file, and in the file menu select the option "scan with AVG". Selecting this option will open AVG Antivirus and scan the file for viruses.


Sometimes an error can result from incorrect software installation, which may be due to a problem that occurred during the installation process. It may interfere with your operating system associate your VHD file with the correct software application, influencing the so-called "file extension associations".

Sometimes simple reinstall Microsoft Notepad may solve your problem by correctly linking the VHD to Microsoft Notepad. In other cases, file association problems may result from bad software programming developer, and you may need to contact the developer for further assistance.


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


This may seem too obvious, but often the VHD file itself may be causing the problem. If you received a file via an email attachment or downloaded it from a website and the download process was interrupted (for example, by a power outage or other reason), the file may be corrupted. If possible, try getting a fresh copy of the VHD file and try opening it again.


Carefully: A corrupted file can cause collateral damage to previous or existing malware on your PC, so it's important to keep your computer up to date with an up-to-date antivirus.


If your VHD file associated with 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 the successful opening of the hardware inside the computer, for example, sound card or video card. 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 get .SYS file related error message, the problem could probably be associated with corrupted or outdated device drivers that need to be updated. This process can be facilitated by using driver update software such as DriverDoc.


If the steps didn't 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 (eg. memory/RAM, processing power) to open properly on your computer. This problem is quite common if you are using fairly old computer hardware and a much newer operating system at the same time.

This problem can occur when the computer is having a hard time completing a task because the operating system (and other services running in the background) can consume too many resources to open VHD file. Try closing all applications on your PC before opening VHDL Source File. By freeing up all available resources on your computer, you will ensure the best possible conditions for trying to open the VHD file.


If you completed all the above steps and your VHD file still won't open, you may need to run hardware upgrade. In most cases, even with older hardware versions, the processing power can still be more than enough for most user applications (unless you're doing a lot of CPU-intensive work like 3D rendering, financial/science modeling, or media-intensive work) . In this way, it is likely that your computer does not have enough memory(more commonly referred to as "RAM", or RAM) to perform the task of opening a file.

In June 2005, Microsoft developed a new specification for the Virtual Hard Disk (VHD) image format. VHD is a file format whose overall structure and contents are similar to a hard disk. It is used to store virtual operating systems, programs, and other files in a single image file that can be opened by different virtualization programs or virtual machines. The Microsoft VHD format is currently used by Microsoft Virtual PC 2007, Microsoft Virtual Server 2005 R2, and Hyper-V. Virtual hard disks allow multiple operating systems to reside on the same computer at the same time. The VHD file defines the virtual machine's hard disk format, which is located in a single file on the host operating system. In addition, Windows 7 and Windows Server 2008 R2 operating systems can support creating, mounting, and booting from VHDs located on the host system. In this article, I'll talk about the supported types of virtual hard disks, as well as the basic operations that you can perform with them.

Supported virtual hard disk formats

Virtual machine hard drives are stored on the host operating system as separate files. There are three types of virtual disks:

Basic actions to perform with VHD disks

The basic operations that can be performed with virtual hard disks include actions such as creating, attaching, detaching, deleting virtual hard disks. It is also possible to compress disks, convert physical disks to virtual ones, connect disks as folders, and more. This guide does not cover all possible operations that are performed on virtual hard disks.

Create virtual hard disks

To create a virtual hard disk, follow these steps:

A virtual hard disk can also be created using the command line utility diskpart. To do this, in the command line with administrator rights, you need to use the command Create Vdisk

Create Vdisk File=<имя_файла>Maximum= Type=Fixed|Expandable

  • Using the parameter file you can specify the full path and name of the virtual disk.
  • Parameter maximum is responsible for the maximum disk space provided by the virtual disk, specified in megabytes.
  • Using the parameter type you can specify the virtual disk format. There are two values ​​for this parameter:
    • FIXED creates a fixed size virtual disk file;
    • EXPANDABLE creates a dynamically expandable virtual disk image.
  • Using the parameter parent you can specify the path to an existing virtual disk parent file to create a differencing disk. When using Parent, you cannot use the Maximum option because the size of the differencing disk is determined by the parent file. In addition, the Type parameter cannot be specified either, since only expandable differencing disks (the Expandable parameter) can be created.
  • Parameter Source is intended to specify the path to an existing virtual disk file to prepopulate a new virtual disk file. When using the Source parameter, data from the source virtual disk file is copied block by block into the virtual disk file that is created. However, there is no parent-child relationship between them.

Using the parameter SD you can specify a security descriptor in SDDL format. By default, the security descriptor is taken from the parent directory. In its simplest form, a string can contain an access security descriptor called a user-level access control list (DACL).

Attaching a virtual hard disk

If you already have a virtual hard disk created, you can attach it to the Disk Management snap-in. This can be done like this:


You can also attach a virtual hard disk using the command line utility diskpart. To do this, in the command line with administrator rights, select the desired virtual disk with the command Select Vdisk Attach Vdisk. The syntax is the following:

Attach Vdisk

This command can be used without parameters. Available options:


Initializing a virtual hard disk

After the virtual hard is created or attached, it needs to be initialized for further work. Using the graphical interface, this can be done as follows:


Creating a simple volume on a VHD disk

To create a simple volume on a VHD disk, follow these steps:


Detaching a virtual disk

To detach a virtual disk, do the following:


You can also detach a virtual hard disk using the command line utility diskpart. To do this, in the command line with administrator rights, you need to select the intended virtual disk with the command Select Vdisk and then use the command Detach Vdisk. The command syntax is as follows:

View information about a virtual disk

To view detailed disk information, follow these steps:

  1. Select the desired virtual disk using the command Select Vdisk;
  2. Connect the disk if it is not already connected to the computer;
  3. Use the team Detail Vdisk

There are no additional options for this command.

Compress virtual disks

Using a command line utility diskpart you can compress virtual disks. To do this, select the desired virtual disk, connect the disk in the "only for reading" and use the command Compact Vdisk. This command compresses the virtual disk file to reduce the physical size of the file. Shrinking is only possible on a detached expandable virtual disk or an expandable virtual disk connected in read-only mode.

Conclusion

This article briefly talks about Virtual Hard Disk (VHD) technology and the possible formats of virtual hard disks. It also describes in detail the basic actions that can be performed on virtual hard disks using the graphical interface, as well as using the DiskPart command-line utility. The options for creating, attaching, initializing, detaching, and viewing information about virtual hard disks are described.