Disable Enterprise Repository and Add the No-Subscription Repository:
- Disable the Proxmox Enterprise Repository
Edit the Proxmox enterprise repository configuration file to disable it:
1
| nano /etc/apt/sources.list.d/pve-enterprise.list
|
Comment out the line in this file by adding a #
at the beginning:
1
| # deb https://enterprise.proxmox.com/debian/pve bookworm pve-enterprise
|
Save and exit the file (Ctrl+O
, Enter
, Ctrl+X
).
- Add the No-Subscription Proxmox Repository
Now, add the Proxmox community repository (no subscription) by creating a new file:
1
| echo "deb http://download.proxmox.com/debian/pve bookworm pve-no-subscription" > /etc/apt/sources.list.d/pve-no-subscription.list
|
- Update the Package List
After disabling the enterprise repository and adding the no-subscription repository, update your package list:
- Continue with the Tailscale Installation
Now you can proceed with the remaining commands to install Tailscale, as the package list should update without the 401 Unauthorized
error:
Installing Tailscale
After setting up the non enterprise repo you can run:
1
| apt update && apt install -y curl && curl -fsSL https://tailscale.com/install.sh | sh
|
Tailscale in LXC Containers
What is an LXC?
- A lightweight virtualized Linux system
- Unprivileged LXC: root user (uid 0) in container maps to unprivileged host user for security
Tailscale in LXC
Tailscale needs /dev/tun
access which unprivileged containers don’t usually have. To enable it:
- Add these lines to
/etc/pve/lxc/[container-id].conf
:
1
2
| lxc.cgroup2.devices.allow: c 10:200 rwm
lxc.mount.entry: /dev/net/tun dev/net/tun none bind,create=file
|
Restart the container
Install Tailscale in the container
1
| apt update && apt install -y curl && curl -fsSL https://tailscale.com/install.sh | sh
|
Adding ISO Files for VM creation
By default all ISO files are stored in /var/lib/vz/template/iso/
so just download them into it with:
1
| wget -P /var/lib/vz/template/iso/ <URL_TO_ISO>
|
Managing LXC Templates
The pveam
command in Proxmox is used for managing appliance images and templates. It stands for “Proxmox VE Appliance Manager.” Here are some key uses of the pveam
command:
List available templates
Update the list of available templates
Download a template
1
| pveam download local <template-name>
|
Show details about available templates
Remove a downloaded template
1
| pveam remove <template-file>
|
Search for specific templates
1
| pveam search <search-term>
|
1
| pveam info <template-name>
|
These functions allow you to manage the LXC templates available on your Proxmox server, making it easier to create and deploy containers.
Pass through a physical disk to a VM
To pass through a physical disk in Proxmox to a VM, you can follow these detailed steps:
Identify the Disk:
- Run
lsblk -o +MODEL,SERIAL,WWN
in the terminal to list all hard disks along with their model names and serial numbers. Identify the disk you want to pass through by noting its details.
Find the Disk ID:
- Use
ls -l /dev/disk/by-id
to locate the disk by its unique ID, which remains constant even if other system changes occur.
1
| lsblk -o +MODEL,SERIAL,WWN && ls -l /dev/disk/by-id
|
Pass the Disk to the VM:
- Execute the following command, replacing
[VM_ID]
with your virtual machine’s ID and [FULL_ID_OF_DISK]
with the full ID of the disk from step 2:1
| qm set [VM_ID] -scsi1 /dev/disk/by-id/[FULL_ID_OF_DISK]
|
- This command adds the disk to the VM. If you’re already using a SCSI disk, make sure to use a unique SCSI number (e.g.,
-scsi1
, -scsi2
, etc.).