Posts: 8244
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Run the Repackager tool in a nested Hyper-V virtual machines environment


Let's suppose you have a working environment with this configuration:

1. a physical machine (i.e. DANIELRADULT)
2. a Hyper-V virtual machine (Win10-L1) hosted on the physical machine
3. a nested Hyper-V virtual machine (Win10-L2) hosted on the Win10-L1 VM

If you are wondering if it is possible to install Advanced Installer Repackager software on the Win10-L1 VM (Hyper-V layer 1) and run the repackaging operations on the nested Win10-L2 VM (Hyper-V layer 2), then the answer is yes. Our Repackager tool fully supports running the repackging operations in a nested VM environment.
s1.jpg (395.74 KiB) Viewed 362319 times

Here are the steps to create and configure such repackaging environment:

1. On the physical machine open Hyper-V Manager and create a VM (i.e. Win10-L1) using a Win10 v21h1 ISO file. Make sure the VM is created as a generation 2 VM.

2. On the physical machine, in an elevated window of PowerShell, while Win10-L1 VM is turned off run the following command to enable the nested virtualization feature in the Win10-L1 VM:

Code: Select all

Set-VMProcessor -VMName Win10-L1 -ExposeVirtualizationExtensions $true
s2.jpg (148.96 KiB) Viewed 362319 times

3. Log in the Win10-L1 VM and install Advanced Installer software using our advinst.msi setup package.

4. Also, while logged in Win10-L1 VM install Hyper-V using the following command (in an elevated PowerShell window) and then restart the VM:

Code: Select all

Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V -All
s3.jpg (137.77 KiB) Viewed 362319 times

5. After installing Hyper-V inside the Win10-L1 VM you are ready to go with the installation of nested Win10-L2 virtual machine. In Win10-L1 virtual machine open Hyper-V Manager and create a new virtual machine (i.e. Win10-L2). The Win10-L2 VM must be created as a generation 2 VM either.

6. Log in the Win10-L2 nested VM and install Advanced Installer Remote Tools using osprovision.exe file; The osprovision.exe file can be found in Advanced Installer installation folder (i.e. "C:\Program Files (x86)\Caphyon\Advanced Installer 19.3\bin" path from Win10-L1 VM); create a checkpoint with the current state of Win10-L2 VM while the Win10-L2 VM is running and you are logged in
s4.jpg (276.76 KiB) Viewed 362319 times
7. Log in the Win10-L1 VM and start the Repackager tool; go to "Edit Virtual Machine profiles" and under "Hyper-V Servers" select localhost

8. right click on "localhost" server and use "New Profile" context menu option; rename the added profile to something meaningful like "Win10-L2 VM Profile"; select the "Win10-L2" VM and one of its checkpoints (this Win10-L2 VM configuration will be used by the Repackager tool when running the repackaging operation)
S5.jpg (150.53 KiB) Viewed 362319 times

9. start the repackaging operation in the "Win10-L2 VM Profile"
S6.jpg (70.67 KiB) Viewed 362319 times
That was all! Now you should have Advanced Installer Repackager tool installed on a Hyper-V layer 1 VM and the repackaging operation being run on a nested Hyper-V layer 2 VM.

All the best,
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Sample Projects”