3

I want to experiment with various Windows builds.

Normally, I'd put those builds on a bootable USB stick, then either deploy them on a physical or VM machine using something like Plop bootmanager.

How can I fake such a bootable USB stick so all the files from that disk are in fact on a path on the host?

  • With a real stick there seems to be other workarounds than Plop: reboot.pro/8581 – Jeroen Wiert Pluimers Nov 8 '11 at 17:06
  • Stumbled on this with similar scenario. I have Windows 10 in a VM, trying to upgrade the OS. I have 10GB available on C and 20 available on a virtual D. But the upgrade aborts saying I don't have enough disk. The estimate says 6GB but MS docs say 20. So I'm thinking of creating a virtual USB from actual host hard drive space, adding this as temporary space to allow W10 to upgrade, then removing the virtul stick when it' done. So far I haven't found how to do this. – TonyG Mar 18 '18 at 22:09
3

Unfortunately, I am not aware of a way to fake a USB stick in any VMware product, but, this would be a brilliant feature.

Until then, one work around would be to create a SCSI virtual hard drive somewhere and mount this to your virtual machine.

VMware Workstation also has the ability to mount Virtual Hard disks to your host machine. If you uncheck the Read Only option, this should work well.

Obviously however, it will appear to the guest machine as a physical hard drive - for most operations, it will not make a difference, but, if you are trying to test booting, it may not be a reliable alternative as it will not match the real environment you are testing for.

The best thing you can probably do is to actually plug a USB stick in to your machine and connect it to the guest virtual machine. This should allow you to test the environment in the correct way as the USB stick will show as a USB stick to the virtual machine.

  • Right now, it takes about 7 hours to copy all the files to the USB drive (even if it is a really fast one: Windows 7 PRE environments tend to have many small files which take a long time). That's why I want to emulate it :) – Jeroen Wiert Pluimers Nov 4 '11 at 10:51
  • Sorry, I don't think I honestly understand the situation... I deploy Windows from USB drives all the time. If your USB drive is that slow, you may want to consider getting a newer one - I only have a budget/entry level one, but, it takes about 5-10 minutes to copy a Windows DVD to it, and only about 20-30 minutes to actually install Windows from it :/ – William Hilsum Nov 4 '11 at 10:54
  • The current Windows 7 PRE image is about 10 gigabyte; even on a fast 16 Gb A-DATA USB 3 stick it takes many hours to make the copy. There's thousands of files to be copied and that makes it slow. – Jeroen Wiert Pluimers Nov 4 '11 at 11:14
  • @JeroenPluimers - Are you actually installing Windows on to the USB stick? Not just the installer then? ... Sorry, I still don't fully understand what you are trying to do! If you want to install from a USB stick (and I thought you were attempting to copy a dvd to a USB stick), the majority of files are compressed in a WIM file - there are a total of 751 files, and it is about 3.2GBs – William Hilsum Nov 4 '11 at 11:15
  • apart from the base install, there is about 20k files totaling to about 10 GB of additional data that can optionally be installed. That is a seriously large copy action. – Jeroen Wiert Pluimers Nov 4 '11 at 21:23
1

I was able to install Windows 10 Pro in VMware Workstation 12.0 on a Debian Linux (stretch / testing) host by doing the following:

  1. Create an image of the USB stick using dd (or ddrescue or equivalent tool -- make sure to get the whole device not just the FAT partition)
  2. Use losetup to make that image appear as a raw device (i.e. /dev/loop0).
  3. Set permissions on that loopback device with chown so that the user running vmware can access it (so you don't have to run vmware as root)
  4. Add a virtual hard drive to the VM and choose the raw / physical device option.
  5. Boot to firmware and make sure that boot device has top priority.

I have not tried this but you might be able to simultaneously mount a filesystem present on that loopback device and make changes to it so you don't have recreate the image file. If not, it shouldn't take too much time to shutdown the VM, mount the loopback device locally & make changes or point it to a different device then boot up the VM again.

  • I should also mention that this did create some minor headaches because the Windows 10 installer did not setup the new virtual disk with the boot configuration but rather just added an entry for the new installation to the installer image. So when I removed that loopback drive it failed to boot. I fixed this by reconnecting it, booting to recovery/command line, temporarily moving the boot directory on the install image, rebuilding the BCD following pcsupport.about.com/od/fixtheproblem/ht/…, moving the boot folder to the main fs, then restoring the old one. – iX3 Oct 22 '15 at 17:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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