Recently, I had some free time, so I tinkered with a spare computer at home and turned it into a software router. I achieved the functions of iStoreOS as a bypass router and a Synology NAS. The same method can be used to install iKuai main router, Windows, and Ubuntu remote virtual machines. However, because I use FTTR at home, I don't need iKuai main router, and I don't have the need for remote desktop access, so I used all the hard disk space for the Synology NAS storage. I present this tutorial for everyone's reference.
Before we start, we need to prepare the system files. It is recommended to download the official versions of all software. The download links are as follows:
- Ventoy USB boot tool Ventoy
- WePE lightweight operating system for disk operations WePE Toolbox
- ESXi virtual machine Download VMware vSphere 8 Evaluation - Free
- Image conversion tool for VMware disk files V2V Converter (direct download link V2V Converter). Currently (2024-3-8), this version of V2V Converter always reports errors on my computer and cannot convert properly, so you need to download an older version. Here is a shared link on a cloud drive: https://pan.quark.cn/s/4aadd0c8b97a Extraction code: dZe2
- iStoreOS OpenWrt software router system iStoreOS
- Synology SA6400 firmware, there is no official version for this, the source is from GXNAS's blog Synology DSM7.X Boot File (Updated on January 17, 2024) - GXNAS Blog. Since you need to go to GXNAS's cloud drive to find it, I will directly provide my shared link: Link: https://pan.quark.cn/s/cb19f4ab82f1 Extraction code: 9vqx
Once the materials are ready, we can start the construction.
First, create a Ventoy boot disk. The operation is simple and straightforward. After creating the boot disk with Ventoy, you can directly boot ISO files with boot functionality, so just put the WePE and ESXi installation packages into the Ventoy bootable USB drive.
The second step is to delete all partitions on all hard disks in WePE. ESXi will automatically partition during installation, so there is no need to go into details about this simple operation.
The third step is to install ESXi on the hard disk. This part refers to the video (ESXI8.0 Installation of iKuai+OpenWrt Dual Software Router and Synology NAS). Select the ESXi installation ISO in the Ventoy interface. When the screen displays "Loading /EFI/BOOT/boot.cfg", quickly press Shift+o to perform partitioning. In the command that appears, enter autoPartitionOSDataSize=10240, which means allocating 10GB of partition for ESXi. The tutorial suggests allocating 8GB, but I allocated 10GB. Then follow the prompts to install ESXi on the hard disk. After the installation is complete, you need to remove the USB drive, otherwise the system will not boot from the hard disk. There will be a prompt on the screen, just follow the instructions. During the installation, you need to set a password, so don't forget the password you set, as you will need it frequently later. After the installation is complete, set the LAN address of ESXi to be in the same network segment as FTTR for easy access. The first thing to do after accessing the ESXi backend is to find the mysterious code to activate ESXi for our subsequent use.
The fourth step is to install iStoreOS on the ESXi virtual machine.
In this step, we need to convert the downloaded iStoreOS image file into a dedicated ESXi hard disk file using V2V Converter. The operation process is similar to the conversion of the iStoreOS image file, as mentioned in the previous step. Please refer to the video ESXI Installation of All-Purpose Software Router System [OpenWrt/iStore OS] Main Router/Side Router. Select the downloaded iStoreOS image file for conversion, and pay attention to not saving the image file in a path with Chinese characters. After the conversion is complete, you will get two .vmdk files, which can be uploaded to our virtual machine for using iStoreOS.
After converting the .vmdk files, we create a virtual machine. Use a browser on another computer to access our ESXi host, click "Create/Register a Virtual Machine" -> "Create a New Virtual Machine" -> give the virtual machine a name -> leave the compatibility unchanged, select Linux for the operating system, and select "Other 6.x or later version of Linux (64-bit)" for the system version -> select the storage location -> customize the system performance. I allocated 4 cores and 2GB of memory for the CPU and memory, respectively. Note that the memory should be set as exclusive (check "Reserve all guest memory (All locked)"). You can decide on these settings yourself. Then delete the unnecessary hard disk and other hardware (refer to my final settings picture). In the "Virtual Machine Options" page, uncheck the "Enable UEFI Secure Boot" option in the "Boot Options" tab. After completing the creation of the virtual machine, right-click on the virtual machine name to edit the virtual machine, click "Add Hard Disk", and add an "Existing Hard Disk". Select the folder corresponding to the virtual machine name as the location, and after uploading the two .vmdk files that were converted earlier to the folder, select the corresponding .vmdk file and save it for booting.
After booting, iStoreOS will start. Press Enter to enter the command line and enter "quickstart" to display the menu. Select "0.Show InterFaces" to view the current LAN address. Enter the LAN address in the browser to log in to iStoreOS with the default password "password". In iStoreOS, you can follow the wizard to set up the side router. And here's a magic entrance for you, you know Releases · vernesong/OpenClash (github.com). The installation method is described in OpenClash Wiki, and you will need the software WinSCP.
The fifth step is to install the Synology SA6400 firmware on the ESXi virtual machine.
First, convert the Synology boot file, the method is the same as converting the iStoreOS image file, as mentioned in the previous step. Then follow the steps in the tutorial ESXI All in one | ESXI8.0 Installation of iKuai+OpenWrt Dual Software Router and Synology NAS for the subsequent operations.
First, create a new virtual machine. Click "Create/Register a Virtual Machine" -> "Create a New Virtual Machine" -> give the virtual machine a name -> leave the compatibility unchanged, select Linux for the operating system, and select "Other 6.x or later version of Linux (64-bit)" for the system version -> select the storage location -> customize the system performance according to your needs. I allocated 16 cores, 10GB of memory (exclusive), and 861.83GB of hard disk space. We will adjust the hard disk space later, which will be explained later. Select SATA mode for the hard disk. In the "Virtual Machine Options" page, uncheck the "Enable UEFI Secure Boot" option in the "Boot Options" tab. Finally, complete the creation of the virtual machine. Right-click on the virtual machine name to edit the virtual machine, click "Add Hard Disk", and add an "Existing Hard Disk". Select the folder corresponding to the virtual machine name as the location, and after uploading the two .vmdk files that were converted earlier to the folder, select the corresponding .vmdk file and save it for booting.
After booting, download Synology Assistant to find the IP address of our Synology NAS host. Once found, log in to the NAS using a browser. The first time you log in, you need to install the system and install the downloaded .pat file to the virtual machine according to the prompts. After the installation is complete, set up your Synology NAS according to the prompts.
After that, mount the USB hard drive. Since ESXi cannot automatically mount USB hard drives, we need to do it manually. First, open SSH login permission in the ESXi management page, and then use PuTTY to log in to ESXi. Then refer to the tutorial ESXI7.0 Recognize External USB Hard Drive - ANLAN (jjlvu.com). I mounted two USB 3.0 external hard drives. You can modify the parameters according to your own situation.
The sixth step is to set up power-on boot.
First, enter the BIOS to set up power-on boot, and then set up the virtual machine's power-on boot in ESXi. Refer to the tutorial ESXI8.0 Installation (iKuai+iStore+NAS+Windows) Lazy Installation Tutorial. Click on "Host" -> "Manage" -> "Auto Start", click "Edit Settings" and enable it. Then set the boot order, first boot iStoreOS side router, then boot the NAS.
The seventh step is to set up external access for the Synology NAS.
First, obtain a public IPv4 address from your ISP. If you can't get one, then enable IPv6. In the Synology NAS, go to Control Panel -> Network -> Network Interface, select "LAN 1", click "Edit", and change the IPv6 setting to automatic to obtain an IPv6 address. Then, refer to the tutorial Solve the Problem of Synology NAS External Access! IPV6+DDNS, Achieve Remote Access to Internal Devices + Enable HTTPS Access! to set up domain name access. You will need to purchase a personal domain name for this.
After completing the above settings, your All-in-One mini host is complete.