This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
virtualization:microsoft:hyper-v-usb [2012/09/15 13:09] gcooper |
virtualization:microsoft:hyper-v-usb [2019/05/20 11:32] (current) gcooper |
||
---|---|---|---|
Line 1: | Line 1: | ||
====== Run Microsoft Hyper-V Server From USB ====== | ====== Run Microsoft Hyper-V Server From USB ====== | ||
- | FIXME Gave up trying to get Hyper-V | + | See also **[[https:// |
+ | |||
+ | FIXME I'm not really sure how well this works because it was so slow to boot up that I decided I'd rather use a 32GB SSD and Velcro... | ||
http:// | http:// | ||
Line 8: | Line 10: | ||
* Saves hot-swap drive bay for storage | * Saves hot-swap drive bay for storage | ||
* 16GB Flash device recommended | * 16GB Flash device recommended | ||
+ | * The following example sizes the VHD file for a 16GB flash drive | ||
* Get the fastest one you can | * Get the fastest one you can | ||
* This device **will** be wiped and any data on it lost | * This device **will** be wiped and any data on it lost | ||
Line 15: | Line 18: | ||
:!: During this procedure, carefully keep track of the disk numbers, partition numbers and drive letters. | :!: During this procedure, carefully keep track of the disk numbers, partition numbers and drive letters. | ||
- | < | + | < |
- | C: = Drive on which we create and prepare the VHD file | + | G: = Mounted |
- | X: = Mounted VHD file | + | R: = Mounted VHD file |
Z: = Mounted USB flash drive | Z: = Mounted USB flash drive | ||
- | 1 = Disk number of VHD | + | 1 = Disk number of 16GB USB flash drive |
- | 2 = Disk number of 16GB USB flash drive | + | 2 = Disk number of VHD |
1 = Partition number on VHD | 1 = Partition number on VHD | ||
- | 1 = Index number of the image within install.wim (there is only one image within the Hyper-V Server install.wim)</ | + | 1 = Index number of the image within install.wim (there is only one image within the Hyper-V Server install.wim) |
+ | </ | ||
1) Download and install WAIK: http:// | 1) Download and install WAIK: http:// | ||
Line 28: | Line 32: | ||
2) Download the Hyper-V Server .iso file | 2) Download the Hyper-V Server .iso file | ||
- | 3) Mount the Hyper-V Server .iso file (G: used here for mounted .iso file) | + | 3) Mount the Hyper-V Server .iso file |
* [[http:// | * [[http:// | ||
- | 4) Create, mount and prepare the VHD (virtual hard disk) that will become your bootable USB flash drive. | + | 4) Insert the 16GB USB flash drive |
+ | |||
+ | 5) Create, mount and prepare the VHD (virtual hard disk) | ||
+ | |||
+ | :!: Windows | ||
+ | |||
+ | Open a command prompt as administrator: | ||
< | < | ||
+ | mkdir c:\hvvhd | ||
diskpart | diskpart | ||
- | + | create vdisk file=c:\hvvhd\hyperV.vhd maximum=12288 type=fixed | |
- | create vdisk file=c:\virtualharddisk.vhd maximum=6000 type=fixed | + | select vdisk file=c:\hvvhd\hyperV.vhd |
- | select vdisk file=c:\virtualharddisk.vhd | + | |
attach vdisk | attach vdisk | ||
- | list disk | ||
- | select disk 1 (select the newly created VHD) | ||
create partition primary | create partition primary | ||
- | select partition 1 | + | assign letter=r |
- | active | + | format |
- | format fs=ntfs | + | |
- | assign letter=x | + | |
- | list volume | + | |
</ | </ | ||
- | 5) Apply the install image to the VHD. Leave the " | + | 6) Apply the install image to the VHD. |
+ | |||
+ | Leave the " | ||
- | * Change into the appropriate directory ('' | + | :!: Change into the appropriate directory ('' |
< | < | ||
cd " | cd " | ||
- | imagex.exe /apply g: | + | imagex.exe /apply g: |
</ | </ | ||
- | 6) After that finishes, switch back to the " | + | 7) After imagex |
< | < | ||
- | list disk (to determine | + | detach vdisk |
- | select disk 2 | + | </ |
+ | |||
+ | Determine | ||
+ | |||
+ | < | ||
+ | list disk | ||
+ | |||
+ | select disk 1 | ||
clean | clean | ||
create partition primary | create partition primary | ||
Line 72: | Line 86: | ||
</ | </ | ||
- | 7) Switch back to the " | + | 8) Switch back to the " |
+ | |||
+ | copy c: | ||
+ | |||
+ | 9) Prep the boot sector of the USB flash drive: | ||
+ | |||
+ | < | ||
+ | cd /d " | ||
+ | bootsect /nt60 z: /force /mbr | ||
+ | </ | ||
+ | |||
+ | 10) Switch back to the " | ||
+ | |||
+ | < | ||
+ | select vdisk file=z: | ||
+ | attach vdisk | ||
+ | </ | ||
+ | |||
+ | 11) Back in the " | ||
+ | |||
+ | < | ||
+ | bcdboot r:\windows /s z: /v | ||
+ | </ | ||
+ | |||
+ | 12) Disable paging. | ||
< | < | ||
- | bcdboot x:\Windows | + | reg load HKLM\HyperVTemp r:\windows\system32\config\system |
+ | reg add " | ||
+ | reg delete " | ||
+ | reg unload HKLM\HyperVTemp | ||
</ | </ | ||
- | 8) Switch back to the " | + | 13) Switch back to the " |
< | < | ||
Line 85: | Line 126: | ||
</ | </ | ||
- | 9) Safely Remove the USB flash drive from the technician workstation and test. | + | 14) Safely Remove the USB flash drive from the technician workstation and test. |