# - bof - #


:1
# -  - #
# - Read the agreement & agree - #
Next

:2
# -  - #
# - Country, Time zone & Keyboard Layout - #
Next

:3
# -  - #
# - Password & email - #
Next

:4
# -  - #
# - Network configuration - #
  Hostname: HPLaptopProxmoxVE.IS
IP Address: 192.168.1.15/24
   Gateway: 192.168.1.1
DNS Server: 192.168.1.1
Next

:5
# -  - #
# - Summary - #
Install




:6
# -  - #
# - Access the server from another computer - #
https://10.0.0.5:8006

Advanced
Proceed to 10.0.0.5(unsafe)

User name: root
 Password: Administrator2





:a
# -  - #
# - Computer with one disk only - #
# - Delete local-lvm partition & Resize local - #

:a.1
# -  - #
# - Increase Storage - #
# - Delete local-lvm partition - #
Click Datacenter
Storage
local-lvm
Remove

:a.2
# -  - #
# - Resize local - #
Click is-proxmox
Click Shell
lvremove /dev/pve/data;
lvresize -l +100%FREE /dev/pve/root;
resize2fs /dev/mapper/pve-root;



:b
# -  - #
# - Update & upgrade - #
https://pve.proxmox.com/wiki/Package_Repositories


:b.1
# -  - #
# - Add no-subscription repositories - #
# - ssh into ProxmoxVE - #

ssh root@192.168.1.56;



vi /etc/apt/sources.list;
nano /etc/apt/sources.list;

deb http://ftp.debian.org/debian bookworm main contrib
deb http://ftp.debian.org/debian bookworm-updates main contrib

# Proxmox VE pve-no-subscription repository provided by proxmox.com,
# NOT recommended for production use
deb http://download.proxmox.com/debian/pve bookworm pve-no-subscription
deb http://download.proxmox.com/debian/ceph-quincy bookworm no-subscription


# security updates
deb http://security.debian.org/debian-security bookworm-security main contrib


:b.2
# -  - #
# - Delete enterprise repositories - #
cd /etc/apt/sources.list.d/;
ls -lah;

rm -rf /etc/apt/sources.list.d/pve-enterprise.list;
rm -rf /etc/apt/sources.list.d/ceph.list;


:b.3
# -  - #
# - Update & upgrade - #
apt update && apt upgrade -y && apt autoremove -y;



:c
# -  - #
# - Install sorfware - #
#apt dist-upgrade -y;
apt update && apt upgrade -y && apt autoremove -y;
apt remove vi -y;
apt remove vim -y;
apt install curl git ifupdown2 inxi net-tools ntp screenfetch neovim -y;



:d
# -  - #
# - Modify .bashrc - #



:e
# -  - #
# - Laptop configuration - #
Click is-proxmox
Click Shell

sudo vim /etc/systemd/logind.conf;

/HandleLidSwitch=suspend
HandleLidSwitch=ignore
HandleLidSwitchDocked=ignore
:wq

sudo systemctl restart systemd-logind.service;



:f
# -  - #
# - Laptop screen go to sleep after 300 seconds - #

vim /etc/default/grub;

# GRUB_CMDLINE_LINUX_DEFAULT="quiet"
# GRUB_CMDLINE_LINUX_DEFAULT="quiet consoleblank=60"

# GRUB_CMDLINE_LINUX=""
GRUB_CMDLINE_LINUX="consoleblank=300"
:wq

sudo update-grub;



:g
# -  - #
# - Create administrator group & user - #

Datacenter

Groups
Create
   Name: admin
Comment: Administrator

Permissions
Group Permission
Path: /
User: admin
Role: Administrator

Users
Add
User name: is_derayo
    Realm: Proxmox PAM standard authentication
    Group: admin
   Expire: never
Firs name: Djalmar Enrique
Last name: Rayo-Rivas
    email: is_derayo@hotmail.com
    
Datacenter
HPLaptopProxmoxVE
Shell



# -  - #
# - Create administrator group & user - #
adduser is_derayo;
usermod -aG sudo is_derayo;



:h
# -  - #
# - Create ZFS Pool - DataPool - #
sudo zpool create -f DataPool sdb nvme0n1;
zpool list;
zpool status DataPool

:h.1
# -  - #
# - Create directory - #
Datacenter
Storage
Add
Directory

           ID: ISOs
    Directory: /DataPool/ISOs
      Content: VZDump backup file, Disk image, Import, Container, Snippets
        Nodes: ProxmoxMini
       Enable: Yes (Checked)
Preallocation: Default

           ID: OSs
    Directory: /DataPool/OSs
      Content: ISO image, Container template
        Nodes: ProxmoxMini
       Enable: Yes (Checked)
Preallocation: Default







:7
# -  - #
# - Migrating ProxmoxVE VM to another ProxmoxVE Server - #



:7.1
# -  - #
# - Documentation - #
https://computingforgeeks.com/how-to-migrate-proxmox-vm-to-another-proxmox-node/



:7.2
# -  - #
# - Procedure - #

:7.2.1
# -  - #
# - ssh into ProxmoxVE Server source as ROOT user - #
# - VMs or Containers have to be runnig - #
# - Disconnect any ISO from VMs or Container - #
ssh root@192.168.1.16;

:7.2.2
# -  - #
# - List VMs or Containers - #

qm list;
pct list;

╭── # root@ProxmoxMini /DataPool/OSs/images/103 :
╰─▷ $ qm list;
      VMID NAME                 STATUS     MEM(MB)    BOOTDISK(GB) PID       
       103 uServer-KasmWorspaces stopped    16384           1024.00 0 



:7.3
# -  - #
# - Compress VMs or Containers - #

md -p ~/Backup;
md -p /$USER/Backup;
md -p /root/Backup;

vzdump --compress gzip <VMID> --dumpdir /$USER/Backup;
vzdump --compress gzip <ContainerID> --dumpdir /$USER/Backup;

vzdump --compress gzip 103 --dumpdir /$USER/Backup;
vzdump --compress gzip 103 --dumpdir /root/Backup;


INFO: starting new backup job: vzdump 103 --dumpdir /root/Backup --compress gzip
INFO: Starting Backup of VM 103 (qemu)
INFO: Backup started at 2025-04-12 18:57:10
INFO: status = running
INFO: VM Name: uServer-KasmWorspaces
INFO: include disk 'scsi0' 'OSs:103/vm-103-disk-1.qcow2' 1T
INFO: include disk 'efidisk0' 'OSs:103/vm-103-disk-0.qcow2' 528K
INFO: include disk 'tpmstate0' 'OSs:103/vm-103-disk-2.raw' 4M
INFO: backup mode: snapshot
INFO: ionice priority: 7
INFO: creating vzdump archive '/root/Backup/vzdump-qemu-103-2025_04_12-18_57_10.vma.gz'
INFO: attaching TPM drive to QEMU for backup
INFO: skipping guest-agent 'fs-freeze', agent configured but not running?
INFO: started backup task '564486e1-e072-47dc-9329-2bfd89af8715'
INFO: resuming VM again
INFO:   0% (1.2 GiB of 1.0 TiB) in 3s, read: 397.5 MiB/s, write: 33.6 MiB/s
INFO:   1% (10.2 GiB of 1.0 TiB) in 2m 40s, read: 59.2 MiB/s, write: 32.2 MiB/s

INFO:  96% (987.6 GiB of 1.0 TiB) in 40m 34s, read: 12.8 GiB/s, write: 0 B/s
INFO: 100% (1.0 TiB of 1.0 TiB) in 40m 37s, read: 12.1 GiB/s, write: 162.7 KiB/s
INFO: backup is sparse: 963.09 GiB (94%) total zero data
INFO: transferred 1.00 TiB in 2437 seconds (430.3 MiB/s)
INFO: archive file size: 25.69GB
INFO: Finished Backup of VM 103 (00:40:40)
INFO: Backup finished at 2025-04-12 19:37:50
INFO: Backup job finished successfully
INFO: notified via target `mail-to-root`





:7.4
# -  - #
# - Copy generated Backup to a new ProxmoxVE - #

:7.4.1
# -  - #
# - List backups - #
la /$USER/Backup;

total 26G
drwxr-xr-x 2 root root    4 Apr 12 19:37 ./
drwx------ 6 root root   11 Apr 12 18:46 ../
-rw-r--r-- 1 root root 4.2K Apr 12 19:37 vzdump-qemu-103-2025_04_12-18_57_10.log
-rw-r--r-- 1 root root  26G Apr 12 19:37 vzdump-qemu-103-2025_04_12-18_57_10.vma.gz


:7.4.2
# -  - #
# - Check backups size - #

:7.4.2.1
# -  - #
# - VMs - #
#du -sh /$USER/Backup/vzdump-qemu-103-2025_04_12-18_57_10.vma.gz;


:7.4.2.2
# -  - #
# - Containers - #
#du -sh /$USER/Backup/vzdump-lxc-101-2024_01_17-00_29_42.tar;



:7.5
# -  - #
# - Copy backup to ProxmoxVE destination - #
scp /$USER/Backup/vzdump-qemu-103-2025_04_12-18_57_10.vma.gz $USER@192.168.1.15:/$USER/Backup/



:7.6
# -  - #
# - Restoring VMs from Backup archive on ProxmoxVE Server - #


:7.6.1
# -  - #
# - Stop the Virtual Machine on first ProxmoxVE server - #

VMs
qm stop <VMID>
qm stop 103;

Containers
pct stop <ContainerID>


:7.6.2
# -  - #
# - Restore ProxmoxVE server - #
ssh root@192.168.1.15;
cd ~/Backup;
ls -lah;


VMs
cd /DataPool/OSs/images;
qmrestore --storage OSs /$USER/Backup/vzdump-qemu-103-2025_04_12-18_57_10.vma.gz 103;


cd /DataPool/OSs/images;
qmrestore --storage OSs /$USER/Backup/vzdump-qemu-103-2025_04_12-18_57_10.vma.gz 103;


# - Specifying storage pool - #
qmrestore --storage OSs  /$USER/Backup/vzdump-qemu-103-2025_04_12-18_57_10.vma.gz 103;

Containers
pct restore <NEWID> /$USER/Backup/vzdump-qemu-103-2025_04_12-18_57_10.vma.gz;
pct restore 103 /$USER/Backup/vzdump-qemu-103-2025_04_12-18_57_10.vma.gz;

# - Specifying storage pool - #
pct restore  --storage OSs <NEWID> /$USER/Backup/vzdump-qemu-103-2025_04_12-18_57_10.vma.gz;
pct restore  --storage OSs 103 /$USER/Backup/vzdump-qemu-103-2025_04_12-18_57_10.vma.gz;



:7.7
# -  - #
# - List & start VMs / Containers on new ProxmoxVE Server - #


:7.7.1
# -  - #
# - List VMs / Containers - #
qm list;


:7.7.2
# -  - #
# - Start VMs / Containers - #
qm start <VMID>
qm start 103;











:100
# -  - #
# - Disable dir to umount - #
# - If testdir exist - #

systemctl disable mnt-pve-testdir.mount
umount /mnt/pve/testdir



:101
# -  - #
# - See storage configuration - #

cat /etc/pve/storage.cfg



:102
# -  - #
# - Edit mounting file (fstab) - #

cat /etc/systemd/system/mnt-pve-testxfs.mount



[Install]
WantedBy=multi-user.target

[Mount]
Options=defaults
Type=xfs
What=/dev/disk/by-uuid/5a0a6149-ce8f-4e36-94c4-348d0d133e72
Where=/mnt/pve/testxfs

[Unit]
Description=Mount storage 'testxfs' under /mnt/pve



:200
# -  - #
# - ProxmoxVE showing ? on VMachines names - #
ssh root@192.168.15;
sshP;



sudo systemctl restart pvestatd;
sudo systemctl start pvestatd;

sudo systemctl status pvestatd;



# - eof - #