Assistanz
Assistanz

Steps to Create Bootable VHD on Hyper-V

Steps to Create Bootable VHD on Hyper-V

Steps to Create Bootable VHD on Hyper-V

In this blog, we will show you the steps to create bootable VHD on Hyper-V which contains a windows image.

 

REQUIREMENTS

  • Hyper-V Physical Host
  • Windows 2016 ISO image
  • DISM (Deployment Image Servicing and Management)

 

CREATING VIRTUAL HARD DISK

  • Open the elevated command prompt window.

Steps to Create Bootable VHD on Hyper-V

 

  • Type the command diskpart and press Enter.

Steps to Create Bootable VHD on Hyper-V

 

  • Type the below command to create a VHD file with disk space. In this demo, we are creating a VHD file named winboot.vhd with 25 GB of disk space.

create vdisk file=e:\vhd\winboot.vhd maximum=25000 type=expandable

Steps to Create Bootable VHD on Hyper-V

 

  • Select the virtual disk.

select vdisk file=e:\vhd\winboot.vhd

Steps to Create Bootable VHD on Hyper-V

 

  • Attach the newly created disk.

attach vdisk

Steps to Create Bootable VHD on Hyper-V

 

  • Create a primary Partition in the virtual disk.

create partition primary

Steps to Create Bootable VHD on Hyper-V

 

  • Assign a Drive Letter. In this demo, we are assigning the driver letter as V.

assign letter=v

Steps to Create Bootable VHD on Hyper-V

 

  • Make the partition as ACTIVE

Steps to Create Bootable VHD on Hyper-V

 

  • Format the VHD.

format quick FS=NTFS Label=VHD

Steps to Create Bootable VHD on Hyper-V

 

  • Type exit command to quit diskpart.

Steps to Create Bootable VHD on Hyper-V

 

APPLY WINDOWS IMAGE TO VHD THROUGH DISM

 

Note: We are using Windows Server 2016 image in this demo

 

  • We have mounted the windows 2016 image in D:\ drive.

Steps to Create Bootable VHD on Hyper-V

 

  • Open the elevated command prompt window.

Steps to Create Bootable VHD on Hyper-V

 

  • Execute the below command to view the OS version and edition from install.wim file.

dism /Get-WimInfo /wimfile:d:\sources\install.wim

Steps to Create Bootable VHD on Hyper-V

 

  • We are applying Windows Server 2016 Datacenter Evaluation edition-Desktop Experience    (Index 4). Run the Apply-Image command through DISM Management.

dism /apply-image /imagefile:d:\sources\install.wim /index:4 /applydir:v:\

Steps to Create Bootable VHD on Hyper-V

 

  • We have already mounted the VHD in V:\ drive. It will take several minutes to complete the action.

Steps to Create Bootable VHD on Hyper-V

 

Steps to Create Bootable VHD on Hyper-V

 

PREPARING VHD TO BOOT AS VIRTUAL MACHINE

  • Open the elevated command prompt window.

Steps to Create Bootable VHD on Hyper-V

 

  • To create the BCD entry for native VHD boot, type the below command.

V:\windows\system32\bcdboot V:\windows /s V:

Steps to Create Bootable VHD on Hyper-V

 

  • BCDboot creates boot configuration entry so that windows bootloader can boot from the VHD.

 

  • Run the bcdedit command to view the system boot configuration information

Steps to Create Bootable VHD on Hyper-V

 

  • Type exit command to close the command prompt window.

 

  • Eject the VHD through windows explorer

Steps to Create Bootable VHD on Hyper-V

 

ADDING THE VHD TO A VM IN HYPER-V

 

  • Open the Hyper-V Snap-in. Right Click on the server name and select New – Virtual Machine.

Steps to Create Bootable VHD on Hyper-V

 

  • From the new virtual machine wizard welcome screen, Click Next.

Steps to Create Bootable VHD on Hyper-V

 

  • Provide a name for the virtual machine and click Next.

Steps to Create Bootable VHD on Hyper-V

 

  • Select the Generation type and click Next.

Steps to Create Bootable VHD on Hyper-V

 

  • Specify the memory size and Click Next.

Steps to Create Bootable VHD on Hyper-V

 

  • Specify the Network adapter from the drop-down list and click Next.

Steps to Create Bootable VHD on Hyper-V

 

  • Select the Use an existing Virtual Hard disk option and click on browse.

Steps to Create Bootable VHD on Hyper-V

 

  • Select the winboot.vhd file from E:\VHD folder and click Open.

Steps to Create Bootable VHD on Hyper-V

 

  • Once the VHD name is shown in the location path. Click Next.

Steps to Create Bootable VHD on Hyper-V

 

  • Click on Finish button to complete the wizard.

Steps to Create Bootable VHD on Hyper-V

 

TESTING THE VM

  • Now spin up the VM through Hyper-V manager. If the VM is properly configured, it will boot and prompt for Region & Language Selection. Provide the required information and click Next.

Steps to Create Bootable VHD on Hyper-V

 

  • Click on Accept button to accept the Windows license agreement.

Steps to Create Bootable VHD on Hyper-V

 

  • Provide the password for the administrator account and click finish to complete the configuration window.

Steps to Create Bootable VHD on Hyper-V

 

  • You will able to view the windows login screen.

Steps to Create Bootable VHD on Hyper-V

VIDEO:

Thanks for reading this blog. We hope it was useful for you to learn the steps to create bootable VHD Image for Hyper-V VM’s.

Most Popular:

Get The Latest Updates

Subscribe To Our Weekly Newsletter

No spam, notifications only about new products, updates.

DirectAdmin Server Management Plans

Premium Support

24/7 End User Support from your Helpdesk
$ 99 Monthly / Server
  • Unlimited Support Plan
  • 24/7 Emergency Phone
  • Chat Support for Admin
  • Separate Account Manager
  • NDA & SLA
  • SLA Review Meetings
  • FREE Consultancy Services
  • Simple SignUp Process
  • Instant Account Activation
  •  

Platinum Support

24/7 Proactive Support
$ 49 Monthly / Server
  • Unlimited Support Plan
  • 24/7 Emergency Phone
  • Chat Support for Admin
  • Separate Account Manager
  • Advance Proactive Monitoring
  • Guaranteed SLA
  • SLA Review Meetings
  • 3rd Party Application Support
  • FREE Consultancy Services
  • Server Migration Support
  • Weekly Status Report
  • No End User Support
Popular

Unlimited Support

24/7 Support

$ 30 Monthly / Server
  • Unlimited Support Plan
  • 24/7 Support
  • Basic Monitoring
  • 30 Minutes Response Time
  • 4 Hours Resolution time for the Possible Issues
  • Security and Performance Optimization
  • React to Customers queries
  • Simple SignUp Process
  • Instant Account Activation
  • No Third party application support
  • No Migration and End User Support

Cpanel Server Management Plans

Premium Support

24/7 End User Support from your Helpdesk

$ 99 Monthly / Server
  • 24/7 End User White Label Support
  • Unlimited Number of Tickets
  • Chat Support for Admin
  • Separate Account Manager
  • Guaranteed SLA
  • Weekly Status Reports
  • FREE Consultancy Services
  • Simple SignUp Process
  • Instant Account Activation

Platinum Support

24/7 Proactive Server Management
$ 49 Monthly / Server
  • Unlimited Support Plan
  • 24/7 Emergency Phone
  • Chat Support for Admin
  • Separate Account Manager
  • Advance Proactive Monitoring
  • Guaranteed SLA
  • SLA Review Meetings
  • 3rd Party Application Support
  • FREE Consultancy Services
  • Server Migration Support
  • Weekly Status Report
  • No End User Support
Popular

Unlimited Support

24/7 Server Management

$ 29 Monthly / Server
  • Unlimited Admin Tasks
  • 24/7 Support
  • Basic Monitoring
  • 30 Minutes Response time
  • 4 hours Response time for possible issues
  • Security and Performance Optimization
  • React to Customers queries
  • No Third party application support
  • No Migration and End User Support

Cpanel Server Management Plans

Premium Support

24/7 End User Support from your Helpdesk

$ 99 Monthly / Server
  • 24/7 End User White Label Support
  • Unlimited Number of Tickets
  • Chat Support for Admin
  • Separate Account Manager
  • Guaranteed SLA
  • Weekly Status Reports
  • FREE Consultancy Services
  • Simple SignUp Process
  • Instant Account Activation

Platinum Support

24/7 Proactive Server Management
$ 49 Monthly / Server
  • Unlimited Support Plan
  • 24/7 Emergency Phone
  • Chat Support for Admin
  • Separate Account Manager
  • Advance Proactive Monitoring
  • Guaranteed SLA
  • SLA Review Meetings
  • 3rd Party Application Support
  • FREE Consultancy Services
  • Server Migration Support
  • Weekly Status Report
  • No End User Support
Popular

Unlimited Support

24/7 Server Management

$ 29 Monthly / Server
  • Unlimited Admin Tasks
  • 24/7 Support
  • Basic Monitoring
  • 30 Minutes Response time
  • 4 hours Response time for possible issues
  • Security and Performance Optimization
  • React to Customers queries
  • No Third party application support
  • No Migration and End User Support