This is a script to set up a RetroNAS virtual machine (VM) in just a few minutes.
Normally, it is run as a container on an Unraid server, which will download and set up the VM directly on the server. However, this script can detect whether it is in a container or running just as a script. When running as a script, it should work on any Linux system with kvm/qemu installed, and it will also run in Unraid through the userscripts plugin. The recommended way to run it is on Unraid installed from Community Applications.
When running on Unraid, the variables are set from the Docker template. When running as a script, the variables are set in the script. Here are the steps to set up the VM:
- Download container from CA
- Set the 'VM Share on Server': to where you store your VMs. The default is /mnt/user/domains.
- Set the 'RetroNAS data share': to a new share. This is where you will store all your ROMs and other RetroNAS data.
- Set the 'Name to call VM': to the name you want the VM to have. The default is RetrNAS.
- Click apply to pull down and run the container
- The container will run. There is no webui. You can see the progress from clicking on the container log from the Unraid docker tab. The container will run for a couple of minutes then stop when done. (There is no need for the container to run again or it doesnt need to be running to use the RetroNAS vm)
- Click on the Unraid VM tab. You will see the vm there. Start by clicking Start with console (VNC)
- Goto Running the VM
The script can be run on a Linux system with kvm/qemu installed.
- Download script letsgo.sh (or clone this repository)
- Make script executable
- Edit below variables to suit
- Set the standard_domains_share to the folder where you store your VMs.
- Set the standard_RETRO_SHARE to a new share. This is where you will store all your ROMs and other RetroNAS data.
- Set the standard_vm_name to the name you want the VM to have. The default is RetrNAS.
- run script Once the script is run, it will download a vDisk image of Debian 11 with RetroNAS and all its dependencies. The image will be checked against an MD5 checksum to ensure it is the correct image and has not been tampered with. After the image has been downloaded and uncompressed into the qcow2 image, an XML file is created based on the variables set, and then defines (installs) the VM on your server/PC. The RetroNAS data share folder is automatically configured to be connected to the VM by virtiofs. This means if you run your VM on a separate network or VLAN (easy to do on Unraid), RetroNAS can be isolated from your main network.
- Run vm
- Open a VNC console window to view VM, It will be booting into Debain 11
- After the above screen you will be greeted with a login screen. Use the below credentials (can be changed later)
- Username: retronas
- Password: retronas
Next start retronas by typing 'retronas' then enter. You will be prompted for your password again
- You will see a user agreement. Click enter then type 'AGREE' to accept
- The username is set to pi. Change this to retronas
- The group is set to pi. Change this to retronas. (you can change your password later in the global settings if you want to)
- This installer was made to make the installation process as painless as possible. The real work was done by Dan Mons who is the author of RetroNAS. His project is available here: https://github.com/danmons/retronas. Thank you, Dan, for making RetroNAS!
Please note that the container/script downloads the vDisk image from one of three Google Drive accounts. There are limits on the daily bandwidth that Google allows, so if one account fails, the script will move on to the next. It is possible that all links may fail, in which case, please try again later when the bandwidth limits may have reset. If this issue occurs frequently, I will try and add additional download locations. Also, if a checksum fails, it does not necessarily mean that the image has been tampered with. It could be due to a failed link or corruption during the download. The MD5 check just makes sure the vDisk you get is correct.