Proxmox

From The World according to Vissie
Jump to navigation Jump to search

Setup

https://pve.proxmox.com/wiki/Install_Proxmox_VE_on_Debian_Stretch

NB!! Remember to leave space from your LVM for backup! xfs or ext4 should be fine. Even just on the boot drive.

Subscriptions

How to Update Proxmox VE When “You Do Not Have A Valid Subscription”

https://serenity-networks.com/how-to-update-proxmox-ve-when-you-do-not-have-a-valid-subscription/

bridge network addresses

Add the following to your /etc/network/interfaces file:

auto vmbr0
iface vmbr0 inet static
    address  10.10.10.1                                                                                                            
    netmask  255.255.255.0
    bridge-ports none
    bridge-stp off
    bridge-fd 0

Creating a volume group

https://pve.proxmox.com/wiki/Logical_Volume_Manager_(LVM)#_creating_a_volume_group

Backup directory

https://forum.proxmox.com/threads/setup-space-for-backups.30089/

Disk setup

Here is the how-to that I used:

https://g3n1k.wordpress.com/2018/09/24/debian-add-lvm-space/

As my discs were big, bigger that 2T, I have to GPT initialize my disks first

If you get errors that GTP is corrupt, I recreated mine by:

gfdisk /dev/sdb

I then selected 3 - Create blank GPT

sgdisk -N 1 /dev/sdb
pvcreate --metadatasize 16G -y -ff /dev/sdb1

show physical volume

pvdisplay

Create the volume group

vgcreate vmdata /dev/sdb1

Show the volume group

vgdisplay

Now do almost the same with the next/new disk. Again, I had GPT issues, so I added the "-g" option to force the creation.

sgdisk -N 1 -g /dev/sdc
pvcreate --metadatasize 16G -y -ff /dev/sdc1
vgextend -v vmdata /dev/sdc1
vgdisplay

And one more time...

sgdisk -N 1 -g /dev/sdd
pvcreate --metadatasize 16G -y -ff /dev/sdd1
vgextend -v vmdata /dev/sdd1

Create the pool

lvcreate -L 10T -n thin-data vmdata

You can resize the pool to use all the available data.

lvresize --extents +100%FREE /dev/vmdata/thin-data

Convert the pool to thin-LVM

lvconvert --type thin-pool vmdata/thin-data

Then go to Datacentre, Storage, add LVM-Thin. Give it a name, say BigData, select your volume and pool from the drop down list.

I had some space left on my 10T disk, so I decided to use that as ISO space. Create the

vgdisplay

Get the amount of free space left. Then create the logical volume:

lvcreate -L 880G -n iso-data vmdata

Create a file system on it:

mkfs.ext4 /dev/vmdata/iso-data

Mount is somewhere

mount /dev/vmdata/iso-data /home/ISO

Then go to Datacentre, Storage, add Directory. Supply it the mount point, give it a name.

Getting your certificate into Proxmox

https://pve.proxmox.com/wiki/HTTPS_Certificate_Configuration_(Version_4.x,_5.0_and_5.1)

You need to copy the certificate from the LE directory to the PVE directory:

cp /etc/letsencrypt/live/<domain>/fullchain.pem /etc/pve/local/pveproxy-ssl.pem
cp /etc/letsencrypt/live/<domain>/privkey.pem /etc/pve/local/pveproxy-ssl.key

Than restart the PVE proxy:

systemctl restart pveproxy

System Software Updates

We provide regular package updates on all repositories. You can install those update using the GUI, or you can directly run the CLI command apt-get:

apt-get update
apt-get dist-upgrade

VMs

Install qemu-guest-agent

sudo apt-get install qemu-guest-agent

Win10 setup tips

https://pve.proxmox.com/wiki/Windows_10_guest_best_practices

Converting a Virtual Machine Image

Upload the image to proxmox

Next you’ll want to convert the vmdk file to a raw disk image with the following command

qemu-img convert -f vmdk -O raw some-bitnami-image.vmdk some-bitnami-image.raw

Now you have the raw drive image for your virtual machine. Install a normal VM in ProxMox for linux and set the disk space to the same size as the raw image. Once ProxMox has finished creating it you can then go back to your shell and use the dd command to overwrite the provisioned VM drive with the raw VM image you converted earlier. The command would look something like this:

dd if=some-bitnami-image.raw of=/dev/mapper/pve-vm--107--disk--1 bs=1M

Be sure to match the disk name for the VM you provisioned.

Once this is done the VM will be good to start up and you’re good to go.

Convert Virtual box to Proxmox

https://www.yinfor.com/2019/03/move-virtualbox-vdi-to-proxmox-ve.html

vboxmanage clonehd --format RAW ./Win10_Test_original.vdi ./Win10_Test.img