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

To use an .img file as a VirtualBox virtual machine’s hard disk, first confirm it is a raw disk image, convert it with VBoxManage convertfromraw, then attach the resulting virtual disk to a VM. The extension alone does not confirm that the file is raw or bootable.

Before you convert the image

  • Keep the original file unchanged. Work on a copy or make sure you have a known-good backup.
  • Check what the image contains and which operating system it is meant to run. The .img suffix does not identify its format, prove it represents a complete disk, or guarantee it can boot.
  • Have a VirtualBox VM configured for the intended guest OS. Firmware and hardware settings depend on the image and cannot be prescribed without knowing its origin.

Convert a raw .img file to a VirtualBox disk

Oracle documents VBoxManage convertfromraw for converting a raw disk image into a VirtualBox virtual disk. VDI is the default output format.

  1. Open a command prompt or terminal on a system where VirtualBox is installed.
  2. Run the conversion command, replacing the example names with the actual paths to your input image and destination file:
    VBoxManage convertfromraw input.img output.vdi
  3. Wait for conversion to finish. The resulting output.vdi is the virtual disk to attach to the VM. Keep the source image as a fallback.

Oracle’s VirtualBox 7.2.2 User Guide describes this command as converting a raw disk image to a VirtualBox virtual disk image (VDI). If VirtualBox cannot read the input, verify that it is a raw disk image rather than assuming its filename extension is sufficient.

Choose a different output format only if you need it

VDI is the straightforward default for VirtualBox. The command also supports VMDK and VHD; select one when another tool or workflow requires it.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
#1 Best Overall
Sale
Seagate 2TB Portable Hard Drive | USB 3.0 (STGX2000400)
  • Easily store and access 2TB to content on the go with the Seagate Portable Drive, a USB external hard drive
  • Designed to work with Windows or Mac computers, this external hard drive makes backup a snap just drag and drop
  • To get set up, connect the portable hard drive to a computer for automatic recognition no software required
  • This USB drive provides plug and play simplicity with the included 18 inch USB 3.0 cable
  • The available storage capacity may vary.
Choice When it fits Documented behavior
VDI Default choice for a VirtualBox disk Default output format
VMDK When a workflow requires VMDK compatibility Supports variants including Split2G, Stream, and ESX; these serve specific needs and are not interchangeable in every combination
VHD When a workflow requires VHD Supported output format

For example, to request VMDK explicitly, run:

VBoxManage convertfromraw input.img output.vmdk --format VMDK

The manual describes the Standard variant as dynamically allocated and Fixed as fixed size. For VMDK, Split2G divides the image into 2 GB segments, Stream is optimized for downloading, and ESX is intended for some VMware products. Use a special variant only when the destination workflow calls for it; incompatible variant combinations fail.

Rank #2
Seagate Portable 5TB External Hard Drive HDD – USB 3.0 for PC, Mac, PS4, & Xbox - 1-Year Rescue Service (STGX5000400), Black
  • Easily store and access 5TB of content on the go with the Seagate portable drive, a USB external hard Drive
  • Designed to work with Windows or Mac computers, this external hard drive makes backup a snap just drag and drop
  • To get set up, connect the portable hard drive to a computer for automatic recognition software required
  • This USB drive provides plug and play simplicity with the included 18 inch USB 3.0 cable
  • The available storage capacity may vary.

Attach the converted disk to a VM

  1. Create or select a VM configured for the operating system in the image.
  2. Open the VM’s storage configuration and attach the converted .vdi (or your chosen VMDK or VHD) as its virtual hard disk.
  3. Start the VM. If it does not boot, investigate whether the image is bootable and whether the VM’s firmware and hardware configuration match the source system. The right settings depend on the image.

Some Windows guests may need the new VM configured similarly to the old one, according to the VirtualBox manual. A successful conversion creates a virtual disk; it does not by itself guarantee that the guest operating system will boot on different virtual hardware.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Copying or moving the disk

VirtualBox assigns UUIDs to virtual disk images and cautions against simply importing duplicate copies. If you need to reuse or move disks, use VirtualBox’s supported media-management workflow. If you are moving a complete VM, Oracle points to VirtualBox import/export rather than treating the disk as the whole machine.

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.

Quick Recap

SaleBestseller No. 1
Seagate 2TB Portable Hard Drive | USB 3.0 (STGX2000400)
Seagate 2TB Portable Hard Drive | USB 3.0 (STGX2000400)
This USB drive provides plug and play simplicity with the included 18 inch USB 3.0 cable; The available storage capacity may vary.
$119.99
Bestseller No. 2
Seagate Portable 5TB External Hard Drive HDD – USB 3.0 for PC, Mac, PS4, & Xbox - 1-Year Rescue Service (STGX5000400), Black
Seagate Portable 5TB External Hard Drive HDD – USB 3.0 for PC, Mac, PS4, & Xbox - 1-Year Rescue Service (STGX5000400), Black
This USB drive provides plug and play simplicity with the included 18 inch USB 3.0 cable; The available storage capacity may vary.
$229.99
Bestseller No. 3
Seagate Portable 1TB External Hard Drive HDD – USB 3.0 for PC, Mac, PlayStation, & Xbox, 1-Year Rescue Service (STGX1000400) , Black
Seagate Portable 1TB External Hard Drive HDD – USB 3.0 for PC, Mac, PlayStation, & Xbox, 1-Year Rescue Service (STGX1000400) , Black
This USB drive provides plug and play simplicity with the included 18 inch USB 3.0 cable; The available storage capacity may vary.
$119.80
SaleBestseller No. 4
Seagate Portable 4TB External Hard Drive HDD – USB 3.0, 1-Year Rescue
Seagate Portable 4TB External Hard Drive HDD – USB 3.0, 1-Year Rescue
This USB drive provides plug and play simplicity with the included 18 inch USB 3.0 cable; The available storage capacity may vary.
$157.73
Best Value
Sale
UnionSine 500GB Ultra Slim Portable External Hard Drive HDD-USB 3.0
  • [Upgraded Version] - This external hard drive features a mirrored logo stripe combined with a striped anti-slip design, and the rounded corners of the casing make it easier to grip. The stripes also have a heat dissipation function, ensuring stable and fast data transfer.
  • 【Ultra-thin and quiet】 - The motherboard adopts JMicron 578 noise-free solution, giving you a quiet working environment. Lightweight and portable size designed to fit in your pocket for easy portability.
  • 【Ultra-Fast Data Transfers】 - Pairing this external hard drive with JMicron 578 solution USB 3.0 and USB 2.0 interfaces enables blazing-fast data transfer. It boasts theoretical read speeds of up to 125MB/s and write speeds of up to 103MB/s.
  • 【Plug and Play】 - With no software to install, just plug it in and the drive is ready to use.The hard disk chip is wrapped with an aluminum anti-interference layer to increase heat dissipation and protect data.
  • 【What You Get】 - 1 x Portable Hard Drive, 1 x USB 3.0 Cable, 1 x User Manual, Gift-type shell packaging ,Three-year manufacturer's warranty and free technical support services.
Rank #4
Sale
Seagate Portable 4TB External Hard Drive HDD – USB 3.0, 1-Year Rescue
  • Easily store and access 4TB of content on the go with the Seagate Portable Drive, a USB external hard drive.Specific uses: Personal
  • Designed to work with Windows or Mac computers, this external hard drive makes backup a snap just drag and drop
  • To get set up, connect the portable hard drive to a computer for automatic recognition no software required
  • This USB drive provides plug and play simplicity with the included 18 inch USB 3.0 cable
  • The available storage capacity may vary.
Rank #3
Seagate Portable 1TB External Hard Drive HDD – USB 3.0 for PC, Mac, PlayStation, & Xbox, 1-Year Rescue Service (STGX1000400) , Black
  • Easily store and access 1TB to content on the go with the Seagate Portable Drive, a USB external hard drive.Specific uses: Personal
  • Designed to work with Windows or Mac computers, this external hard drive makes backup a snap just drag and drop. Reformatting may be required for Mac
  • To get set up, connect the portable hard drive to a computer for automatic recognition no software required
  • This USB drive provides plug and play simplicity with the included 18 inch USB 3.0 cable
  • The available storage capacity may vary.

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.