Using Virtual Box with a WinHelper USB drive
The instructions can be used for installing Windows Vista/7/8/10 using E2B directly from a .ISO file using an .XML file.
If you want to test Windows Install unattend XML files with Disk 0 as the target drive try the VMWare+Plop method.
WIMBOOTNote: If you are using E2B v1.A8 or later, you do not need a WinHelper USB flash drive because E2B will use WIMBOOT.
E2B will use WIMBOOT as long as the Virtual Machine (or real system) has 1.5GB or more of RAM (system memory) allocated to it. Use Method 1 below.
The Problem!
When a USB drive is mapped as a .vmdk bootable drive under Virtual Box, the Virtual Machine 'sees' the USB drive as a 'hard disk' and not as a USB device.
This means that if you are using an E2B removable USB drive (or E2B HDD) we need to also attach a WinHelper Removable Flash drive.
However, the WinHelper flash drive will not be seen as a 'removable' drive by Windows Setup and so the XML file will not be used by Windows Setup.
A further complication is that the USB drive in the VM will be seen as HDD0 and the target hard disk will be seen as HDD1.
We thus need to use an XML file which specifies HDD1 as the target drive (if specified) and not HDD0.
If you wish to use Virtual Box to install Vista/7/8/10 to a virtual machine using an ISO file and an XML file here is how to do it.
Pre-requisites
- Windows Host system + install a recent version of Virtual Box (VBOX)
- Make a WinHelper USB flash drive (must be Removable type) - not required if using E2B v1.A8+
- The E2B drive can be a Fixed-disk type or Removable type
- Install DavidB's Virtual Machine USB Boot Windows utility (VMUB)
- Set up a shortcut for VMUB to run as Adminstrator on Windows Desktop or TaskBar
- If using an XML file which auto-partitions and formats the target drive, make sure the target drive is specified as drive 1 in the XML file and not drive 0 (drive 0 will be the E2B drive!). i.e. 1 in ALL places in the XML file. Sample XML files can be found in the E2B \_ISO\WINDOWS\ folders.
- Both VBOX and VMUB must be always run as Administrator
- Ensure the \_ISO\MyE2B.cfg file does NOT have a set NOHELPER=1 line - if it does, delete the line or this will not work is using Method 2.
Method 1
This method can be used to install Windows from an ISO file. However, the target hard disk will be the 2nd hard disk in the system (the E2B USB drive is the first drive). This means that if you use an unattended XML file to install Windows, it must specify Disk 1 rather than Disk 0 as the target drive.
This method requires you to manually copy the unattend XML files to the WinHelper USB drive unless you use E2B v1.A8+ and WIMBOOT.
Setup VM
- Close down VBOX if it is open
- Run VMUB as Administrator and click the Manager button to open VBOX Manager
- Create a new VM in VBOX (specify OS, SATA hard disk, etc.) min. 1.6GB RAM
- Set number of Storage - SATA ports to 2 or more
- Change the virtual hard disk (.vdi) to be on SATA Port 1 (not port 0)
- SATA Port 0 will be used later for the VMUBDrivexxxx.vmdk file.
- Ensure there are no USB devices ticked in the USB section of VBOX Settings panel (see Fig. 3 below)
Setup VMUB
1. Use VMUB to boot to the E2B USB drive.
2. Select the Windows ISO and XML file as normal
Try the usual E2B Windows install process - if WIMBOOT is used, you do not need to follow the next steps.
3. Allow the VM to start to boot to Windows Setup and Shutdown the VM (Power off)
4. Copy the \AutoUnattend.xml and \Unattend.xml files from the E2B drive to the WinHelper Flash drive
5. Use VMUB to boot to the E2B Main Menu
6. Attach the WinHelper USB flash drive as a USB device using the VBox - Devices - USB tab at the top of the VBox form. The WinHelper USB drive should then be detached from Windows and attached as a USB device to the VM
7. Continue with E2B and select the same ISO and XML file again from the E2B menu
8. When Windows Setup loads, the 'LOADISO.cmd' blue console window should run and load the ISO as a virtual drive. The XML files that you copied to the WinHelper USB drive will be used.
Steps 3-7 are not required if using E2B v1.A8+ and WIMBOOT.
A similar method can be used with VMWare.
Method 2
This method is more complicated, but you do not need to manually copy the XML files to the WinHelper USB drive.
Note that the target hard disk will be Drive 1 (not Drive 0).
Setup VM
- Close down VBOX if it is open
- Run VMUB as Administrator and click the Manager button to open VBOX Manager
- Create a new VM in VBOX (specify OS, SATA hard disk, etc.)
- Set number of Storage - SATA ports to 3 or more
- Change the virtual hard disk (.vdi) to be on SATA Port 1 (not port 0)
- SATA Port 0 will be used later for the VMUBDrivexxxx.vmdk file. SATA Port 2 will be used later for the WinHelper Flash drive.
- Ensure there are no USB devices ticked in the USB section of VBOX Settings panel (see Fig. 3)
Fig. 1 SATA port assignment for use with VMUB. When first set-up, ports 0 and 2 will be unused.
After use:
SATA 0 = E2B vmdk
SATA 1 = HDD vdi
SATA 2 = WinHelper vmdk
Setup VMUB
- Run VMUB as Administrator and click the Manager button to open VBOX Manager
- Add the new VM to VBOX and add the E2B USB drive as the 'First drive' and the WinHelper flash drive as the 'Second drive'
Fig. 2 VMUB setup with E2B+WinHelper flash drive.
Tick the Options button for 'Show a second drive option' to use a second drive in VMUB.
How to install Windows 10 (or Vista/7/8) from an ISO
We need to boot twice. The first time E2B will modify and copy the XML file to the WinHelper USB drive as \AutoUnattend.xml.
The second time, Windows will 'see' the WinHelper drive as a Removable USB drive and load the XML file.
- Connect E2B USB + WinHelper USB to your host Windows system's USB ports.
- Ensure the VM does not have the WinHelper USB device enabled in the VM Settings - USB panel.
- Run VMUB (as Administrator) and boot to E2B (if E2B cannot detect hd1 - check SATA Port settings!) .
- Select the Windows 10 ISO and choose your XML file - wait until Windows Setup shows the first screen...
(E2B will copy the XML files to the WinHelper USB drive).
IMPORTANT: Do not use a WIPE DISK 0 XML file or it will destroy your E2B drive!!!
Use a WIPE DISK 1 XML file or an XML file which does not auto-erase the disk. - Shutdown/Power Off the VM (do NOT save the session).
SECOND BOOT - Use the VMUB 'Manager' button to run VBOX and enable the WinHelper USB flash drive in the USB settings panel (Fig. 3).
Fig. 3 USB setting panel in VBOX - WinHelper flash drive enabled.
- Run the VM again from VMUB - this time the WinHelper USB drive should be dismounted by Windows as VBOX starts (you will hear a 'ding' as dismounts the USB WinHelper drive).
- Select the same Windows 10 ISO and the same XML file again in E2B (actually it does not matter what XML file you pick!).
- This time Windows Setup should pick up the XML file from the removable WinHelper flash drive and use the settings within it (you should see the bue LOADISONP.cmd console window display briefly).
(E2B cannot detect or change the WinHelper drive - Windows will detect the WinHelper drive as a Removable USB drive and load the XML file).
Note that Windows may be quite slow when accessing the 'guest' WinHelper USB drive, so be patient! After the first file copy stage and first reboot - you can press F7 in E2B to continue the installation from the virtual hard disk.
Tip: Untick the WinHelperUSB drive from the VBOX Manager - USB panel once Windows has rebooted and then boot to E2B and press F7 to continue the build. This will speed up installation and also ensures that the WinHelper drive is seen by E2B the next time you install Windows.
OR... to save time, set up two almost identical VMs (both with the same hard disk vdi on SATA port 1) and two VMUB configurations...
- First boot USB - VMUB: E2B+WinHelper, VBOX: no USB device
- 2nd boot USB - VMUB: E2B only, VBOX: WinHelper as USB device
Troubleshooting
- If no USB devices are listed in the VBOX USB panel when you try to add the WinHelper drive - re-install Virtual Box.
- Each time you install from a different ISO or use a different XML file, you must repeat Steps 1-9 above. If you start from step 6, then Setup will use whatever XML file was on the WinHelper flash drive previously!
- Each time you boot to E2B, it will overwrite the XML files on the WinHelper flash drive (if it can access it).
- Make sure Drive 1 is the virtual hard disk - when booted to E2B, you can use the Utilities - List BIOS disks menu to check.
Note: If you are using E2B v1.A8 or later, you do not need a WinHelper USB flash drive because E2B will use WIMBOOT.
E2B will use WIMBOOT as long as the Virtual Machine (or real system) has 1.5GB or more of RAM (system memory) allocated to it. Use Method 1 below.IMPORTANT: Ensure the your \_ISO\MyE2B.cfg file does NOT set the NOHELPER variable - otherwise WIMBOOT will not be used.