20
Prepare your VHD for Windows 10 Version 1.0 (11-07-2017) Nick Boszhard (2AT)

Prepare your VHD for Windows 10 - SURF Wiki

  • Upload
    others

  • View
    3

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Prepare your VHD for Windows 10 - SURF Wiki

Prepare your VHD for Windows 10

Version 1.0 (11-07-2017)

Nick Boszhard (2AT)

Page 2: Prepare your VHD for Windows 10 - SURF Wiki

Contents Step 1: Create VHD ........................................................................................................................................................................ 5

Step 2: Choose VHD size ............................................................................................................................................................. 6

Step 4: Configure the disk .......................................................................................................................................................... 7

Step 5: Create the VM .................................................................................................................................................................. 8

Step 6: Choose VM Generation ................................................................................................................................................ 9

Step 7: Specify the OS Disk ..................................................................................................................................................... 10

Step 8: Mount your Windows 10 Image ............................................................................................................................ 11

Step 9: Preparations ................................................................................................................................................................... 12

Step 10: Proceed Windows Installation .............................................................................................................................. 13

Step 11: Proceed with installation ........................................................................................................................................ 14

Step 12: Audit Mode .................................................................................................................................................................. 15

Step 13: SYSPREP ........................................................................................................................................................................ 16

Step 14: Install updates ............................................................................................................................................................ 16

Step 15: Add users ...................................................................................................................................................................... 17

Step 16: SYSPREP ........................................................................................................................................................................ 18

Step 17: Secure VHD file .......................................................................................................................................................... 20

Page 3: Prepare your VHD for Windows 10 - SURF Wiki

Introduction

This guide can be used to prepare a Windows 10 Enterprise VHD to use for the creation of an image

on Microsoft Azure. This is an unsupported by Microsoft, so this is on your own risk.

There is a lot of information to be found on the internet and you could also contact us for questions.

Page 4: Prepare your VHD for Windows 10 - SURF Wiki
Page 5: Prepare your VHD for Windows 10 - SURF Wiki

Step 1: Create VHD Create a Virtual Hard Disk in Hyper-V Manager and choose the VHD format.

Page 6: Prepare your VHD for Windows 10 - SURF Wiki

Step 2: Choose VHD size On this page, choose the Fixed size option

Page 7: Prepare your VHD for Windows 10 - SURF Wiki

Step 4: Configure the disk Enter the size of the VHD. I recommend using 20GB as a minimum. Later, when uploading the disk to

Azure, it will automatically expand the size to the chosen performance tier.

Page 8: Prepare your VHD for Windows 10 - SURF Wiki

Step 5: Create the VM Use Hyper-V Manager to create a new VM.

Page 9: Prepare your VHD for Windows 10 - SURF Wiki

Step 6: Choose VM Generation On this page, choose for the Generation 1 virtual machine. The other specifications don’t matter,

but give it enough memory and a connection to the Internet.

Page 10: Prepare your VHD for Windows 10 - SURF Wiki

Step 7: Specify the OS Disk Select the VHD you created in the previous steps

Page 11: Prepare your VHD for Windows 10 - SURF Wiki

Step 8: Mount your Windows 10 Image Mount your Windows 10 Enterpris ISO and start your VM

Page 12: Prepare your VHD for Windows 10 - SURF Wiki

Step 9: Preparations The VM will boot up and you will see the Windows setup screen. Hit the SHIFT + F10 keys and

you will see a command prompt screen. From here you can remove all partitions, including the

recovery partition.

The commands you would need are:

▪ Diskpart

▪ Select Disk 0

▪ Clean

▪ Create Partition Primary

▪ Format Quick FS=NTFS

▪ Active

▪ Assign

Page 13: Prepare your VHD for Windows 10 - SURF Wiki

Step 10: Proceed Windows Installation You can just continue with the Windows installation and use the partition you just created.

Page 14: Prepare your VHD for Windows 10 - SURF Wiki

Step 11: Proceed with installation Just let the installation continue. The machine will probably reboot a couple of times.

Page 15: Prepare your VHD for Windows 10 - SURF Wiki

Step 12: Audit Mode When you get to the settings screen, you DO NOT continue. On the settings screen, hold the key

combination CTRL + SHIFT + F3 on your keyboard. This will way you will enter the Windows Audit

mode, which is made for image creation. This does a couple things:

- Skip the personalization steps built into Windows 7 and greater

- It will log you in as the administrator without creating a user account.

Page 16: Prepare your VHD for Windows 10 - SURF Wiki

Step 13: SYSPREP Windows will reboot and automatically log in as the administrator. A window will be opened for

System Preparation every time Windows boots. Close it for now, but we will run it later.

Step 14: Install updates Now, install all available Windows updates to get the machine up-to-date.

Page 17: Prepare your VHD for Windows 10 - SURF Wiki

Step 15: Add users Add an extra local administrator account named ‘remote’. Add it to the administrators group. Also

enable remote desktop connections for the administrators group. This will allow you to use RDP on

your Azure machine later.

Page 18: Prepare your VHD for Windows 10 - SURF Wiki

Step 16: SYSPREP When your machine is up-to-date and in your desired state for capture, launch Run, and type in

“sysprep”. This will open the directory containing the Sysprep executable.

Run Sysprep.exe

Page 19: Prepare your VHD for Windows 10 - SURF Wiki

In the Sysprep options, choose the OOBE, check the box to Generalize, and choose to shutdown

the system when finished.

Sysprep will now run and prepare the image. When finished, the VM will be turned off.

Page 20: Prepare your VHD for Windows 10 - SURF Wiki

Step 17: Secure VHD file

You can delete the virtual machine in Hyper-V and secure the VHD file. You can copy the VHD file

anywhere you want, but DO NOT launch it, because then you will start over with the sysprep

steps.