Driver FixRecommendedSound, Wi-Fi or graphics acting up? Check drivers firstFind missing or outdated drivers fast.Check DriversHalloween DealsAmazon USHalloween week deals: useful picks before month-endAmazon US: current deals, useful picks and tech finds.Check DealsWindows FixRecommendedWindows errors stealing your time? Find the fix fastScan stability, cleanup and performance issues.Fix Now×
FREEDOM251

Freedom251 › Blog › Hyper-V

Convert a VHDX File to VHD Using PowerShell

By Freedom251 Team · · 8 min read

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Use the Hyper-V PowerShell cmdlet Convert-VHD to create a VHD copy of a VHDX file. Set the destination filename to end in .vhd; the extension determines the output format. The source virtual disk must be detached and offline before conversion begins.

The basic command is:

Convert-VHD -Path 'C:VMsource.vhdx' -DestinationPath 'C:VMconverted.vhd'

What the conversion does

Convert-VHD copies a virtual hard disk into a new file in the format indicated by the destination extension. It does not convert the existing file in place. In the basic VHDX-to-VHD operation, the original VHDX remains available and a separate VHD is written to the destination path.

As an Amazon Associate I earn from qualifying purchases.

The cmdlet is part of the Hyper-V PowerShell module. You need a Windows installation with that module available and permission to read the source file and create the destination file. The source disk cannot be attached to a running virtual machine or mounted for use by the host while conversion is running.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Before you run Convert-VHD

Shut down workloads using the disk

Power off the virtual machine that owns the disk, or otherwise stop every workload that can write to it. A clean shutdown is preferable to suspending a VM because it prevents new writes while the conversion reads the source.

Detach and take the source offline

The source VHDX must be offline and must not be attached when conversion starts. In practice, check both places where it could be in use:

  • In Hyper-V Manager, remove the disk from the VM configuration or ensure the VM is powered off and the disk is no longer attached.
  • On the host, make sure the VHDX is not mounted through File Explorer, Disk Management, or another storage tool.

Do not delete or modify the source while the copy is in progress. Keep enough free space for the destination and any temporary storage required by the conversion.

Choose a destination on suitable storage

Use a new path, or confirm that an existing destination can safely be overwritten according to your operational policy. The destination must end in .vhd for VHD output. Avoid placing the destination inside a folder that is being synchronized or backed up in a way that can lock the file during conversion.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Basic VHDX-to-VHD conversion

Open PowerShell with an account that can access both paths, then run:

Convert-VHD -Path 'C:VMsource.vhdx' -DestinationPath 'C:VMconverted.vhd'

Replace both paths with the actual source and destination. Quote paths that contain spaces. For example:

Convert-VHD -Path 'D:Virtual MachinesAccountingaccounting.vhdx' -DestinationPath 'E:Convertedaccounting.vhd'

When the command completes, the new file is the VHD copy. Conversion time depends on the virtual disk and storage system; Microsoft’s documentation does not provide a universal time estimate or performance benchmark for this operation.

How the destination extension controls the format

The output format is inferred from -DestinationPath:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Destination filename Format created Typical use
converted.vhd VHD Compatibility with a platform or tool that accepts VHD rather than VHDX
converted.vhdx VHDX Creating another VHDX copy or changing disk-type options while staying in VHDX format

Do not rely on a filename rename to change formats. Renaming source.vhdx to source.vhd changes only the name, not the disk structure. Use Convert-VHD so the destination is written in the requested format.

Choose fixed, dynamic, or differencing output

The -VHDType parameter controls the type of the destination disk. It accepts Fixed, Dynamic, and Differencing.

VHD type Allocation behavior When to choose it Important consideration
Fixed Space for the virtual disk is allocated in advance. Use when predictable allocation or a target platform’s fixed-disk requirement matters. Requires enough free physical storage for the requested virtual size.
Dynamic The file grows as data is written, up to its virtual capacity. Use when conserving initial host storage is more important than preallocating the full size. Monitor host free space as the file grows.
Differencing The destination stores changes relative to a parent disk. Use for a child disk that depends on an existing parent VHD. The parent path and an intact parent chain are required.

If you omit -VHDType, the output type defaults to the source disk type. Specify a type when the destination must differ from the source or when you want the choice to be explicit in an automation script.

Create a fixed VHD

Convert-VHD -Path 'C:VMsource.vhdx' -DestinationPath 'C:VMconverted-fixed.vhd' -VHDType Fixed

This requests a fixed VHD destination. Verify that the destination volume has adequate free space before starting.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Create a dynamic VHD

Convert-VHD -Path 'C:VMsource.vhdx' -DestinationPath 'C:VMconverted-dynamic.vhd' -VHDType Dynamic

This requests a dynamically expanding VHD. The file can occupy less space initially than a fixed disk, but the host must continue to have room as guest data increases.

Convert a differencing VHDX and preserve its parent

A differencing disk is not self-contained: it records changes against a parent. When converting one, specify both the destination type and the parent VHD:

Convert-VHD -Path 'C:VMchild.vhdx' `
  -DestinationPath 'C:VMchild.vhd' `
  -VHDType Differencing `
  -ParentPath 'C:VMparent.vhd'

The parent path must identify the VHD that the new child should reference. Keep the parent unchanged and available at the expected path. Moving, renaming, or modifying the parent can break the child’s chain or make the resulting disk unusable.

Use this mode only when the source is actually a differencing disk and you understand its parent relationship. For a standalone VHDX, choose Fixed or Dynamic, or omit -VHDType to retain the source type.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Preview, preserve, and verify the operation

Preview with WhatIf

To preview what PowerShell would do without performing the conversion, add -WhatIf:

Convert-VHD -Path 'C:VMsource.vhdx' -DestinationPath 'C:VMconverted.vhd' -WhatIf

This is useful in scripts and change windows for confirming paths and parameters before a potentially large file copy.

Keep the source until validation

-DeleteSource can remove the source after conversion. Treat it as a destructive option. The safer sequence is to convert without it, validate the destination, attach the VHD to a test VM or inspect it through your normal Hyper-V workflow, and retain a backup or the original until the result is accepted.

If you deliberately use automatic deletion, the command has this form:

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Convert-VHD -Path 'C:VMsource.vhdx' -DestinationPath 'C:VMconverted.vhd' -DeleteSource

Do not combine automatic deletion with an untested destination, uncertain permissions, or an unverified differencing chain.

Return the converted disk object

Add -Passthru when a script needs the resulting virtual-disk object in the pipeline:

$converted = Convert-VHD -Path 'C:VMsource.vhdx' -DestinationPath 'C:VMconverted.vhd' -Passthru
$converted

This allows subsequent PowerShell logic to inspect or pass the conversion result instead of relying only on console output.

Run the conversion asynchronously

For an operation that may take a long time, use -AsJob:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
$job = Convert-VHD -Path 'C:VMsource.vhdx' -DestinationPath 'C:VMconverted.vhd' -AsJob
$job

Track the job with standard PowerShell job commands:

Get-Job -Id $job.Id
Receive-Job -Id $job.Id -Wait

Keep the source offline for the entire job, not merely until the command returns the job object. Do not start the VM or mount the VHDX again until the job has finished.

Remote and advanced parameters

The cmdlet syntax also includes parameters for remote and specialized administration:

  • -ComputerName targets a computer by name.
  • -CimSession uses an existing CIM session.
  • -Credential supplies credentials for the remote operation.
  • -BlockSizeBytes sets the block size when the conversion scenario requires explicit control.
  • -Confirm requests confirmation before the operation.

Remote conversions still require the source disk to be offline on the computer where it resides. Establish connectivity and permissions first, and test the exact command with -WhatIf where supported by your workflow.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #4
Sale
Mastering Active Directory: Design, deploy, and protect Active Directory Domain Services for Windows Server 2022
  • Mastering Active Directory: Design, deploy, and protect Active Directory Domain Services for Windows Server 2022, 3rd Edition
  • ABIS BOOK
  • Packt Publishing
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Common failures and fixes

“The disk is in use” or an attachment error

Shut down the VM, remove the VHDX from its configuration if necessary, and check that the host has not mounted the file. Close management tools that may have an active attachment, then retry.

Destination already exists

Choose a new destination, or deliberately handle the existing file according to your change procedure. Do not overwrite a known-good VHD until you have a backup and have confirmed that the path is correct.

Access denied

Run PowerShell with an identity that can read the source and write to the destination. Check NTFS permissions, share permissions for remote paths, and whether security software is locking either file.

Not enough space

For fixed output, free space must accommodate the allocated virtual disk. For dynamic output, allow for growth over the disk’s future use, not only its current file size. Move the destination to a volume with sufficient capacity and retry.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

The converted differencing disk will not boot

Confirm that -VHDType Differencing was used and that -ParentPath points to the correct, unchanged parent VHD. A child disk cannot operate correctly when its parent has been replaced, edited, or moved without preserving the expected relationship.

The file has a .vhd extension but tools reject it

Check that you ran Convert-VHD rather than merely renaming the file. The extension selects the format only when it is used as the destination of the conversion command.

Attach and validate the resulting VHD

After the command completes, validate the destination before retiring the VHDX:

  1. Confirm that the destination file exists at the exact path supplied to -DestinationPath.
  2. Check that its size and disk type match the choice you made: inherited source type, fixed, dynamic, or differencing.
  3. Attach the VHD to a test or maintenance VM, keeping the original VHDX available for rollback.
  4. Verify that the guest sees the expected partitions and data, and that applications can read and write as intended.
  5. For a differencing disk, confirm that the parent remains at the path recorded for the child and that the complete chain is available.
  6. Only after validation should you update the production VM configuration or consider deleting the source.

A repeatable conversion checklist

  • Identify the source VHDX and the required destination path.
  • Power off the VM and detach or unmount the source.
  • Confirm the destination volume has sufficient space and the account has access.
  • Choose whether to inherit the source type or specify Fixed, Dynamic, or Differencing.
  • For a differencing conversion, identify the correct parent VHD and include -ParentPath.
  • Run a -WhatIf preview for scripted or high-impact changes.
  • Run Convert-VHD, optionally with -Passthru or -AsJob.
  • Keep the source offline until the operation completes.
  • Validate the destination before using -DeleteSource or removing the original.

What this method does not tell you

The cmdlet performs the format conversion, but the conversion command alone does not select the best format for every hypervisor. Decide based on the target platform’s VHD support, storage-allocation requirements, and whether the disk is part of a differencing chain. Microsoft’s documented syntax does not publish a fixed conversion-time figure or a performance benchmark, so estimate the maintenance window from your own disk size and storage throughput rather than relying on a universal number.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Hyper-VPowerShellVHDVHDXvirtual disksWindows virtualization

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Recommended PC Tool
Recommended PC Tool
PC Slower Than It Used to Be?Free scan - under a minute
Crashes, No Sound, or Screen Glitches?Free driver scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.