I have two diaries, one of what I eat the other is this one :e.

Automated VM with Synology DSM – Proxmox

I was looking into install Synology DSM on Proxmox and find out there are several Loaders to make it possible to boot DSM on non Synology hardware. Looking further I found a blog with a script to instal “Arpl loader” and DSM on Proxmox, the problem is that “Arpl loader” now is old and not maintained, also you cannot use the last version of Synology DSM with this old boot loader, so I modified the script for an Automated Install on Proxmox of Synology DSM creating a VM ready to boot.

Script bellow.

# Script name: install_arc_dsm.sh
# Author: Helio Rodrigues   -   King Tam
# Website: https://portugaline.com    -    https://kingtam.eu.org/posts/pve-dsm/
# Date: 4 November, 2023
# Purpose: Automatic creation of Proxmox VM using Arc Loader for DSM 7+.

set -e

# Ask for VMID
read -p "Enter Virtual Machine ID for Synology DSM install: " VMID

# Check if VMID already exists
if qm status $VMID &> /dev/null
    read -p "VM $VMID already exists. Do you want to remove it? (y/n) " choice
    case "$choice" in
        y|Y )
            qm stop $VMID
            qm destroy $VMID
            echo "VM $VMID has been removed."
        * )
            echo "Please enter a different VMID."
            exit 1

# Check if unzip is installed, install if not
if ! command -v unzip &> /dev/null; then
    echo "unzip could not be found, installing..."
    apt install unzip -y

# Get latest release version from GitHub API
version=$(curl -s https://api.github.com/repos/AuxXxilium/arc/releases/latest | grep -oP '"tag_name": "K(.*)(?=")')
# Construct download URL using latest release version
# Download and extract Arc image
wget $url
unzip "arc-$version.img.zip" -d $image_folder
rm "arc-$version.img.zip"

# Create virtual machine
qm create "$VMID" --name DSM --memory 4096 --sockets 1 --cores 2 --cpu host --net0 virtio,bridge=vmbr0 --ostype l26

# Import Arc image as boot disk
qm importdisk "$VMID" "$image" local-lvm
qm set "$VMID" -sata0 local-lvm:vm-$VMID-disk-0
qm set "$VMID" --boot c --bootdisk sata0

# Add a new SATA disk to the virtual machine
qm set "$VMID" --sata1 volume02:32

# Start the virtual machine
qm start "$VMID"

If you wish to understand in more detail this script, please visit https://kingtam.eu.org/posts/pve-dsm/


ARC Loader: https://github.com/AuxXxilium/arc

Arpl loader: https://github.com/fbelavenuto/arpl

Original Script: https://kingtam.eu.org/posts/pve-dsm/ (RECOMMENDED BLOG)

New Script (ACS Loader) GITHUB: https://github.com/portugaline/Arc_DSM_PROXMOX

Leave a Reply

Your email address will not be published. Required fields are marked *