# Create a VHD file from a Linux disk

<https://serverfault.com/questions/682322/create-a-vhd-file-from-a-linux-disk>

Convert in Windows a RAW PhysicalDrive2 to VHD qemu-img.exe convert -f raw -O vpc \\.\PhysicalDrive2 CentOS-5-8.vhd Convert in Linux a RAW sdb to QCOW2 qemu-img convert -f raw -O qcow2 /dev/sdb fitsu\_MKB3021LT.qcow2 Convert a QCOW2, RAW, VMDK or VDI image to VHDX qemu-img.exe convert source.img -O vhdx -o subformat=dynamic dest.vhdx Convert a QCOW2, RAW, VMDK or VDI image to VHD qemu-img.exe convert source.img -O vpc -o subformat=dynamic dest.vhd


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://book.konstantinsecurity.com/readme/architect/vm/create-a-vhd-file-from-a-linux-disk.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
