Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Is it possible to somehow make VirtualBox directly use a raw partition image for a virtual machine?

By raw partition image, I mean a file that contains a byte-by-byte copy of the partition that I would like to boot from.

I'm not looking to boot from a raw disk image, nor am I looking for a way to boot from a VHD (which isn't raw because it contains other metadata).

share|improve this question

1 Answer 1

This may not be a complete solution to what you're looking for, but you can boot to raw physical disks - if you can mount/masquerade your partition file as a disk, I could see this working. Otherwise, if booting to a physical disk is an option, these are the steps for doing so on a Windows 7 host:

  1. Create a 'mock' VMDK file that points to the physical disk you wish to boot to in your VM (http://www.virtualbox.org/manual/ch09.html#rawdisk). Note that if you are running windows you need to run both the VirtualBox management interface and command prompt as administrator for this command to succeed.
  2. Attach the mock VMDK to a VM.
  3. Offline the disk in disk management and clear the read-only flag for it using DISKPART (https://forums.virtualbox.org/viewtopic.php?f=6&t=38914). This ensures the disk is read/write accessible for VirtualBox, but nothing else on your host.

You then should be able to use the physical drive as your guest OS. Super handy.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.