Changing default storage of Ludus to a NFS share.
ludus-with-nfs.md edited
49 lines 2.2 kB view raw view code

To change the default storage for Ludus to your new NFS share, you need to perform two main steps: first, grant the necessary permissions in Proxmox, and second, update the Ludus configuration file.

⚙️ Step 1: Grant Permissions in Proxmox#

Ludus users need to be able to access the new storage pool. You can set this up via the Proxmox command line.

  1. Log in as root to your Proxmox host (or the node where the NFS storage is mounted).

  2. Run the following commands, replacing <your new storage> with the exact Storage ID you created in Proxmox (e.g., omv-nfs):

    pveum acl modify /storage/<your new storage> -group ludus_users -role DatastoreUser
    pveum acl modify /storage/<your new storage> -group ludus_admins -role PVEDatastoreAdmin
    

    Note: The DatastoreUser role is generally sufficient for using the storage, while PVEDatastoreAdmin grants more extensive management permissions.

📝 Step 2: Update the Ludus Configuration File#

Now, you need to tell Ludus to use this new storage pool by default.

  1. Open the Ludus configuration file in a text editor (like nano or vim):

    sudo nano /opt/ludus/config.yml
    
  2. Find and modify the following parameters:

    • proxmox_vm_storage_pool: Set this to the Storage ID of your NFS share (e.g., omv-nfs).
    • proxmox_vm_storage_format: Set this to qcow2. This is the recommended and most compatible disk format for directory-based storage types like NFS.
    • proxmox_iso_storage_pool: You can also set this to your new storage pool if you want to store ISO images there. Otherwise, leave it as local.

    Your configuration should look similar to this:

    proxmox_vm_storage_pool: omv-nfs
    proxmox_vm_storage_format: qcow2
    proxmox_iso_storage_pool: omv-nfs # Or keep as 'local' if preferred
    
  3. Save the file and exit the editor.

🔄 Step 3: Restart Ludus Services#

For the changes to take effect, you must restart the Ludus services:

sudo systemctl restart ludus ludus-admin

After completing these steps, any new VMs or templates created by Ludus will automatically be stored on your NFS share.