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/14 13:53] 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:// |
- | http:// | + | 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://www.itstuff.ca/2009/12/create-bootable-usb-drive-for-hyper-v.html | + | http://technet.microsoft.com/en-us/library/ee731893%28WS.10%29.aspx |
* Boot Hyper-V Server from USB flash devices | * Boot Hyper-V Server from USB flash devices | ||
* 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 | ||
- | ==== On a Windows 7 Workstation ==== | + | ==== On a Windows 7 Technician |
- | 1) Download and Install | + | :!: During this procedure, carefully keep track of the disk numbers, partition numbers and drive letters. |
+ | |||
+ | < | ||
+ | G: = Mounted Hyper-V Server install DVD | ||
+ | R: = Mounted VHD file | ||
+ | Z: = Mounted USB flash drive | ||
+ | 1 = Disk number of 16GB USB flash drive | ||
+ | 2 = Disk number of 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) Download and install | ||
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 |
- | 4) Open a command prompt as administrator: | + | * [[http:// |
+ | |||
+ | 4) Insert the 16GB USB flash drive | ||
+ | |||
+ | 5) Create, mount and prepare the VHD (virtual hard disk) | ||
+ | |||
+ | :!: Windows will prompt you to format the VHD; just click ' | ||
+ | |||
+ | 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 | ||
+ | create partition primary | ||
+ | assign letter=r | ||
+ | format quick fs=ntfs label=hyperV | ||
+ | </ | ||
+ | |||
+ | 6) Apply the install image to the VHD. | ||
+ | |||
+ | Leave the " | ||
+ | |||
+ | :!: Change into the appropriate directory ('' | ||
+ | |||
+ | < | ||
+ | cd " | ||
+ | imagex.exe /apply g: | ||
+ | </ | ||
+ | |||
+ | 7) After imagex finishes, switch back to the " | ||
+ | |||
+ | < | ||
+ | detach vdisk | ||
+ | </ | ||
+ | |||
+ | Determine the disk number of the USB flash drive and prepare it: | ||
+ | |||
+ | < | ||
list disk | list disk | ||
- | select disk N (select the newly created VHD) | + | |
+ | select disk 1 | ||
+ | clean | ||
create partition primary | create partition primary | ||
select partition 1 | select partition 1 | ||
active | active | ||
- | format fs=ntfs | + | format |
- | assign letter=x | + | assign letter=z |
- | list volume | + | |
</ | </ | ||
- | 5) Leave that window | + | 8) Switch back to the " |
+ | |||
+ | copy c: | ||
+ | |||
+ | 9) Prep the boot sector of the USB flash drive: | ||
< | < | ||
- | "C:\Program Files\Windows AIK\Tools\amd64\imagex.exe" /apply g:\sources\install.wim | + | cd /d "c:\program files\Windows AIK\tools\PETools\< |
+ | bootsect | ||
</ | </ | ||
- | 6) While that is happening, switch | + | 10) Switch |
- | list disk (to determine the disk number of the USB flash drive - ' | + | < |
- | select | + | select |
- | clean | + | attach vdisk |
- | create partition primary | + | </ |
- | select partition 1 | + | |
- | active | + | |
- | format quick fs=ntfs | + | |
- | assign letter=z | + | |
- | exit | + | |
+ | 11) Back in the " | ||
- | copy ' | + | < |
+ | bcdboot r:\windows /s z: /v | ||
+ | </ | ||
+ | |||
+ | 12) Disable paging. | ||
+ | |||
+ | < | ||
+ | reg load HKLM\HyperVTemp r: | ||
+ | reg add " | ||
+ | reg delete " | ||
+ | reg unload HKLM\HyperVTemp | ||
+ | </ | ||
+ | |||
+ | 13) Switch back to the " | ||
+ | |||
+ | < | ||
+ | detach vdisk | ||
+ | exit | ||
+ | </ | ||
- | bcdboot e:\Windows /s I: /v | + | 14) Safely Remove the USB flash drive from the technician workstation and test. |