.vhd

What is a .vhd file?

Virtual Hard Disk · Disk image · Connectix / Microsoft · 2003

A .vhd file is a Virtual Hard Disk: a single file that acts like a physical hard drive for a virtual machine. Windows uses it for Hyper-V, and can even boot from or mount a VHD directly.

Category
Disk image
Type
Binary
Is a .vhd file safe to open? Safe as a container, but a VHD holds a whole operating system. Only mount or boot images from sources you trust.

What is a .vhd file used for?

A VHD contains a whole disk, partitions and filesystem, inside one file marked by the string conectix in its header and footer. Windows can mount a VHD as a drive letter through Disk Management.

Its successor VHDX is more robust and supports larger disks. VirtualBox and other hypervisors also read VHD.

How to open a .vhd file

The .vhd format opens in the following apps, grouped by operating system. If one app does not work, try another from the same list. For a step-by-step walkthrough, see how to open a .vhd file.

Windows

  • Hyper-V
  • Disk Management (mount)
  • VirtualBox

macOS

  • VirtualBox
  • qemu-img (convert)

Linux

  • qemu / qemu-img
  • VirtualBox

How to convert a .vhd file

You can convert a .vhd file to vhdx, vmdk, img using a conversion tool or the export menu of an app that opens it.

.vhd file signature (magic bytes)

Programs recognise a .vhd file by the bytes at the start of the file, not by its name. These are the signatures for VHD. For a full breakdown, see the VHD file signature page.

Hex signatureOffsetNote
63 6F 6E 65 63 74 69 780'conectix' (footer copy is at end of file)

See the full magic-numbers reference for every format.

Frequently asked questions

What is a .vhd file?

A .vhd file is a Virtual Hard Disk: a single file that acts like a physical hard drive for a virtual machine. Windows uses it for Hyper-V, and can even boot from or mount a VHD directly.

How do I open a VHD file?

On Windows, right-click it or use Disk Management to mount it as a drive. Hyper-V and VirtualBox can boot it as a virtual machine.

What is the difference between VHD and VHDX?

VHDX is the newer Hyper-V format: it supports much larger disks and resists corruption from power loss. VHD is older and more widely compatible.

Can I mount a VHD as a drive?

Yes, on Windows. Open Disk Management, choose Attach VHD, and it appears as a normal drive letter.

Comparisons

Related formats

Sources

Details on this page were checked against authoritative references: