Tag: proxmox

  • How to Delete a Virtual Machine in Proxmox

    Here is what you need to do to delete a VM in proxmox.

    1) log in to Proxmox.

    2) Find the VM you need to delete.

    3) Shutdown the VM

    Shutdown proxmox virtual machine

    When it asks for confirmation, press “Yes”

    4) After VM is stopped, click on the “More” button. You will see the option to remove the Virtual machine.

    Remove Virtual Machine in Proxmox

    It will ask for deletion confirmation. You must enter VM ID and click the “Remove” button to delete the virtual machine.

    Delete a VM using command line

    First, stop the Virtual machine

    qm stop VM_ID
    

    Then delete the VM with

    qm destroy VM_ID
    

    Back to Proxmox

  • Proxmox LXC container docker not working

    Proxmox LXC container docker not working

    On a Proxmox server, LXC container failed to run docker. When I start a docker container, I get the following errors.

    root@erpdo:~# docker run hello-world
    Unable to find image 'hello-world:latest' locally
    latest: Pulling from library/hello-world
    2db29710123e: Pull complete 
    Digest: sha256:2498fce14358aa50ead0cc6c19990fc6ff866ce72aeb5546e1d59caac3d0d60f
    Status: Downloaded newer image for hello-world:latest
    docker: Error response from daemon: failed to create shim: OCI runtime create failed: container_linux.go:380: starting container process caused: process_linux.go:545: container init caused: rootfs_linux.go:76: mounting "proc" to rootfs at "/proc" caused: mount through procfd: permission denied: unknown.
    root@erpdo:~#
    

    To fix the error, in proxmox, click on the container, then go to Options.

    proxmox container options

    Proxmox > Container Name > Options > Features
    

    Click on Features, then click edit. You will see a popup like

    proxmox edit container features

    On this screen, enable the following 2 options

    keyctl
    Nesting
    

    Stop and start the container. After this, the docker container will work inside the LXC container in proxmox server.

  • Proxmox VE Access Console of LXC Container

    To access console of a LXC container running under Proxmox, run

    pct enter CT_ID_HERE
    

    Example

    pct enter 106
    

    You don’t need to enter password, you will be logged in as user root.

    See proxmox

  • Proxmox take snapshot of Virtual Machine

    Proxmox take snapshot of Virtual Machine

    To take snapshot of virtual machine in proxmox, click on Virtual Machine, under Snapshots, clikc “Take Snapshot” button.

    proxmox snapshot

    To create snapshot through command line, login to Proxmox server as user root, then run

    qm snapshot VMID nameOfSnapShot
    

    nameOfSnapShot = no space or special chars allowed. Sould start/end with alphabet (numbers should NOT be used at start/end).

    proxmox  snapshot command

    See Proxmox

  • proxmox config files

    To find versions of proxmox packages

    pveversion -v
    

    Storage Config

    root@server70:~# cat /etc/pve/storage.cfg
    lvm: local_lvm
    	vgname pve
    	content images
    
    dir: local
    	path /var/lib/vz
    	content iso,rootdir,vztmpl,images
    	maxfiles 0
    
    root@server70:~# 
    

    qemu config

    Config for KVM VMs stored in folder

    /etc/pve/nodes/HOSTNAME/qemu-server
    

    Example

    root@server70:~# cat /etc/pve/nodes/server70/qemu-server/100.conf 
    boot: c
    bootdisk: virtio0
    cores: 6
    ide2: none,media=cdrom
    memory: 32768
    name: vm701.hosthat.com
    net0: virtio=02:00:00:AC:77:3C,bridge=vmbr0
    numa: 0
    onboot: 1
    ostype: l26
    protection: 1
    smbios1: uuid=28537e4f-e1ce-4f44-8421-e004370ab6b4
    sockets: 1
    virtio0: local_lvm:vm-100-disk-1,size=500G
    root@server70:~# 
    

    Cluser

    root@server70:~# cat /etc/pve/.members
    {
    "nodename": "server70",
    "version": 3,
    "cluster": { "name": "help", "version": 1, "nodes": 1, "quorate": 1 },
    "nodelist": {
      "server70": { "id": 1, "online": 1, "ip": "158.69.124.221"}
      }
    }
    root@server70:~# 
    
  • Proxmox 6 disable No valid subscription notice

    Proxmox 6 disable No valid subscription notice

    To disable No valid subscription notice from proxmox, edit file

    vi /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js
    

    Find

    if (data.status !== 'Active') {
    

    This is on line 380. inside function checked_command

    Replace with

    if (false) {
    

    Resart pveproxy

    systemctl restart pveproxy
    
  • Proxmox Manage Virtual Machines with qm command

    Proxmox Manage Virtual Machines with qm command

    To list all running Virtual Machines, run

    qm list
    

    To stop a VM, run

    qm stop VM_ID
    

    Here are other qm commands

    qm guest cmd  
    qm guest exec-status  
    qm guest passwd   [OPTIONS]
    qm guest exec  [] [OPTIONS]
    
    qm clone   [OPTIONS]
    qm config  [OPTIONS]
    qm create  [OPTIONS]
    qm delsnapshot   [OPTIONS]
    qm destroy  [OPTIONS]
    qm list  [OPTIONS]
    qm listsnapshot 
    qm migrate   [OPTIONS]
    qm move_disk    [OPTIONS]
    qm pending 
    qm reset  [OPTIONS]
    qm resize    [OPTIONS]
    qm resume  [OPTIONS]
    qm rollback  
    qm sendkey   [OPTIONS]
    qm set  [OPTIONS]
    qm shutdown  [OPTIONS]
    qm snapshot   [OPTIONS]
    qm start  [OPTIONS]
    qm stop  [OPTIONS]
    qm suspend  [OPTIONS]
    qm template  [OPTIONS]
    qm unlink  --idlist  [OPTIONS]
    
    qm cleanup   
    qm importdisk    [OPTIONS]
    qm importovf    [OPTIONS]
    qm monitor 
    qm mtunnel 
    qm nbdstop 
    qm rescan  [OPTIONS]
    qm showcmd  [OPTIONS]
    qm status  [OPTIONS]
    qm terminal  [OPTIONS]
    qm unlock 
    qm vncproxy 
    qm wait  [OPTIONS]
    
  • Add ISO Images to Proxmox

    Add ISO Images to Proxmox

    proxmox

    To add ISO images to proxmox server, login to server as user root, then go to folder “/var/lib/vz/template/iso”. You can download ISO for operating system you need to this folder.

    cd /var/lib/vz/template/iso
    

    For Debian 10

    wget https://cdimage.debian.org/debian-cd/current/amd64/iso-cd/debian-10.5.0-amd64-netinst.iso
    

    For Debian 9

    wget https://cdimage.debian.org/debian-cd/current/amd64/iso-cd/debian-9.4.0-amd64-netinst.iso
    

    For Fedora 28

    wget https://download.fedoraproject.org/pub/fedora/linux/releases/28/Server/x86_64/iso/Fedora-Server-dvd-x86_64-28-1.1.iso
    

    See proxmox

  • How to download Proxmox Container Templates (CT)

    How to download Proxmox Container Templates (CT)

    Proxmox allows you to create fully virtualized virtual machines and Linux Containers. Linux Containers are lightweight, and share kernel used by the host server.

    Before you can create CT, you need to download templates.

    To list all available CT images, run

    pveam available
    

    Proxmox CT Templates

    Download a template

    To download a proxmox CT template, run

    pveam download local ubuntu-18.04-standard_18.04-1_amd64.tar.gz
    

    This will download and save template to folder “/var/lib/vz/template/cache/”

    proxmox download template

    List available templates

    To get list of all templates available on your installation, run

    pveam list local
    

    proxmox pveam list local

    To update

    pveam update
    

    See Proxmox

  • proxmox

    Proxmox is a Virtualization software that allows you to run KVM virtual machines and LXC containers.

    Once installed, you will be able to access proxmox on port 8006.

    https://YOUR_SERVER_IP:8006

    Some commands

    pvecm nodes
    pvecm status
    systemctl status pve-cluster
    systemctl status pvestatd
    systemctl status pvedaemon

    General

    KVM

    Containers (LXC)