Follow

TSCM HYPER-V GEN 1 TO GEN 2 CONVERSION/INSTALLATION

TSCM HYPER-V GEN 1 TO GEN 2 CONVERSION

If you would like to upgrade your Gen1 TSCM appliance to a Hyper-V Gen 2 Virtual Machine (VM), please follow the guide cloesly below. The following steps have been performed on a simple Windows 10 Hyper-V installation to validate the build. This guide involves heavy manipulation of the disk with destructive commands so backing up your VM disk images is crucial before proceeding. Please see this guide to backup your VMs before beginning.

The general process involes converting the .vhd disk image we provide with a .vhdx image, booting into Ubuntu installer ISO to add UEFI booting capability required by Gen 2 VMs. Please note you must turn off secure boot. It may be possible to get secure boot to work but this is outside of the scope of this guide.

Step 1 - Convert VHD disk image to Gen2 compatible VHDX

Hyper-V Gen 2 VMs require vhdx disk images. We'll need to convert the .vhd disk image ThreatSTOP provides to a .vhdx disk image.

Open powershell on the server running Hyper-V. You'll be able to use the built-in "Convert-VHD" cmdlet to upgrade the disk image format.

Convert-VHD –Path “Source vhd file” –DestinationPath “Destination vhdx file”
Convert-VHD –Path d:\TSCM\Disk0.vhd –DestinationPath d:\TSCM\Disk0.vhdx
Please replace the example paths above with the location of the .vhd file you downloaded and un-compressed from our website.

Step 2 - Download Ubuntu ISO

Download Ubuntu Server ISO image from https://releases.ubuntu.com/noble/. This will be required to use it to boot your Gen 2 Hyper-V image and reconfigure it for Unified Extensible Firmware Interface (UEFI) booting. You will be able to eject the ISO image after we're done.

Step 3 - Create Hyper-V Gen2 VM

Next we'll create a VM by following the ThreatSTOP Hyper-V instructions making the following changes.

  • In step 5. Set to Generation 2
  • In step 8. make sure you select the newly converted .vhdx file.
  • Before turning on your VM you'll want to add a DVD drive and select the Ubuntu Server ISO images downloaded in the prior step.

 

Step 4 - Boot off ISO and add UEFI booting to TSCM

You can start the VM at this point. It may take some time for it to boot and take you to an Ubuntu "Try or Install" menu screen. Once there select "Try or Install".

 

  • After ISO installer is loaded asking you to start setting it up. Press CTRL+ALT+F2 or CTRP+Option+F2 (Mac). This will take you to a prompt
  • Next run through the following commands. Please note the # indicates the following is a comment and should not be copied.

sudo apt install -y grub-efi-amd64
sudo gdisk /dev/sda
n # (new partition)
[enter] # (enter to take the default partition number)
[enter] # (enter to take the default first sector)
+100M # +100M sets partition size to 100MB
[enter] # accept default GUID hex code
c # to set a label for the new partition
3 # to select the partition ID set earlier
EFI-system # set label to EFI-system
w # write partition
y # accept changes
sudo partprobe /dev/sda # rescan partition map
sudo mkfs -t vfat -v /dev/disk/by-partlabel/EFI-system

sudo mount /dev/sda2 /mnt
sudo mkdir /mnt/boot/efi
sudo mount /dev/sda3 /mnt/boot/efi
sudo grub-install --target=x86_64-efi --boot-directory=/mnt/boot /dev/sda

  1. will see "Installation finished. No error reported" if all goes well.
    Once this is complete you can either just type reboot to reboot the VM or shutdown now to halt it if you would like to take a snapshot before first boot.

 

 installation instructions are as follows:

Hyper-V Fresh Install

To create a TSCM virtual machine:

  1. Download and uncompress the VHD file (compressed with gzip).
  2. Start the Hyper-V Manager.
  3. Select New > Virtual Machine to start with wizard.
  4. Enter a name and location of your choosing.
  5. Specify Generation 2 (required).
  6. Set the memory size. Use 2GB for all devices except A10 vThunder, which requires 10 GB.
  7. Select a network (e.g. Default Switch). The TSCM requires a single network interface with connectivity to the Internet.
  8. On the Connect Virtual Hard Disk screen, select Use an existing virtual hard disk v2 (vhdx) and browse to the uncompressed VHDX image file.
  9. Click Finish.
  10. Edit the settings of the new VM to set the number of Virtual Processors to 2.
  11. Turn off secure boot in the Security subsection.
  12. The Virtual machine is ready to be started.

Please note you must turn off secure boot. It may be possible to get secure boot to work but this is outside of the scope of this guide.

Was this article helpful?
0 out of 0 found this helpful

Comments