PVE Reference Manual: Difference between revisions

From WikiMLT
m (Text replacement - "Pve-admin-guide-7.1.pdf" to "Pve-admin-guide.pdf")
 
(3 intermediate revisions by the same user not shown)
Line 2: Line 2:


In this section are listed my lessons, notes and learnings about the installation, setup and the usage of Proxmox. most of the sections are based on the [https://www.youtube.com/watch?v=LCjuiIswXGs&list=PLT98CRl2KxKHnlbYhtABg6cF50bYa8Ulo ProxmoxVE Full Course], provided by YouTube channel [https://www.youtube.com/channel/UCxQKHvKbmSzGMvUrVtJYnUA LearnLinuxTV]. The section is named after Proxmox but it constrains much references and information for virtualization in general.
In this section are listed my lessons, notes and learnings about the installation, setup and the usage of Proxmox. most of the sections are based on the [https://www.youtube.com/watch?v=LCjuiIswXGs&list=PLT98CRl2KxKHnlbYhtABg6cF50bYa8Ulo ProxmoxVE Full Course], provided by YouTube channel [https://www.youtube.com/channel/UCxQKHvKbmSzGMvUrVtJYnUA LearnLinuxTV]. The section is named after Proxmox but it constrains much references and information for virtualization in general.


== Getting Started, Installation, Setup and Documentation ==
== Getting Started, Installation, Setup and Documentation ==
Line 21: Line 20:
* ProxmoxVE Documentation at GitHub: [https://github.com/proxmox/pve-docs/blob/master/qm.adoc Qemu/KVM Virtual Machines] (All options within the GUI interface explained)
* ProxmoxVE Documentation at GitHub: [https://github.com/proxmox/pve-docs/blob/master/qm.adoc Qemu/KVM Virtual Machines] (All options within the GUI interface explained)
* BLOG-D Without Nonsense: [https://dannyda.com/2020/05/17/how-to-remove-you-do-not-have-a-valid-subscription-for-this-server-from-proxmox-virtual-environment-6-1-2-proxmox-ve-6-1-2-pve-6-1-2/ How to remove "You do not have a valid subscription..."]
* BLOG-D Without Nonsense: [https://dannyda.com/2020/05/17/how-to-remove-you-do-not-have-a-valid-subscription-for-this-server-from-proxmox-virtual-environment-6-1-2-proxmox-ve-6-1-2-pve-6-1-2/ How to remove "You do not have a valid subscription..."]
 
* Proxmox Forum: [https://forum.proxmox.com/threads/zfs-vs-lvm-for-proxmox-os-disk.53340/ '''ZFS vs LVM for Proxmox OS disk?''']
 
{{collapse/begin}}


== Containers vs Virtual Machines ==
== Containers vs Virtual Machines ==
Line 29: Line 26:
* LearnLinuxTV: [https://youtu.be/JsexhY_gQZY Proxmox VE Full Course: Class 4 - Containers vs Virtual Machines]
* LearnLinuxTV: [https://youtu.be/JsexhY_gQZY Proxmox VE Full Course: Class 4 - Containers vs Virtual Machines]
*The Tinker Dad: [https://youtu.be/hDR_1opHGNQ Docker Containers On Proxmox! (Two Different Ways - No VMs!)]
*The Tinker Dad: [https://youtu.be/hDR_1opHGNQ Docker Containers On Proxmox! (Two Different Ways - No VMs!)]
 
{{collapse/begin|mw-collapsed mlw-collapsed-list-element}}
* '''LXC vs LXD vs Proxmox Containers vs Docker - [https://pve.proxmox.com/wiki/FAQ ProxmoxVE Wiki: FAQ]'''
{{collapse/div|#LXC vs LXD vs Proxmox Containers vs Docker}}
{{collapse/div|#LXC vs LXD vs Proxmox Containers vs Docker}}
'''LXC vs LXD vs Proxmox Containers vs Docker - [https://pve.proxmox.com/wiki/FAQ ProxmoxVE Wiki: FAQ]'''
:* LXC is a userspace interface for the Linux kernel containment features. Through a powerful API and simple tools, it lets Linux users easily create and manage system containers. LXC, as well as the former OpenVZ, aims at '''system virtualization'''. Thus, it allows you to run a complete OS inside a container, where you log in using ssh, add users, run apache, etc…
 
:* LXD is built on top of LXC to provide a new, better user experience. Under the hood, LXD uses LXC through <code>liblxc</code> and its Go binding to create and manage the containers. It’s basically an alternative to LXC’s tools and distribution template system with the added features that come from being controllable over the network.
* LXC is a userspace interface for the Linux kernel containment features. Through a powerful API and simple tools, it lets Linux users easily create and manage system containers. LXC, as well as the former OpenVZ, aims at '''system virtualization'''. Thus, it allows you to run a complete OS inside a container, where you log in using ssh, add users, run apache, etc…
:* Proxmox Containers are how we refer to containers that are created and managed using the Proxmox Container Toolkit (<code>pct</code>). They also target '''system virtualization''' and use LXC as the basis of the container offering. The Proxmox Container Toolkit (<code>pct</code>) is tightly coupled with Proxmox VE. This means that it is aware of cluster setups, and it can use the same network and storage resources as QEMU virtual machines (VMs). You can even use the Proxmox VE firewall, create and restore backups, or manage containers using the HA framework. Everything can be controlled over the network using the Proxmox VE API.
 
:* Docker aims at running a '''single''' application in an isolated, self-contained environment. These are generally referred to as “Application Containers”, rather than “System Containers”. You manage a Docker instance from the host, using the Docker Engine command line interface. It is not recommended to run docker directly on your Proxmox VE host.
* LXD is built on top of LXC to provide a new, better user experience. Under the hood, LXD uses LXC through <code>liblxc</code> and its Go binding to create and manage the containers. It’s basically an alternative to LXC’s tools and distribution template system with the added features that come from being controllable over the network.
:* If you want to run application containers, for example, ''Docker'' images, it is best to run them inside a Proxmox Qemu VM.
 
* Proxmox Containers are how we refer to containers that are created and managed using the Proxmox Container Toolkit (<code>pct</code>). They also target '''system virtualization''' and use LXC as the basis of the container offering. The Proxmox Container Toolkit (<code>pct</code>) is tightly coupled with Proxmox VE. This means that it is aware of cluster setups, and it can use the same network and storage resources as QEMU virtual machines (VMs). You can even use the Proxmox VE firewall, create and restore backups, or manage containers using the HA framework. Everything can be controlled over the network using the Proxmox VE API.
 
* Docker aims at running a '''single''' application in an isolated, self-contained environment. These are generally referred to as “Application Containers”, rather than “System Containers”. You manage a Docker instance from the host, using the Docker Engine command line interface. It is not recommended to run docker directly on your Proxmox VE host.
 
* If you want to run application containers, for example, ''Docker'' images, it is best to run them inside a Proxmox Qemu VM.
{{collapse/end}}
{{collapse/end}}



Latest revision as of 11:59, 3 September 2022

In this sec­tion are list­ed my lessons, notes and learn­ings about the in­stal­la­tion, set­up and the us­age of Prox­mox. most of the sec­tions are based on the Prox­moxVE Full Course, pro­vid­ed by YouTube chan­nel Learn­Lin­uxTV. The sec­tion is named af­ter Prox­mox but it con­strains much ref­er­ences and in­for­ma­tion for vir­tu­al­iza­tion in gen­er­al.

Get­ting Start­ed, In­stal­la­tion, Set­up and Doc­u­men­ta­tion

#Get­ting Start­ed, In­stal­la­tion, Set­up and Doc­u­men­ta­tion

Con­tain­ers vs Vir­tu­al Ma­chines

#LXC vs LXD vs Prox­mox Con­tain­ers vs Dock­er
  • LXC is a user­space in­ter­face for the Lin­ux ker­nel con­tain­ment fea­tures. Through a pow­er­ful API and sim­ple tools, it lets Lin­ux users eas­i­ly cre­ate and man­age sys­tem con­tain­ers. LXC, as well as the for­mer Open­VZ, aims at sys­tem vir­tu­al­iza­tion. Thus, it al­lows you to run a com­plete OS in­side a con­tain­er, where you log in us­ing ssh, add users, run apache, etc…
  • LXD is built on top of LXC to pro­vide a new, bet­ter user ex­pe­ri­ence. Un­der the hood, LXD us­es LXC through li­blxc and its Go bind­ing to cre­ate and man­age the con­tain­ers. It’s ba­si­cal­ly an al­ter­na­tive to LXC’s tools and dis­tri­b­u­tion tem­plate sys­tem with the added fea­tures that come from be­ing con­trol­lable over the net­work.
  • Prox­mox Con­tain­ers are how we re­fer to con­tain­ers that are cre­at­ed and man­aged us­ing the Prox­mox Con­tain­er Toolk­it (pct). They al­so tar­get sys­tem vir­tu­al­iza­tion and use LXC as the ba­sis of the con­tain­er of­fer­ing. The Prox­mox Con­tain­er Toolk­it (pct) is tight­ly cou­pled with Prox­mox VE. This means that it is aware of clus­ter se­tups, and it can use the same net­work and stor­age re­sources as QE­MU vir­tu­al ma­chines (VMs). You can even use the Prox­mox VE fire­wall, cre­ate and re­store back­ups, or man­age con­tain­ers us­ing the HA frame­work. Every­thing can be con­trolled over the net­work us­ing the Prox­mox VE API.
  • Dock­er aims at run­ning a sin­gle ap­pli­ca­tion in an iso­lat­ed, self-con­tained en­vi­ron­ment. These are gen­er­al­ly re­ferred to as “Ap­pli­ca­tion Con­tain­ers”, rather than “Sys­tem Con­tain­ers”. You man­age a Dock­er in­stance from the host, us­ing the Dock­er En­gine com­mand line in­ter­face. It is not rec­om­mend­ed to run dock­er di­rect­ly on your Prox­mox VE host.
  • If you want to run ap­pli­ca­tion con­tain­ers, for ex­am­ple, Dock­er im­ages, it is best to run them in­side a Prox­mox Qe­mu VM.

Cre­at­ing Vir­tu­al Ma­chines and VM Tem­plates

Cre­at­ing Con­tain­ers and CT Tem­plates

In or­der to dis­able the au­to­mat­ic set­ting of the con­tain­er host­name we cam do the fol­low­ing in­side the Guest OS:

sudo touch /etc/.pve-ignore.hosts
sudo touch /etc/.pve-ignore.hostname

Clus­ter­ing

It is im­por­tant when you cre­ate PVE VM in­stance that is a part of a clus­ter to set pvecm ex­pect­ed 1 at the main node (the phys­i­cal PVE), oth­er­wise that node will not run cor­rect­ly while the VM is not start­ed… which will be not pos­si­ble, be­cause of the sta­tus: Clus­ter Not Ready – No Quo­rum?

Prox­mox Back­up Serv­er

LVM Main­te­nance

Delete LVM Snap­shots

Find all Snap­shots at­tached to VMS/LXC:

for v in $(qm list|egrep -v VMID|awk '{print $1}'); do \
    for s in $(qm listsnapshot $v|egrep -v current|awk '{print $2}'); do \
        echo qm delsnapshot $v $s; \
    done; \
done

When the snap­shot is not at­tached (i.e. the VM was re­moved): 1) list all log­i­cal vol­umes; 2) find whish snap­shot is not need­ed and 3) re­move it.

vgs # scan the volume groups
lvs # list logical volumes - analyse the output
lvremove /dev/<volume group>/<logical volume of the snapshot>

HDD Sleep