2

On my laptop, I'm running Debian. For my .net development activities, I run windows 10 virtually (sometimes VirtualBox, sometimes Vmware Player). The problem is that Visual Studeio 2015 is way too slow in a virtual environment, and I like to be able to boot from my windows VHD nativly, for development intensive days.

Now I know we can boot windows from VHD, but not how to add it to a linux bootloader. Is it possible while the VHD file resides on a linux EXT4 filesystem?

6
  • 1
    There is VMWare software that allows you to do this. Its just not free. Windows 8 and above of course support this out of the box.
    – Ramhound
    Commented Dec 2, 2015 at 19:38
  • 1
    Is it an option to simply copy the VHD over to a physical partition and dual-boot? Then you could point the VM to the physical partition so you don't use twice the necessary disk space.
    – KJP
    Commented Dec 2, 2015 at 19:42
  • @KJP On a laptop, its a bit unlikely. On my laptop, I have a fast ssd for the OS and applications, and an hdd for large data. Only the ssd is good for this, which is already used.
    – Alireza
    Commented Dec 2, 2015 at 21:04
  • @Ramhound windows 8 and above support what? What is the keyword to look up?
    – Alireza
    Commented Dec 2, 2015 at 21:05
  • 1
    @Alireza - It really does not have a name.. I just know you can boot to .VHD files if your host os is Windows 8 or above
    – Ramhound
    Commented Dec 2, 2015 at 21:17

1 Answer 1

2

I am not sure it can be done, for reasons to be made clear in a sec.

The process can be broken into three pieces.

  1. It is much easier to boot off an iso image than a vdi (or whatever) disk; you can find here an extensive discussion of how to convert a vdi/vdmk image into an 'iso` image;

  2. You can boot with Grub2 off an iso image: this post teaches you how to create you own Grub2 menuentry for an OS in an iso file;

  3. ... but all of the above pertains to booting off a Linux VM disk with Grub2. Nowhere have I been able to find that you can boot into Windows with the above procedure. You may try, in which case I would be delighted to know the result of your efforts (for purely academic reasons, I am a *Nix-only person). Or...

  4. You may remember that, now that you have an iso, you basically have a whole disk at your disposal: thus you may dd the disk image to a suitable support (either a USB stick, or a real external disk where you may wish later on to enlarge the partitions so as to take full advantage of the larger capacity of the disk with respect to the VM image). Keep in mind, though, that an iso image is a full disk, so that you cannot burn that to a partition in your disk

  5. ... unless of course you wish to isolate the partition on which Windows resides, as explained in this AskUbuntu answer; then, rather than mount the partition, you can dd it to a free partition on your disk. And now you can use Grub2 to dual-boot.

I am afraid that all of this is however not exactly what you were searching for (am I wrong?): perhaps, you were searching for a way to have a single image, from which to boot, alternatively, either in a VM environment or in a real physical system. I apologize if this is not what you were looking for.

1
  • Ideally I like to have a single VHD and sometimes boot it in a VM, sometimes natively. As this might be too difficult I might fall back to any of your suggestions. So all are appreciated.
    – Alireza
    Commented Dec 3, 2015 at 2:10

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .