Creating VHDs for SteadyState Imaging Options and Other Uses

Discussion in 'other software & services' started by Mr.X, Mar 12, 2024.

  1. pb1

    pb1 Registered Member

    I am only trying this because of speed in backup/restore=copy/paste, and lightness, so if i have to reboot to other Os/media that defies the purpose and i might as well use a usual Os with a speedy backup program like IFW
     
  2. Raza0007

    Raza0007 Registered Member

    You just need to copy the .vhdx file. If you are booted into the vhd at the time, you will not be able to do it.

    If the vhd is installed as a secondary OS, then the process is very simple. Just boot into your primary OS and copy the .vhdx file somewhere else.

    If vhd is the only OS, then you need to boot through an external media, like a usb flash drive, and either use Diskpart to copy the .vhdx file, or if you boot through something like Macrium rescue media, then you can use Macrium's built-in file explorer to copy the .vhdx file to another drive.
     
  3. Raza0007

    Raza0007 Registered Member

    This is why I recommended using a vhd as your secondary OS. The process becomes much simpler.

    Also, as I mentioned earlier, I personally do not understand how a vhd can replace an imaging software, unless you only need to do a factory restore each time, an imaging software is much more powerful and easier to use.
     
  4. pb1

    pb1 Registered Member

    Yes, i see that now. But this was interesting learning experience.

    A last question, you are mentioning vhdx file and so some on the net also but i do not understand what file is meant, i mean, i have no file, i have a partition.
     
  5. Raza0007

    Raza0007 Registered Member

    A vhd (virtual hard drive) is created as a file.

    In one of the steps you must have created a vhd inside a partition (lets call this the base partition).

    The "create vdisk file=D:\Win11.vhdx" for example, creates a virtual hard disk in the form of a file, with an extension .vhdx. In this case the file will be "Win11.vhdx" and it will be stored in the base partition on your hard disk.

    You install the OS inside this "Win11.vhdx" file. When you boot into this vhdx based OS, you will no longer see a file, but a Windows partition, with all the Windows folders inside. But when you shut down this vhdx based OS, the only thing left on your system will be your base partition with a "Win11.vhdx" file in it.

    I hope this clarified the issue.
     
  6. pb1

    pb1 Registered Member

    And with base partition you mean the primary Os, non vhdx?
     
  7. Raza0007

    Raza0007 Registered Member

    Yes
     
  8. Brian K

    Brian K Imaging Specialist

    I'm not trying to be a killjoy. This does look an interesting exercise and I'm trying to decide if I should play.

    I already have multiple Windows and Linux OS and WinPEs on my SSDs. These are on individual partitions and can be created and deleted without affecting the other partitions.

    What will I gain with a vhdx?
     
  9. Raza0007

    Raza0007 Registered Member

    Brian, in your case the biggest benefit will be that you no longer need a different partition for each OS. You can have one large partition with multiple OS's in their own .vhdx files.

    I know you use a software to hide each OS partition from the other OS's, but with vhdx you do not need to use a third party software. When the vhdx files are not mounted, their OS's are invisible to the currently running OS, and just appear as .vhdx files.

    Other benefits are listed in my post#9, just ignore the part about booting vhdx files in a VM. They can be booted but only after conversion to formats supported by the VM.

    By the way, I am not a proponent of vhd's, as I do not use them myself. But they are still a useful tool, and can be beneficial for people who wish to install multiple OS's on their system, or who like to test software in a virtual environment but don't want to learn or purchase a VM.
     
  10. Brian K

    Brian K Imaging Specialist

    Thanks Raza,

    I started IFW and chose restore. IFW created a vhdx (dynamic expanding) and I restored a Win10 image to the vhdx.

    I used your instructions to attach the vdisk. It showed as H: drive in my Disk Management. EasyBCD was used in Win11 to create a Win10 boot item. (I didn't know how else to do it).

    Restarted and chose the Win10 choice. Win10 loaded.

    This was very easy for me as I could use IFW to create the Win10 vhdx. No Win10 install was needed. But I know using IFW isn't really part of this exercise.

    By the way, I like multiple partitions. I can never have too many.
     
  11. Brian K

    Brian K Imaging Specialist

    I created a Win8.1 vhdx with IFW and used EasyBCD to add the vhdx to the Boot Menu. Diskpart or Command prompt were not used. So the vhdx was not "attached".

    Total time for the exercise was 2 and a half minutes.

    And Win8.1 did boot.
     
  12. Adric

    Adric Registered Member

    One partition - multiple systems.
     
  13. Brian K

    Brian K Imaging Specialist

    Thanks for the concise answer.
     
  14. Raza0007

    Raza0007 Registered Member

    -I am glad it worked for you Brian. If you can use a third party tool to automate the process, it is even better. I wrote the instructions so that a person does not need anything other then Windows to create and install a vhd. EasyBCD is optional, but I recommend it, as it automates the process of making the vhd bootable.

    -The actual method to make something bootable is to add the entry to the BCD Store using BCDEdit/BCDBoot commands. EasyBCD just automates the process. I prefer EasyBCD to manage the BCD Store and have not played around with BCDEdit commands in years.

    -You only need to attach a vhd or vdisk to the system so you can either install or deploy Windows to it. If you have a third party tool that allows you to restore or deploy Windows to the vhd without having to attach it to the system, then the attaching step is unnecessary.

    -One issue with multiple partitions is that there is unused space at the end of each partition that gets wasted. Having one big partition with multiple vhd's gives you the option of using the leftover space for something else. Plus, vhd's are dynamically expanding, so you are not limited by the size of the initially created partition, and can let your OS partition grow as needed.

    Let me know if you find the vhd process better then having multiple OS's in multiple partitions.
     
  15. Brian K

    Brian K Imaging Specialist

    Raza,

    Sorry, I hate the concept of having a huge partition full of data, especially if it's the OS partition. Imaging/restoring that OS partition would be a nightmare. I prefer my OS partitions to be lean and mean so restores are snappy. Having the vhdx files in a non OS partition would be acceptable but I much prefer the way I'm multi-booting.
     
  16. Raza0007

    Raza0007 Registered Member

    I would never put a vhd in the OS partition. vhd should typically be on a separate SSD if available, or at least a different partition then the OS one. So if some issue prevents you from booting into one OS, you at least have the option to boot into the other to fix the problem.

    I also keep my OS partition very light, only the OS and apps are on it. I even move all my documents, pictures etc to a different drive.

    If you are happy with your multi-boot setup then stick with it. vhd's are not for everyone. I don't have or need multiple OS's on my system, so having a vhd is pointless for me as well.
     
  17. Brian K

    Brian K Imaging Specialist

    Same here.

    It seems I'm a multi partition man.
     
  18. Brian K

    Brian K Imaging Specialist

    Although I prefer having lots of partitions, I agree with Raza that having one or more vhdx files on a non OS partition is an easy way to multi-boot for those who don't share my partition fettish.
     
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice