@ wrote... (2 years, 10 months ago)

Not gonna lie, getting this to work was hard, plus I'm still not super happy with the results but it's good enough. You can set a static ip in the Proxmox cloud-init disk and that's what you'll end up with on first boot.

Note: this probably also applies to Ubuntu 18.04

more…

Category: tech, Tags: devops, linux, proxmox, ubuntu
Comments: 6
@ wrote... (3 years, 9 months ago)

Here's a crappy little script that automates the steps in Fix proxmox containers that won't start

#!/bin/bash

if [ -z "$1" ]; then
    containers=`pct list | grep stopped | awk '{print $1 " "}'`
else
    containers=$1
fi

echo "restarting containers: $containers"

for m in $containers; do
    lxc-start -n $m &
    echo "force started $m"
done

echo "sleeping for 2 minutes while containers start"
sleep 120

for m in $containers; do
    echo "shutting down $m"
    pct shutdown $m;
    echo "starting $m"
    pct start $m &
done
Category: tech, Tags: lxc, proxmox
Comments: 0
@ wrote... (3 years, 11 months ago)

Sometimes an lxc container will refuse to start, usually after something goes wrong on the host. The key is to manually start the container and wait for some timeout or something, then the container will start properly.

Update: this does more or less the same but with less work.

pct list   # note the vmid, replace 100 101 below as appropriate

for m in 100 101; do lxc-start -n $m & done

# after a minute or so you'll see the background tasks finish in the console
pct list   # lxc containers should be running

# Note, that `systemd` will still show the tasks as failed since it didn't
# start them, so now lets stop/start them properly
for m in 100 101; do pct shutdown $m; pct start $m & done

The following is still valid but I now use the above method.

[root@proxmox1 ~]
# pct start 125
pJob for pve-container@125.service failed because a timeout was exceeded.
See "systemctl status pve-container@125.service" and "journalctl -xe" for details.
command 'systemctl start pve-container@125' failed: exit code 1

[root@proxmox1 ~]
# /usr/bin/lxc-start -n 125 -F

# good long wait, over a minute
# login and then `poweroff`

[root@proxmox1 ~]
# pct start 125 && echo $?
0

tl;dr

  1. lxc-start -n 125 -F
  2. login and poweroff
  3. pct start 125
Category: tech, Tags: lxc, proxmox
Comments: 0
@ wrote... (4 years, 2 months ago)

Before upgrading to Proxmox 6 you need to upgrade to Corosync 3. Here's an ansible playbook that will automate that…

more…

Category: tech, Tags: ansible, proxmox
Comments: 0
@ wrote... (6 years, 9 months ago)

Just a quick note before I forget what little I understand. Something happened (or because I installed proxmox on top of an existing debian install, I honestly can't remember since it was like 4 weeks ago) during my install of proxmox. Long story short is that the nfs server doesn't work on reboot.

$ showmount -e
clnt_create: RPC: Program not registered

So then if you manually run rpc.mountd

$ rpc.mountd

$ showmount -e
Export list for proxmox-1
/tank/etc      192.168.1.0/24

But then you can't actually mount anything until you run rpc.nfsd

$ rpc.nfsd
$ mount proxmox-1:/tank/etc /tmp/etc
# totally works
$ ps auxw |grep rpc.nfsd
# no results

So I'm not sure what's going on. I do know that the half init.d half systemd scripts are somehow buggy.

The really crappy thing is that until I figure out the real solution I can't safely reboot my boxes.

Category: tech, Tags: proxmox
Comments: 3