-
Notifications
You must be signed in to change notification settings - Fork 8
PVE Proxmox Tips
PVE Proxmox is Linux + KVM (or LXC) virtualization. It is freely available from: https://www.proxmox.com/en/downloads
Tested version:
pveversion
pve-manager/5.1-41/0b958203 (running kernel: 4.13.13-2-pve)
If you get SSH connection error like
Couldn't agree a client-to-server cipher ...
then you need to upgrade your Putty client (had success with putty-64bit-0.70-installer.msi
from https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html)
To use Linux containers (LXC based) you need to download appliance filesystem archive
Use this command to list LXC appliances:
pveam available
Use this command to download specific appliance:
pveam download local debian-9.0-standard_9.3-1_amd64.tar.gz
NOTE:
The
local
argument is your storage name. You can list available storages using command:pvesm status
You can then create new LXC container using this template. Example using Web UI:
- logon to your Proxmox Web UI at
https://IP_ADDRESS:8006
- click on "Create CT" (blue button at right-top corner of webpage)
- on "General" tab fill:
- "Password"
- "Confirm Password"
- on "Template" tab fill:
- "Storage" - keep "local" if possible
- "Template" - there should be only option - previously downloaded
debian-9.0-standard_9.3-1_amd64.tar.gz
- keep defaults on "Root Disk" (lvm-thin), "CPU" and "Memory" tabs
- on "Network" tab remember to either fill IPv4 (or IPv6) address or choice DHCP (if you have DHCP server on your network)
- "DNS" - I have available "use host settings" only so it is easy
- click on "Confirm" tab and then click on "Finish" button
- wait for creation to complete:
- on "Status" tab you should see "stopped: OK"
Now you can expand in tree
-
"Data Center" -> "pve" -> "100 (CT100)"
-
click on "Start" button
-
you can click on "Console" (or "Console JS") to login to your container
-
in case or our Debian you can query container ip address using command:
ip addr
NOTE: above Debian 9 image does not allow root to log via SSH - so you need to either create non-root user to login, or
PermitRootLogin yes
in/etc/ssh/sshd_config
of your LXC
Getting container info from Proxmox SSH connection:
-
list LXC containers:
lxc-ls 100
-
list information about container
100
:lxc-info --name 100
NOTE: grep
IP:
column to get IP address of container.
To have new VM you typically need installation ISO. You can use either web UI to upload ISO this way:
- logon to your Proxmox Web UI at
https://IP_ADDRESS:8006
- expand/click on "Datacenter" -> "pve" -> "local"
- clock on "Upload" on right-pane to Upload your ISO
Or you can download ISO image directly to your proxmox storage:
- SSH to your Proxmox
- cd to ISO directory and download installation ISO image, for example:
cd /var/lib/vz/template/iso
wget http://ftp.linux.cz/pub/linux/debian-cd/9.4.0/amd64/iso-cd/debian-9.4.0-amd64-netinst.iso
NOTE: If your download fail you can continue it (without need to download whole file again) using
-c
argument for example:wget -c http://ftp.linux.cz/pub/linux/debian-cd/9.4.0/amd64/iso-cd/debian-9.4.0-amd64-netinst.iso
Now you can create your first VM using this ISO, for example:
- logon to your Proxmox Web UI at
https://IP_ADDRESS:8006
- click on "Create VM" blue button at the right-top of web page
- click on "OS" tab
- select your "Iso image:" -
debian-9.4.0-amd64-netinst.iso
- select your "Iso image:" -
- click on "Hard Disk", "CPU", "Memory", "Network", "Confirm" tabs and on "Finish" button.
- expand "Data Center" -> "pve" -> "101 (VM 101)"
- click on "Start"
- click on "Console" and follow standard Debian installation
PVE SSH commands to get basic info about VMs:
qm list
# 101 is VMID from "qm list"
qm config 101
Use this command to list installed LXC and ISO templates:
# note: "local" is storage name
pvesm list local
QEMU Agent is used to run commands (for example shutdown...) in guest from Host.
Please see https://pve.proxmox.com/wiki/Qemu-guest-agent for guide.
You can then run Agent commands from Proxmox SSH, for example:
qm agent 101 network-get-interfaces
It is two step operation:
- enable backup for
local
storage:pvesm set local --content rootdir,images,backup,iso
- set maximum number of backups to 99 (should be more than enough):
pvesm set local --maxfiles 99
Copyright © Henryk Paluch. All rights reserved.
This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License