├── LICENSE ├── zimaos_zimacube_installer.sh ├── zimaos_zimacube.sh └── README.md /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2024 R0GGER 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /zimaos_zimacube_installer.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # github.com/R0GGER/proxmox-zimaos 4 | # bash -c "$(wget -qLO - https://raw.githubusercontent.com/R0GGER/proxmox-zimaos/refs/heads/main/zimaos_zimacube_installer.sh)" 5 | 6 | # ZimaOS version 7 | VERSION="1.5.0" 8 | 9 | # Variables 10 | URL="https://github.com/IceWhaleTech/ZimaOS/releases/download/$VERSION/zimaos-x86_64-${VERSION}_installer.img" 11 | IMAGE=$(basename "$URL") 12 | IMAGE_PATH="/var/lib/vz/images/$IMAGE" 13 | DISK_NUMBER="2" 14 | DISK="scsi1" 15 | 16 | # Colors 17 | GREEN='\033[0;32m' 18 | YELLOW='\033[0;33m' 19 | RED='\033[0;31m' 20 | NC='\033[0m' # No Color 21 | 22 | # Functions 23 | validate_number() { 24 | if ! [[ $1 =~ ^[0-9]+$ ]]; then 25 | echo -e "${RED}Error: Please enter a valid number${NC}" 26 | exit 1 27 | fi 28 | } 29 | 30 | check_vmid() { 31 | if ! qm status $1 >/dev/null 2>&1; then 32 | echo -e "${RED}Error: VMID $1 does not exist${NC}" 33 | exit 1 34 | fi 35 | } 36 | 37 | check_volume() { 38 | if ! pvesm status | grep -q "^$1"; then 39 | echo -e "${RED}Error: Storage volume $1 does not exist${NC}" 40 | exit 1 41 | fi 42 | } 43 | 44 | clear 45 | echo -e "${YELLOW}=== Proxmox ZimaOS Installer ===${NC}" 46 | echo -e "${GREEN}Version: $VERSION${NC}\n" 47 | 48 | echo -e "!! Before running this script, make sure you have:${NC}\n" 49 | echo -e "Created a new VM with:${NC}" 50 | echo -e " - OS -> Do not use any media" 51 | echo -e " - System -> BIOS -> OMVF (UEFI)" 52 | echo -e " - EFI Storage configured (e.g. local-lvm)" 53 | echo -e " - Disks, CPU, Memory, Network configured\n" 54 | echo -e "!! Do NOT start the VM after creation !!${NC}" 55 | 56 | # VMID 57 | while true; do 58 | read -p "Enter VM ID (100-999): " VMID 59 | validate_number $VMID 60 | if [[ $VMID -ge 100 && $VMID -le 999 ]]; then 61 | check_vmid $VMID 62 | break 63 | else 64 | echo -e "${RED}Error: VMID must be between 100 and 999${NC}" 65 | fi 66 | done 67 | 68 | # Storage volume 69 | while true; do 70 | read -p "Enter storage volume [local-lvm]: " VOLUME 71 | VOLUME=${VOLUME:-local-lvm} 72 | if check_volume $VOLUME; then 73 | break 74 | fi 75 | done 76 | 77 | mkdir -p /var/lib/vz/images 78 | 79 | # Remove any old zimaos image files 80 | echo "Cleaning up any existing image files..." 81 | rm -f "/var/lib/vz/images/"zimaos_zimacube*.img "/var/lib/vz/images/"zimaos_zimacube*.img.xz 82 | 83 | # Download 84 | echo -e "\n${YELLOW}Downloading the image...${NC}" 85 | wget -q --show-progress -O "$IMAGE_PATH" "$URL" 86 | if [ $? -ne 0 ]; then 87 | echo -e "${RED}Error: Failed to download the image.${NC}" 88 | exit 1 89 | fi 90 | 91 | # Import the disk 92 | echo -e "\n${YELLOW}Importing the disk...${NC}" 93 | qm importdisk $VMID "$IMAGE_PATH" $VOLUME --format raw 94 | if [ $? -ne 0 ]; then 95 | echo -e "${RED}Error: Failed to import the disk.${NC}" 96 | rm -f "$IMAGE_PATH" 97 | exit 1 98 | fi 99 | 100 | # Attach the disk to the VM 101 | echo -e "\n${YELLOW}Attaching the disk...${NC}" 102 | STORAGE_TYPE=$(pvesm status -storage "$VOLUME" | awk 'NR==2 {print $2}') 103 | case "$STORAGE_TYPE" in 104 | dir|btrfs|nfs|cifs|glusterfs) 105 | qm set $VMID --$DISK $VOLUME:$VMID/vm-$VMID-disk-$DISK_NUMBER.raw --boot c --scsihw virtio-scsi-pci --boot order=$DISK 106 | ;; 107 | *) 108 | qm set $VMID --$DISK $VOLUME:vm-$VMID-disk-$DISK_NUMBER --boot c --scsihw virtio-scsi-pci --boot order=$DISK 109 | ;; 110 | esac 111 | if [ $? -ne 0 ]; then 112 | echo -e "${RED}Error: Failed to set the disk.${NC}" 113 | exit 1 114 | fi 115 | 116 | # Cleanup downloaded image 117 | rm -f "$IMAGE_PATH" 118 | 119 | # Get started 120 | echo -e "\n${GREEN}Success! ZimaOS installer image has been added to VM $VMID${NC}\n" 121 | echo -e "${YELLOW}READ THIS CLOSELY BEFORE STARTING THE VM:${NC}" 122 | echo -e "To ensure successful booting, you have to disable Secure Boot within the VM." 123 | echo -e "1. Go to ${YELLOW}Console${NC} and start the VM." 124 | echo -e "2. Click ${YELLOW}Start Now${NC} and press ${YELLOW}ESC ESC ESC${NC} (multiple times) to load the virtual BIOS" 125 | echo -e "3. Go to ${YELLOW}Secure Boot Configuration${NC} option in ${YELLOW}Device Manager${NC} and disable ${YELLOW}Secure Boot${NC}\n" 126 | echo -e "Quick steps:" 127 | echo -e "Device Manager > Secure Boot Configuration > Attempt Secure Boot > Enter > Esc > Esc > Continue > Enter\n" 128 | -------------------------------------------------------------------------------- /zimaos_zimacube.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # github.com/R0GGER/proxmox-zimaos 4 | # bash -c "$(wget -qLO - https://raw.githubusercontent.com/R0GGER/proxmox-zimaos/refs/heads/main/zimaos_zimacube.sh)" 5 | 6 | # ZimaOS version 7 | VERSION="1.4.1" 8 | 9 | # Variables 10 | URL="https://github.com/IceWhaleTech/ZimaOS/releases/download/$VERSION" 11 | IMAGE="zimaos_zimacube-$VERSION.img.xz" 12 | EXTRACTED_IMAGE="zimaos_zimacube-$VERSION.img" 13 | IMAGE_PATH="/var/lib/vz/images/$IMAGE" 14 | EXTRACTED_PATH="/var/lib/vz/images/$EXTRACTED_IMAGE" 15 | 16 | # Colors 17 | GREEN='\033[0;32m' 18 | YELLOW='\033[0;33m' 19 | NC='\033[0m' # No Color 20 | 21 | validate_number() { 22 | if ! [[ $1 =~ ^[0-9]+$ ]]; then 23 | echo "Error: Please enter a valid number" 24 | exit 1 25 | fi 26 | } 27 | 28 | check_vmid() { 29 | if qm status $1 >/dev/null 2>&1; then 30 | echo "Error: VMID $1 already exists" 31 | exit 1 32 | fi 33 | } 34 | 35 | clear 36 | 37 | echo -e "${YELLOW}=== Proxmox ZimaOS VM Creator ===${NC}" 38 | echo 39 | 40 | # VMID 41 | read -p "Enter VMID (100-999): " VMID 42 | validate_number $VMID 43 | check_vmid $VMID 44 | 45 | # VM name 46 | read -p "Enter VM name: " VM_NAME 47 | 48 | # Volume 49 | read -p "Enter volume [local-lvm]: " VOLUME 50 | VOLUME=${VOLUME:-local-lvm} 51 | 52 | # Memory (default 2048) 53 | read -p "Enter memory size in MB [2048]: " MEMORY 54 | MEMORY=${MEMORY:-2048} 55 | validate_number $MEMORY 56 | 57 | # Cores 58 | read -p "Enter number of CPU cores [2]: " CORES 59 | CORES=${CORES:-2} 60 | validate_number $CORES 61 | 62 | echo -e "\n${GREEN}Creating VM with the following parameters:${NC}" 63 | echo "VMID: $VMID" 64 | echo "Name: $VM_NAME" 65 | echo "Volume: $VOLUME" 66 | echo "Memory: $MEMORY MB" 67 | echo "Cores: $CORES" 68 | echo "Image: $IMAGE" 69 | 70 | read -p "Continue? (y/n): " CONFIRM 71 | if [[ $CONFIRM != [yY] ]]; then 72 | echo "Operation cancelled" 73 | exit 0 74 | fi 75 | 76 | echo -e "\n${GREEN}Starting VM creation process...${NC}" 77 | 78 | # Remove any old zimaos image files 79 | echo "Cleaning up any existing image files..." 80 | rm -f "/var/lib/vz/images/"zimaos_zimacube*.img "/var/lib/vz/images/"zimaos_zimacube*.img.xz 81 | 82 | # Download the image 83 | echo "Downloading the image..." 84 | wget -q --show-progress -O "$IMAGE_PATH" "$URL/$IMAGE" 85 | if [ $? -ne 0 ]; then 86 | echo "Error: Failed to download the image." 87 | exit 1 88 | fi 89 | 90 | # Extract the image 91 | echo "Extracting the image..." 92 | xz -df "$IMAGE_PATH" 93 | if [ $? -ne 0 ]; then 94 | echo "Error: Failed to extract the image." 95 | rm -f "$IMAGE_PATH" # Cleanup if extraction fails 96 | exit 1 97 | fi 98 | 99 | # Verify extracted image exists 100 | if [ ! -f "$EXTRACTED_PATH" ]; then 101 | echo "Error: Extracted image file not found at $EXTRACTED_PATH" 102 | exit 1 103 | fi 104 | 105 | # Create VM 106 | echo "Creating VM..." 107 | qm create $VMID --name $VM_NAME --memory $MEMORY --cores $CORES -localtime 1 -bios ovmf -ostype l26 --net0 virtio,bridge=vmbr0 108 | 109 | # Create EFI disk 110 | echo "Creating EFI disk..." 111 | STORAGE_TYPE=$(pvesm status -storage "$VOLUME" | awk 'NR==2 {print $2}') 112 | case "$STORAGE_TYPE" in 113 | dir|btrfs|nfs|cifs|glusterfs) 114 | # File-based storage 115 | echo "Detected file-based storage ($STORAGE_TYPE)" 116 | pvesm alloc $VOLUME $VMID vm-$VMID-disk-0.raw 4M 117 | qm set $VMID -efidisk0 $VOLUME:$VMID/vm-$VMID-disk-0.raw,efitype=4m 118 | ;; 119 | *) 120 | # Block-based storage (lvm, lvmthin, zfspool, rbd, etc.) 121 | echo "Assuming block-based storage ($STORAGE_TYPE)" 122 | pvesm alloc $VOLUME $VMID vm-$VMID-disk-0 4M 123 | qm set $VMID -efidisk0 $VOLUME:vm-$VMID-disk-0,efitype=4m 124 | ;; 125 | esac 126 | if [ $? -ne 0 ]; then 127 | echo "Error: Failed to create EFI disk." 128 | exit 1 129 | fi 130 | 131 | # Import the disk 132 | echo "Importing the disk..." 133 | qm importdisk $VMID "$EXTRACTED_PATH" $VOLUME --format raw 134 | if [ $? -ne 0 ]; then 135 | echo "Error: Failed to import the disk." 136 | exit 1 137 | fi 138 | 139 | # Attach the disk 140 | echo "Attaching the disk..." 141 | case "$STORAGE_TYPE" in 142 | dir|btrfs|nfs|cifs|glusterfs) 143 | qm set $VMID --sata0 $VOLUME:$VMID/vm-$VMID-disk-1.raw --boot c --scsihw virtio-scsi-pci --boot order=sata0 144 | ;; 145 | *) 146 | qm set $VMID --sata0 $VOLUME:vm-$VMID-disk-1 --boot c --scsihw virtio-scsi-pci --boot order=sata0 147 | ;; 148 | esac 149 | if [ $? -ne 0 ]; then 150 | echo "Error: Failed to attach the disk." 151 | exit 1 152 | fi 153 | 154 | # Resize disk 155 | echo "Resize ZimaOS disk" 156 | qm resize $VMID sata0 +8G 157 | if [ $? -ne 0 ]; then 158 | echo "Error: Failed to resize the disk." 159 | exit 1 160 | fi 161 | 162 | # Start VM 163 | echo "Starting VM..." 164 | qm start $VMID 165 | 166 | echo -e "\n${GREEN}ZimaOS VM creation completed successfully!${NC}" 167 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # ZimaOS Installation Guide for Proxmox 2 | 3 | This guide provides step-by-step instructions for installing [ZimaOS](https://github.com/IceWhaleTech/zimaos) on Proxmox Virtual Environment. ZimaOS is a modern NAS operating system that can be easily deployed as a virtual machine. 4 | 5 | ## 📋 Table of Contents 6 | 7 | - [Installation Methods](#installation-methods) 8 | - [Quick Start (Automatic Installation)](#quick-start-automatic-installation) 9 | - [Manual Installation](#manual-installation) 10 | - [Post-Installation Configuration](#post-installation-configuration) 11 | - [Common Tasks](#common-tasks) 12 | - [Troubleshooting](#troubleshooting) 13 | 14 | ## 🚀 Installation Methods 15 | 16 | Choose the installation method that best suits your needs: 17 | 18 | | Method | Time Required | Difficulty | Description | 19 | |--------|---------------|------------|-------------| 20 | | **Automatic** | ~2 minutes | Easy | Fully automated installation with minimal user input | 21 | | **Manual** | ~5 minutes | Medium | Step-by-step installation with more control | 22 | 23 | ## ⚡ Quick Start (Automatic Installation) 24 | 25 | The fastest way to get ZimaOS running on your Proxmox server. This method handles everything automatically. 26 | 27 | ### Prerequisites 28 | - Proxmox VE running on your server 29 | - SSH access to your Proxmox node 30 | - Basic understanding of VM management 31 | 32 | ### Installation Steps 33 | 34 | 1. **Connect to your Proxmox node** via SSH 35 | 2. **Run the installation script**: 36 | ```bash 37 | bash -c "$(wget -qLO - https://raw.githubusercontent.com/R0GGER/proxmox-zimaos/refs/heads/main/zimaos_zimacube.sh)" 38 | ``` 39 | 3. **Follow the prompts** to configure your VM settings 40 | 4. **Wait for completion** - the script will handle everything automatically 41 | 42 | ### What the Script Does 43 | - Creates a new VM with optimal settings for ZimaOS 44 | - Downloads the latest ZimaOS image 45 | - Configures storage and network settings 46 | - Sets up the VM for immediate use 47 | 48 | > **Note**: The automatic installation creates a VM with default settings. For custom configurations, use the manual installation method. 49 | 50 | > **Important**: Unfortunately, it's not possible to update the auto-install script to the latest version of ZimaOS, because IceWhaleTech/ZimaOS no longer releases ZimaOS images, but only installers. Update ZimaOS after you have logged into ZimaOS. 51 | 52 | ## 🔧 Manual Installation 53 | 54 | For users who prefer more control over the installation process or need custom configurations. 55 | 56 | ### Prerequisites 57 | - Proxmox VE running on your server 58 | - SSH access to your Proxmox node 59 | - Basic understanding of VM creation in Proxmox 60 | 61 | ### Step 1: Create VM in Proxmox 62 | 63 | 1. **Open Proxmox Web Interface** and navigate to your node 64 | 2. **Create a new VM** with the following settings: 65 | - **OS**: Do not use any media 66 | - **System**: 67 | - BIOS: OMVF (UEFI) 68 | - Choose an EFI storage (e.g., `local-lvm`) 69 | - **Disks, CPU, Memory, Network**: Use default settings or customize as needed 70 | - **Confirm**: Finish (do not check "Start after created") 71 | 72 | ### Step 2: Run Installation Script 73 | 74 | Execute the installer script on your Proxmox node (not inside the VM): 75 | 76 | ```bash 77 | bash -c "$(wget -qLO - https://raw.githubusercontent.com/R0GGER/proxmox-zimaos/refs/heads/main/zimaos_zimacube_installer.sh)" 78 | ``` 79 | 80 | **Answer the prompts:** 81 | - Enter VM ID: `[Your VM ID]` 82 | - Enter storage volume: `[e.g., local-lvm]` 83 | 84 | ### Step 3: Configure VM BIOS 85 | 86 | 1. **Navigate to the VM** in Proxmox 87 | 2. **Go to Console** tab 88 | 3. **Start the VM** and immediately press **ESC** multiple times to access the virtual BIOS 89 | 4. **Navigate to Device Manager** → **Secure Boot Configuration** 90 | 5. **Disable Secure Boot**: 91 | - Select "Attempt Secure Boot" 92 | - Press **Enter** → **Esc** → **Esc** → **Continue** → **Enter** 93 | 94 | ### Step 4: Install ZimaOS 95 | 96 | 1. **Select "1. Install ZimaOS"** from the boot menu 97 | 2. **Complete the installation wizard** following the on-screen prompts 98 | 3. **After installation completes**: 99 | - Stop the VM using **Stop** button in Proxmox (not Shutdown) 100 | - Disable **scsi1** and enable **scsi0** in VM hardware settings 101 | - Start the VM again 102 | 103 | ### 📹 Video Tutorial 104 | 105 | Watch the complete installation process: [ZimaOS Proxmox Installation Video](https://www.youtube.com/watch?v=3n739Dia8eMz) 106 | 107 | > **Note**: The video is fast-forwarded in some sections for brevity. 108 | 109 | ## ⚙️ Post-Installation Configuration 110 | 111 | After successful installation, you may need to perform additional configuration steps: 112 | 113 | ### Initial Setup 114 | 1. **Access ZimaOS Web Interface** using the VM's IP address 115 | 2. **Complete the initial setup wizard** 116 | 3. **Configure storage pools** and network settings 117 | 4. **Set up user accounts** and permissions 118 | 119 | ### Network Configuration 120 | - Ensure your VM has proper network access 121 | - Configure static IP if needed 122 | - Set up port forwarding for external access 123 | 124 | ## 🔧 Common Tasks 125 | 126 | ### Changing ZimaOS Version 127 | 128 | To install a specific version of ZimaOS instead of the default: 129 | 130 | 1. **Download the installation scripts**: 131 | ```bash 132 | wget https://raw.githubusercontent.com/R0GGER/proxmox-zimaos/refs/heads/main/zimaos_zimacube_installer.sh 133 | wget https://raw.githubusercontent.com/R0GGER/proxmox-zimaos/refs/heads/main/zimaos_zimacube.sh 134 | ``` 135 | 136 | 2. **Edit the script** to change the version: 137 | ```bash 138 | nano zimaos_zimacube.sh 139 | # or 140 | nano zimaos_zimacube_installer.sh 141 | ``` 142 | 143 | 3. **Modify the VERSION variable**: 144 | ```bash 145 | # Change from: 146 | VERSION="1.3.0-2" 147 | # To your desired version: 148 | VERSION="1.3.1-beta1" 149 | ``` 150 | > Check [ZimaOS releases](https://github.com/IceWhaleTech/ZimaOS/releases) for available versions 151 | 152 | 4. **Save and make executable**: 153 | ```bash 154 | # Save: Ctrl + X → Y → Enter 155 | chmod +x zimaos_zimacube* 156 | ``` 157 | 158 | 5. **Run the modified script**: 159 | ```bash 160 | ./zimaos_zimacube.sh 161 | # or 162 | ./zimaos_zimacube_installer.sh 163 | ``` 164 | 165 | ### Adding Additional Storage 166 | 167 | To add more drives to your ZimaOS VM: 168 | 169 | 1. **Stop the ZimaOS VM** in Proxmox 170 | 2. **Add new hard disk**: 171 | - Go to **Hardware** → **Add** → **Hard Disk** 172 | - Set **Bus/Device** to **SATA** 173 | - Configure size and storage location 174 | 3. **Start the VM** and configure the new drive in ZimaOS 175 | 176 | ![Add Drive Example](https://github.com/user-attachments/assets/a3c2463f-6cc1-4671-9ddb-a717a06284e8) 177 | 178 | ## 🚨 Troubleshooting 179 | 180 | ### Common Issues 181 | 182 | #### VM Won't Boot 183 | - **Check Secure Boot**: Ensure Secure Boot is disabled in VM BIOS 184 | - **Verify EFI Storage**: Confirm EFI storage is properly configured 185 | - **Check VM Settings**: Ensure UEFI is selected as BIOS type 186 | 187 | #### Installation Script Fails 188 | - **Check Internet Connection**: Ensure Proxmox node has internet access 189 | - **Verify VM ID**: Make sure the VM ID exists and is correct 190 | - **Check Storage**: Verify storage volume is available and has space 191 | 192 | ### Getting Help 193 | 194 | - **ZimaOS Documentation**: [Official ZimaOS Documentation](https://github.com/IceWhaleTech/ZimaOS) 195 | - **Community Support**: Check ZimaOS GitHub issues and discussions 196 | - **Video Tutorial**: Reference the [installation video](https://www.youtube.com/watch?v=3n739Dia8eMz) 197 | 198 | --- 199 | 200 | ## 📚 Additional Resources 201 | 202 | - **ZimaOS GitHub**: [https://github.com/IceWhaleTech/ZimaOS](https://github.com/IceWhaleTech/ZimaOS) 203 | - **Proxmox Documentation**: [https://pve.proxmox.com/wiki/Main_Page](https://pve.proxmox.com/wiki/Main_Page) 204 | - **Installation Video**: [https://www.youtube.com/watch?v=3n739Dia8eMz](https://www.youtube.com/watch?v=3n739Dia8eMz) 205 | 206 | --- 207 | 208 | *Inspired by [bigbeartechworld](https://www.youtube.com/watch?v=o2H5pwLxOwA) - Thank you for the original tutorial!* 209 | --------------------------------------------------------------------------------