Windows 10 Vhd

Basically, a virtual hard disk (VHDX or VHD) is a file on Windows 10 operating system that acts as a physical hard drive but the difference is that this is a file stored on a real disk. The extension of the file is.vhdx or.vhd. If the on VHD installed Windows 10 edition is the same than Windows edition on host machine, Windows 10 on VHD will be automatically activated. However, Windows cannot be upgraded when booted to VHD. This is somewhat illogical; booted to VHD, Windows acts as on any physical installation, for instance using real hardware devices, but system. Windows 10 Key's in VHD? I created a brand new Windows 10 Pro machine with the intent of installing Hyper-V to create 3 Virtual Machines on the Windows 10 Pro physical machine. I did a clean install of Pro on the physical machine, and installed Hyper-V with no issues. In an earlier story entitled Native boot VHD – Dual boot made easy, I explained how to deploy Windows 10 on a virtual hard disk, add it to the boot menu, and use the VHD in a dual or multi boot scenario instead of installing Windows onto a physical partition or virtual machine. Easy, fast and practical.

Last week, we posted a quick guide on how you can create bootable media for Windows 10.

After reading a lot of the comments, we’ve added a mini guide to creating USB media, with sections on using Rufus and Microsoft's own Windows 7 USB/DVD Tool. And here, we've put together a guide on how to create, boot to and install Windows on a VHD. So without further ado, let’s crack on!

WindowsWindows 10 vhd iso

Up until now, using USB media on your desktop or laptop to install Windows 10 is a destructive process, unless you are dual booting to a secondary hard disk. But what if you don’t have a second hard disk and don’t want to have the Windows 10 installation destroy your existing Windows instance?

Those of you that work in IT will be well versed in virtualization. It’s still a buzzword, and with Windows 10 introducing Virtual Desktops, it will continue to be. The simplest, non-destructive way to test Windows 10 would be to download any number of the free Virtual Server apps out there. The most popular, free apps, would have to be VMware Player and VirtualBox. You should also know that Windows 8.1 has Hyper-V built-in in Pro and Enterprise versions.

While there are other more complex and complete solutions from VMware, Citrix and Microsoft themselves. If your computer has a half decent processor (i5 upwards), at least 6GB of RAM and 50GB of free space you’d be best installing either VMware Player or VirtualBox and start playing/learning.

We’ve already touched upon utilizing your existing hardware to install Windows 10 as a virtual machine on your host OS. But the problem with that is, you will have to take a slight performance hit (due to the Windows 10 OS sitting on the virtual stack of network, storage and hardware). What if you wanted to boot Windows 10 on your system, without formatting the hard disk? This is where VHDs (virtual hard disks) prove their worth.

We can create a VHD in Windows 7, 8 and 8.1 (not to mention Server 2008 R2 and up) and install to what is essentially a secondary hard disk, stored as a .vhd file, on your physical disk(s).

There are three ways that creating the VHD can be achieved: Computer/Disk Management Console, diskpart and PowerShell. We’ll look at all three, but first let’s start with Computer Management.

  1. Open compmgmt.msc as an administrator
    1. Click/press Start, type compmgmt.msc, right click on the (likely) first result and choose Run as administrator
  2. Once in Computer Management, right click the Disk Management and choose Create VHD
  3. You will be asked to specify a location for the VHD, which we’ve chosen C:VHD and the filename Win10.vhd
    1. Set your disk size – we’ve gone with the standard 32GB
    2. Unless you’ve got space to spare, you don’t need to worry about make it a VHDX file
    3. Unless space is at a premium, choose Fixed size. This means the VHD will be 32GB in size
  4. Click OK and wait for the VHD to be created
  5. The VHD should automatically be attached, but if it’s not right click the Disk Management again, this time choosing Attach VHD
  6. Click Browse and choose the VHD to attach
  7. Click OK to finish
    1. As far as Windows is concerned, the VHD is a newly installed hard disk, so you don’t need to initialize and format it at all

Again, another simple process, with the lengthiest section taken up by the system creating the VHD. Time to see how the process is completed using diskpart.

  1. Open a command prompt as an administrator
    1. Click/press start, type CMD, right click on the (likely) first result and choose Run as administrator
  2. In the command prompt window, type diskpart and press enter
  3. Once at the diskpart command prompt, type create vdisk file=C:VHDWin10_2.vhd maximum=32768 type=fixed and press enter
    1. Be prepared to wait, again
  4. Type select vdisk file=C:VHDWin10_2.vhd and press enter
  5. Type attach vdisk and press enter
  6. Type exit and press return

There you have it folks, the exact same process as what was performed in Computer/Disk Management, only at the command line.

Finally, what about PowerShell? Any of you that work in IT and deal with Active Directory, Exchange, SharePoint, etc will know that Microsoft is investing heavily in moving towards a command line driven environment. That’s evident even on Windows 8, with PowerShell coming built in. However, to get the functionality of being able to manage things like Exchange or Hyper-V, you do need to turn on or install the relevant features on the management machine.


How to install the Hyper-V tools for creating VHDs with PowerShell on Windows 8/8.1

Now that you’ve done this, you can create the VHD using PowerShell.

  1. Open Windows PowerShell as an administrator
    1. Click/press start, type PowerShell, right click on the (likely) first result and choose Run as administrator
  2. Once at the command line, type New-VHD -Path C:VHDWin10_3.vhd -Fixed -SizeBytes 32GB
  3. Type the following command Mount-VHD -Path C:VHDWin10_3.vhd
  4. The disk will need initialised using Initialize-Disk -Number 2
    1. You can use the Get-Disk command to see the list of disks and their numbers
  5. Now that you know the disk number, use the following piped commands to partition, format and assign a letter to the drive: Get-Disk -Number 2 | New-Partition -AssignDriveLetter -UseMaximumSize | Format-Volume -FileSystem NTFS -Confirm:$false –Force

We’ve added a bit more detail to the PowerShell process, just to show you the ability of PowerShell compared with diskpart. However, you only need to create the VHD using the New-VHD command. And with each method, you don’t need to go as far as attaching the VHD as we do that during the Windows install process.

Now that our VHD is ready to install Windows onto, the final step is to install Windows 10. While there are methods for using the bcdedit command, it is now done for you using the Windows install process itself.

  1. Insert your Windows 10 USB media into your laptop/desktop and boot from it
  2. Move through the language/regional options, license confirmation screens and installation type screens
  3. When you get to the Where do you want to install Windows screen, press Shift+F10 to get a command prompt window
  4. Here, type diskpart
  5. As we’ve already created vdisk(s) in the previous processes, we simply have to add them to the list of available disks
    1. select vdisk file=D:VHDWin10.vhd
  6. Type attach vdisk and press enter
  7. Close the command prompt and refresh your list of disks
  8. Choose the now added-to-the-list vdisk, ignoring the message saying Windows can’t be installed on it, and click Next
  9. Sit back and wait for the OS to be installed as normal, and once complete you should see this on boot

We’ve tried to cover enough across all three guides to allow you to install Windows 7, 8/8.1 and 10 on any platform. You can even use the above methods to dual boot Windows Server 2008 R2 upwards on a laptop or desktop machine.

We do agree that most average users will never touch upon any of these processes. But seeing as Windows 10 is at the Technical Preview stage, designed for enthusiasts and IT Professionals, there's no harm in showing you the easy and the not-so-easy ways of installing an instance of Windows.

-->

Applies To: Windows 10, Windows 8.1, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012

This topic describes how to create, attach, and detach virtual hard disks with Disk Management. Virtual hard disks (VHDs) are virtualized hard disk files that, once mounted, appear and operate pretty much identically to a physical hard drive. They're most commonly used with Hyper-V virtual machines.

Viewing VHDs in Disk Management

Windows

VHDs appear just like physical disks in Disk Management. When a VHD has been attached (that is, made available to the system for use), it appears blue. If the disk is detached (that is, made unavailable), its icon reverts to gray.

Creating a VHD

Note

You must be a member of the Backup Operators or Administrators group, at minimum, to complete these steps.

To create a VHD

  1. On the Action menu, select Create VHD.

  2. In the Create and Attach Virtual Hard Disk dialog box, specify both the location on the physical computer where you want the VHD file to be stored, and the size of the VHD.

  3. In Virtual hard disk format, select Dynamically expanding or Fixed size, and then click OK.

Dvd

Attaching and detaching a VHD

To make a VHD available for use (either one you have just created or another existing VHD):

  1. On the Action menu, select Attach VHD.

  2. Specify the location of the VHD, using a fully-qualified path.

Windows 10 Vhs Capture

To detach the VHD, making it unavailable:Right-click the disk, select Detach VHD, and then click OK. Detaching a VHD does not delete the VHD or any data stored in it.

Windows 10 Vhs To Pc

Additional considerations

  • The path specifying the location for the VHD must be fully-qualified and cannot be in the Windows directory.
  • The minimum size for a VHD is 3 megabytes (MB).
  • A VHD can only be a basic disk.
  • Because a VHD is initialized when it is created, creating a large fixed-size VHD might take some time.