Proxmox: Difference between revisions

From Bitpost wiki
Line 46: Line 46:
  # in another terminal, test:
  # in another terminal, test:
  ssh melange
  ssh melange
* Fix the fucking default proxmox apt repo from "enterprise" to "no-license".  Cmon guys...
* Fix the fucking default proxmox apt repo from "enterprise" to "no-license".  BTW, they say it's not well tested, and you better [https://www.proxmox.com/en/proxmox-ve/pricing pay for a subscription] and get a key for the "better" repo.  Cmon you all that is utter bullshit...
  # Either delete /etc/apt/sources.list.d/pve-enterprise.list file or comment all lines in this file with #.
  # Either delete /etc/apt/sources.list.d/pve-enterprise.list file or comment all lines in this file with #.
  emacs -nw /etc/apt/sources.list.d/pve-no-subscription.list
  emacs -nw /etc/apt/sources.list.d/pve-no-subscription.list
  deb http://download.proxmox.com/debian/pve buster pve-no-subscription
  deb http://download.proxmox.com/debian/pve buster pve-no-subscription

Revision as of 17:51, 18 April 2021

Available VM Types

  • Place ISOs in /var/lib/vz/template/iso
  • To upload via Proxmox web ui:
Storage View > Datacenter > melange > local > (you might have to hit refresh now!) > ISOs > Upload

VM Installation

  • VM install from ISO
    • When you first boot an ubuntu iso, it will behave like an installation thumb drive.
    • Install to the only available drive of the VM (/dev/sda). Proxmox is smart enough to allow this. The install ISO ends up as a DVD drive.
    • Once VM install is completed, remove the DVD:
      • sudo umount /dev/sf0 (or whatever)
      • Proxmox > (VM) > hardware > DVD > remove
      • Proxmox > (VM) > shutdown, then start

Changing VM disk size

Increase is fairly easy:

  • (VM) > Hardware > Hard Disk > Resize disk > Add number of GB to increase
  • Update the ubuntu filesystem
sudo resizepart #
  End?  100%
sudo resize2fs /dev/sda#

Changing VM CPU allocation

  • Navigate to (VM) > Hardware > Processors
  • Adjust core count. Overallocation is a very good idea. CPU cores will be used only as threads need them. I've read that some shops successfully overallocate by a factor of 20:1. With our 12 Ryzen 9 cores, that means we would allocate 120 total cores to our VMs(!). Don't do that, ha.
  • Stick with 1 socket (that's just for sizing to match any paid licensing)

VM remote desktop display

I'm using SPICE for a full responsive 4k UI on other thin(ner) clients.

Proxmox Installation

  • In BIOS, enable SVM (cpu virtualization) (you need a modern AMD or Intel chipset)
  • Get the latest proxmox release ISO, dd it to a thumb drive (use Flash_Drives SAM 64 EVO)
  • Boot and install onto the primary drive over any existing OSes
  • During install, use ext4
    • I deemed ZFS too fancy, it's basically software raid, and troublesome according to some
  • Create a user and use ssh key (NOTE you might want to keep some root terminals open so you don't screw up and get locked out!):
apt install sudo
adduser m
visudo # and allow m to sudo
nano /etc/ssh/sshd_config # and turn off password login, root login
su - m
# set up ssh keys
# in another terminal, test:
ssh melange
  • Fix the fucking default proxmox apt repo from "enterprise" to "no-license". BTW, they say it's not well tested, and you better pay for a subscription and get a key for the "better" repo. Cmon you all that is utter bullshit...
# Either delete /etc/apt/sources.list.d/pve-enterprise.list file or comment all lines in this file with #.
emacs -nw /etc/apt/sources.list.d/pve-no-subscription.list
deb http://download.proxmox.com/debian/pve buster pve-no-subscription