Create Iso From Vhd

Create VHD/VHDX in Windows Server. Note: You can create and mount VHD/VHDX using this method on Windows Server 2008, 2012, 2016 and Windows clients such as; Windows 8, 10. Before getting started, plan which drive to use for VHD and VHD size. Open Run (win+r) and type Diskmgmt.msc then hit enter. When the Disk Management opened, click on. Convert Bootable ISO File to Virtual Disk VHD/VMDK on MAC. Converting a bootable ISO to a Virtual disc VHD/VMDK on Mac is nearly the same as using Windows. All you will need is to start Terminal in your Mac and execute the same commands. However, as stated previously, you want to install the VirtualBox program on your Mac. The high-level workflow to create a generalized Windows VHD using an ISO is: Prepare the source VM using an ISO image: Create a new, blank, fixed-size VHD in Hyper-V Manager. Use that VHD to create a new virtual machine. Mount your ISO image on the DVD drive of the new VM. Start the VM, and install the Windows operating system. The bootable image creator, allows you to create an additional Windows 7, Windows 8 or Windows 2012 installation in a virtual disk (vhd). It configures a separate boot entry for your system and allows you to run an isolated test or development environment on your system without hyper-v.

  1. Create Iso From Vhdx
  2. Create Iso From Vhdx
  3. Make Iso From Vhd
  4. How To Convert Vhdx To Iso
  5. Create Iso From Vhd

New-WindowsImage -size small | Test-Lab

This is a tutorial showing how to convert a VHD to an ISO.UltraISO:http://www.ezbsystems.com/ultraiso/download.htmGImageX:http://www.autoitscript.com/gimagex.

One of the time consuming steps to deploying new VMs is the time spend managing Images and and applying patches. I’m not big on Golden images. I tend to use a fully patched VHDX or VMDK and let DSC handle the configuration and software. This is not the fastest, and at scale you need to create more then one image based on what saves the most time. (IIS, SQL, Exchange, etc…).

In this series, I’m going to go over how I create a a baseline image of 2012r2 with PowerShell. Also because Install-WindowsFeature has issues when the target VM has been patched, we are also going to create a fully patched WIM to use as -source.

Blogs in this Series

  • Part 1 VHDX from ISO
  • Part 2 Patching and Cleanup via PowerShell
  • Part 3 SysPrep and Compacting Images
  • Part 4 Bringing it all together with automation

First you need a 20112r2 ISO, at work you would get this from the Volume License Service center. Every time Microsoft releases a roll-up, they usually update the ISO file so it’s a good idea check every few months for an updated ISO. Now for a home lab, unless you have a personal MSDN, your going to need an ISO from another source. I’m just going with the latest trial from the TechNet Evaluation Center. Don’t download the VHD. We are going to need both Core and GUI from the ISO. While we could get there from the VHD, It’s not the path I’m taking.

I’m saving the ISO in c:ISO and renaming it Server2012R2.ISO

Now what I’m going to do is create two VHDX one core and one with a GUI. I could use the ISO to manually install but I want to limit my use of the mouse, (and screen shots are a pain to insert in the blog)

Vhd

Create Iso From Vhdx

Once I have that downloaded I can mount it on My windows 8.1 hyper-v host that contains the Test Lab. The reason for this is I will need the VHDX on the host. The WMI file can be on any share accessible by the VM’s.

This will mount it as it’s own drive. in my case I:

Next I’m going to need a way to extract the contents of Install.wim and create a properly formatted VHDX. Now many of the examples of this online are for Gen1 machines. I want Gen2. so I’m going to get a copy of Convert-WindowsImage.ps1
Unfortunately this is not a module but and advanced script. I’m not going to go in-depth on how Convert-WindowsImage works. Check it’s help and open it up if your curious.

We now have two VHDX files however they are still a little out of date, and we can still trim them up a bit.

I’m going to copy the VHDX files, just so we can see how the size changes on each step.

Now we will create VM’s and attach the two drives. I will also add the ISO to the GUI version as we need it for making sure all windows features are ‘Available”

Those last two command connect me to the servers.

Now I’m going to go on the assumption that you have experience setting up server and you can handle the Out of Box experience on your own.

In Part 2 we will cover Windows Updates with PowerShell, along with cleaning up unneeded files.

New-WindowsImage -size small | Test-Lab

One of the time consuming steps to deploying new VMs is the time spend managing Images and and applying patches. I’m not big on Golden images. I tend to use a fully patched VHDX or VMDK and let DSC handle the configuration and software. This is not the fastest, and at scale you need to create more then one image based on what saves the most time. (IIS, SQL, Exchange, etc…).

In this series, I’m going to go over how I create a a baseline image of 2012r2 with PowerShell. Also because Install-WindowsFeature has issues when the target VM has been patched, we are also going to create a fully patched WIM to use as -source.

Blogs in this Series

  • Part 1 VHDX from ISO
  • Part 2 Patching and Cleanup via PowerShell
  • Part 3 SysPrep and Compacting Images
  • Part 4 Bringing it all together with automation

First you need a 20112r2 ISO, at work you would get this from the Volume License Service center. Every time Microsoft releases a roll-up, they usually update the ISO file so it’s a good idea check every few months for an updated ISO. Now for a home lab, unless you have a personal MSDN, your going to need an ISO from another source. I’m just going with the latest trial from the TechNet Evaluation Center. Don’t download the VHD. We are going to need both Core and GUI from the ISO. While we could get there from the VHD, It’s not the path I’m taking.

I’m saving the ISO in c:ISO and renaming it Server2012R2.ISO

Make iso from vhd

Create Iso From Vhdx

Now what I’m going to do is create two VHDX one core and one with a GUI. I could use the ISO to manually install but I want to limit my use of the mouse, (and screen shots are a pain to insert in the blog)

Create Iso From Vhd

Once I have that downloaded I can mount it on My windows 8.1 hyper-v host that contains the Test Lab. The reason for this is I will need the VHDX on the host. The WMI file can be on any share accessible by the VM’s.

This will mount it as it’s own drive. in my case I:

Next I’m going to need a way to extract the contents of Install.wim and create a properly formatted VHDX. Now many of the examples of this online are for Gen1 machines. I want Gen2. so I’m going to get a copy of Convert-WindowsImage.ps1
Unfortunately this is not a module but and advanced script. I’m not going to go in-depth on how Convert-WindowsImage works. Check it’s help and open it up if your curious.

Create Iso From Vhd

Make Iso From Vhd

We now have two VHDX files however they are still a little out of date, and we can still trim them up a bit.

I’m going to copy the VHDX files, just so we can see how the size changes on each step.

Now we will create VM’s and attach the two drives. I will also add the ISO to the GUI version as we need it for making sure all windows features are ‘Available”

Those last two command connect me to the servers.

How To Convert Vhdx To Iso

Now I’m going to go on the assumption that you have experience setting up server and you can handle the Out of Box experience on your own.

Create Iso From Vhd

In Part 2 we will cover Windows Updates with PowerShell, along with cleaning up unneeded files.