Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have HDD with Windows 7 on one of the partintions which was installed previously on the same machine, connected to the laptop via the USB.

Previously the system was booted from this HDD using grub (installed as a secondary system along with Ubuntu on other partition).

How can I move this partition to the VirtualBox?

I've created an iso image of this system, but I don't have enough space on the new disk to fit both the image and new virtual disk. What if the USB drives are not supported in VirtualBox?


Currently I'm trying to create .vmi file directly from the partition (not the iso). But probably I'll encounter somple problems during booting, caused by the grub installed on the other partition.

share|improve this question
up vote 1 down vote accepted

With Virtual Box there is a set of commands that enable us to get direct raw access to harddisk or harddisk partitions (see Virtual Box Manual for details).

Before we test this it is strongly recommended to backup your drive.

These commands can also be used to boot a virtual machine from a physical drive where a preinstalled OS may reside. In theory the commands should also work for USB drives attached to the host but I have not tested this, so be careful.

In any case where a virtual machine has physical raw access to a drive make sure you don't access this drive from the host as this may lead to unrecoverable data loss.

share|improve this answer

USB is somewhat a standard, and it is supported in Virtual Box. However sometimes it requires additional installation of Guest Additions and VB extension pack. In my opinion if you have BOOTABLE iso image of this system there should be absolutely no problem in moving it to VB.

But I must stress that I have never done something like that before, therefore you should wait for an answer of someone, who had sucessfully done it and will be able to guide you in case of any problems.


edited: The simpliest and most robust way is to secure all the data and to install your system on VB from scratch, and then to copy that data. But it may cause a problem with license - because in fact your Windows will be instaled on a different machine then it was and so on.

Maybe first try to remove grub and existing Ubuntu (if possible) and then make an image. Other way is to leave your windows bootable partition and make an image of just the Windows itself, but in such case there is a rough way ahead of you to make a bootable partition on VB manually.

share|improve this answer

Your Answer


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.