Virtual Unraid - ghimele/ghimele GitHub Wiki

Prerequisites

  • This guide is using Unraid version 6.9.2 (the latest stable version at the time of writing August 2021)

  • Working Unraid Server with HVM and IOMMU enabled

    Alt text

    Alt text

  • You can verify that by clicking the info button top right on your server

  • PC with Windows, MacOS or Linux to prepare the USB Stick

  • Spare USB Stick

  • Unraid license for the virtual Unraid server (trial license will work)

  • A good editor like VSCode

⚠️ Warning

Risk of data loss!

Make backups - including your USB Flash drive.

Follow these instructions exactly as directed.

Unraid does not react kindly with two USB drives called Unraid on the same system. It can and will cause serious unprecedented issues.

We have tested this procedure and confirmed it works for us.

However, this is experimental and we are not responsible or liable for any damage that might occur.

Preparations

New USB Stick

  • Prepare the new USB Stick - We will be using the manual method to have maximum control

If you are using a USB Stick with an existing license, backup the *.key file(s) in the config folder. Follow the process below and at the end, put the *.key file back into the config folder.

  • Format the new USB Stick with FAT32 and name it anything other than UNRAID, we will be using UNRAIDVM throughout the guide

  • Download the zip archive for the Unraid version you want to use from https://unraid.net/download. For this guide we used unRAIDServer-6.11.5-x86_64.zip .

  • Copy the entire content of the zip archive (not the archive itself) into the root of your freshly formatted USB stick

  • Rename the folder EFI- in the root of the USB Stick to EFI (remove the hyphen)

  • Now we need to make sure that the virtual Unraid server has a different name than the host Unraid server (can't have two servers named Tower on the same LAN).

    Edit the file config/ident.cfg to change the name in line 2 NAME="servername".
    
  • Edit the syslinux/syslinux.cfg file on the new USB Stick. Add

    unraidlabel=UNRAIDVM
    
  • to the append line of each label block. Your file should look like this:

    default menu.c32
    menu title Lime Technology, Inc.
    prompt 0
    timeout 50
    label Unraid OS
      menu default
      kernel /bzimage
      append unraidlabel=UNRAIDVM initrd=/bzroot
    label Unraid OS GUI Mode
      kernel /bzimage
      append unraidlabel=UNRAIDVM initrd=/bzroot,/bzroot-gui
    label Unraid OS Safe Mode (no plugins, no GUI)
      kernel /bzimage
      append unraidlabel=UNRAIDVM initrd=/bzroot unraidsafemode
    label Unraid OS GUI Safe Mode (no plugins)
      kernel /bzimage
      append unraidlabel=UNRAIDVM initrd=/bzroot,/bzroot-gui unraidsafemode
    label Memtest86+
      kernel /memtest
    

    at the end of the append line, after initrd=/bzroot, separated by a space. The block should look like this:

    label Unraid OS
      menu default
      kernel /bzimage
      append unraidlabel=UNRAIDVM initrd=/bzroot kvm_intel.nested=1
    
  • Create a new file called

    startup.nsh
    

    in the root of the new USB Stick. Put a single line into the file that reads

    \EFI\boot\bootx64.efi
    
  • Edit the make_bootable.bat (or the appropriate version for your OS) in the root of the USB stick and change the line (32) set tag=UNRAID to

    set tag=UNRAIDVM
    
  • Execute the make_bootable.bat (if you are not using Windows, choose the Mac or Linux version for your OS) as administrator and follow the instructions on your screen

  • Close all editor windows and use the Eject function on the USB Stick drive. Remove the USB Stick from your PC.

  • Insert the new USB Stick into the Unraid server and reboot the Unraid server. We want to make sure it boots from the correct USB Stick and not the new one.

ℹ️ NOTE

Once you rebooted your Unraid server, check that your Unraid server looks and behaves normally.

Does the license and name in the top right corner show correctly?

Preparing the Unraid server (host)

USB Plugin

Install the plugin USB Manager from CA Apps

Alt text

No additional steps or setup are needed for now.

Setting up a VM for Unraid

  • Ensure the VM service is enabled. If not, go to Settings / VM and enable it.
  • Go to the VMs tab and click ADD VM
  • Choose the Linux template for Slackware
  • (optional) Click on the Slackware icon. A window with a lot of icons will open. Choose the Unraid - icon. (If you don't see a long list of icons, do the optional step Custom Icons above)
  • Change the name of the VM to something like UNRAIDVM
  • Set the logical CPUs to a minimum of 2 or more
  • Set the initial memory to at least 3GB or more, match the number for max memory
  • Choose the highest Q35 Machine (at time of writing Q35-5.1)
  • Leave the Bios at OVMF
  • Leave the USB Controller Setting at 2.0 (EHCI).
  • Adjust the vDisk settings:
  • Primary Location: Leave on Auto or change it, if you know what you are doing
  • Size: Choose the size you want in either xxG for GigaByte or xxT for TeraByte
  • Type:
  • raw for if you have the space and want to get the highest speed
  • qcow2 will only be as big as the data stored on it. It can grow to the maximum you specified. - Preferred for testing VMs
  • Bus: Select SATA
  • Leave everything as is in the Graphics Card section, adjust your keyboard layout as needed
  • Sound Card: None
  • Network section: Leave everything at default

⚠️ WARNING DO NOT select the USB Stick under USB Devices!

  • Uncheck the Start VM after creation Checkbox
  • Click CREATE to save your new VM
  • Go into the USB Menu Alt text
    • Locate the USB Stick you prepared earlier. The USB Stick with in front of it is your Unraid server (host) USB Stick and is blocked.
    • Click the Edit Port Settings icon Alt text in front of the USB Stick that you created for your virtual Unraid server.
    • Toggle the AUTO CONNECT TO VM AT VM START switch to on and in the Virtual Machine field choose your virtual Unraid server VM. Click Done.
    • This will connect the USB Stick to the VM at startup so that your server can boot from it. This method also works with USB Sticks from the same make/manufacturer as the USB Stick for your host - Unraid server.

Start the Unraid VM

Go back to the VMS page and start the Unraid VM like any other VM. Open VNC Remote to watch the boot process.

With the USB Manager attaching the USB Stick to the vm and the changes to enable EFI boot, your server should boot straight into Unraid.

After your virtual Unraid server completed the boot process and presents you with the login prompt, you can use the IP address on the screen to access it.

Everything will behave just like any other Unraid server.

At this point it is a good idea to go into SETTINGS, SMB, scroll down to the Workgroup Settings and set Local Master to No.

Have fun!

Troubleshooting

Check the page IbraCorp trouble shoot page

⚠️ **GitHub.com Fallback** ⚠️