fix: it now actually works as you would expect

This commit is contained in:
Kaley, Fischer 2024-04-08 03:11:05 +02:00
parent 7a08f36696
commit 4d8ed5743b
35 changed files with 158 additions and 2701 deletions

View file

@ -1,18 +0,0 @@
update-alternatives 2024-04-07 18:47:08: run with --set ebtables /usr/sbin/ebtables-legacy
update-alternatives 2024-04-07 18:47:08: status of link group /usr/sbin/ebtables set to manual
update-alternatives 2024-04-07 18:47:08: link group ebtables updated to point to /usr/sbin/ebtables-legacy
update-alternatives 2024-04-07 18:47:08: run with --set iptables /usr/sbin/iptables-legacy
update-alternatives 2024-04-07 18:47:08: status of link group /usr/sbin/iptables set to manual
update-alternatives 2024-04-07 18:47:08: link group iptables updated to point to /usr/sbin/iptables-legacy
update-alternatives 2024-04-07 18:47:08: run with --set ip6tables /usr/sbin/ip6tables-legacy
update-alternatives 2024-04-07 18:47:08: status of link group /usr/sbin/ip6tables set to manual
update-alternatives 2024-04-07 18:47:08: link group ip6tables updated to point to /usr/sbin/ip6tables-legacy
update-alternatives 2024-04-07 18:48:34: run with --set ebtables /usr/sbin/ebtables-legacy
update-alternatives 2024-04-07 18:48:34: run with --set iptables /usr/sbin/iptables-legacy
update-alternatives 2024-04-07 18:48:34: run with --set ip6tables /usr/sbin/ip6tables-legacy
update-alternatives 2024-04-07 18:49:24: run with --set ebtables /usr/sbin/ebtables-legacy
update-alternatives 2024-04-07 18:49:24: run with --set iptables /usr/sbin/iptables-legacy
update-alternatives 2024-04-07 18:49:24: run with --set ip6tables /usr/sbin/ip6tables-legacy
update-alternatives 2024-04-07 18:51:02: run with --set ebtables /usr/sbin/ebtables-legacy
update-alternatives 2024-04-07 18:51:02: run with --set iptables /usr/sbin/iptables-legacy
update-alternatives 2024-04-07 18:51:02: run with --set ip6tables /usr/sbin/ip6tables-legacy

View file

@ -1,43 +0,0 @@
2024-04-07T18:47:07.675264+00:00 a10a5a7764ef sshd[99]: Server listening on 0.0.0.0 port 22.
2024-04-07T18:47:07.675316+00:00 a10a5a7764ef sshd[99]: Server listening on :: port 22.
2024-04-07T18:47:07.732205+00:00 a10a5a7764ef systemd-logind[89]: Failed to pin reserved VT: Permission denied
2024-04-07T18:47:07.732276+00:00 a10a5a7764ef systemd-logind[89]: New seat seat0.
2024-04-07T18:47:07.732312+00:00 a10a5a7764ef systemd-logind[89]: Failed to preallocate VT 1: Permission denied
2024-04-07T18:47:07.732339+00:00 a10a5a7764ef systemd-logind[89]: Failed to preallocate VT 2: Permission denied
2024-04-07T18:47:07.732362+00:00 a10a5a7764ef systemd-logind[89]: Failed to preallocate VT 3: Permission denied
2024-04-07T18:47:07.732386+00:00 a10a5a7764ef systemd-logind[89]: Failed to preallocate VT 4: Permission denied
2024-04-07T18:47:07.732411+00:00 a10a5a7764ef systemd-logind[89]: Failed to preallocate VT 5: Permission denied
2024-04-07T18:47:07.732443+00:00 a10a5a7764ef systemd-logind[89]: Failed to preallocate VT 6: Permission denied
2024-04-07T18:47:28.774343+00:00 a10a5a7764ef login[191]: pam_env(login:session): Unable to open env file: /etc/default/locale: No such file or directory
2024-04-07T18:47:28.775027+00:00 a10a5a7764ef login[191]: pam_unix(login:session): session opened for user root(uid=0) by (uid=0)
2024-04-07T18:47:28.775956+00:00 a10a5a7764ef login[196]: ROOT LOGIN on '/dev/pts/0'
2024-04-07T18:48:33.618714+00:00 a10a5a7764ef sshd[96]: Server listening on 0.0.0.0 port 22.
2024-04-07T18:48:33.618832+00:00 a10a5a7764ef sshd[96]: Server listening on :: port 22.
2024-04-07T18:48:33.682838+00:00 a10a5a7764ef systemd-logind[89]: Failed to pin reserved VT: Permission denied
2024-04-07T18:48:33.682906+00:00 a10a5a7764ef systemd-logind[89]: New seat seat0.
2024-04-07T18:48:33.682951+00:00 a10a5a7764ef systemd-logind[89]: Failed to preallocate VT 1: Permission denied
2024-04-07T18:48:33.682976+00:00 a10a5a7764ef systemd-logind[89]: Failed to preallocate VT 2: Permission denied
2024-04-07T18:48:33.682999+00:00 a10a5a7764ef systemd-logind[89]: Failed to preallocate VT 3: Permission denied
2024-04-07T18:48:33.683023+00:00 a10a5a7764ef systemd-logind[89]: Failed to preallocate VT 4: Permission denied
2024-04-07T18:48:33.683049+00:00 a10a5a7764ef systemd-logind[89]: Failed to preallocate VT 5: Permission denied
2024-04-07T18:48:33.683074+00:00 a10a5a7764ef systemd-logind[89]: Failed to preallocate VT 6: Permission denied
2024-04-07T18:49:23.612739+00:00 a10a5a7764ef sshd[93]: Server listening on 0.0.0.0 port 22.
2024-04-07T18:49:23.612795+00:00 a10a5a7764ef sshd[93]: Server listening on :: port 22.
2024-04-07T18:49:23.666606+00:00 a10a5a7764ef systemd-logind[86]: Failed to pin reserved VT: Permission denied
2024-04-07T18:49:23.666659+00:00 a10a5a7764ef systemd-logind[86]: New seat seat0.
2024-04-07T18:49:23.666679+00:00 a10a5a7764ef systemd-logind[86]: Failed to preallocate VT 1: Permission denied
2024-04-07T18:49:23.666696+00:00 a10a5a7764ef systemd-logind[86]: Failed to preallocate VT 2: Permission denied
2024-04-07T18:49:23.666711+00:00 a10a5a7764ef systemd-logind[86]: Failed to preallocate VT 3: Permission denied
2024-04-07T18:49:23.666726+00:00 a10a5a7764ef systemd-logind[86]: Failed to preallocate VT 4: Permission denied
2024-04-07T18:49:23.666762+00:00 a10a5a7764ef systemd-logind[86]: Failed to preallocate VT 5: Permission denied
2024-04-07T18:49:23.666778+00:00 a10a5a7764ef systemd-logind[86]: Failed to preallocate VT 6: Permission denied
2024-04-07T18:51:01.813034+00:00 a10a5a7764ef sshd[98]: Server listening on 0.0.0.0 port 22.
2024-04-07T18:51:01.813168+00:00 a10a5a7764ef sshd[98]: Server listening on :: port 22.
2024-04-07T18:51:01.865606+00:00 a10a5a7764ef systemd-logind[87]: Failed to pin reserved VT: Permission denied
2024-04-07T18:51:01.865649+00:00 a10a5a7764ef systemd-logind[87]: New seat seat0.
2024-04-07T18:51:01.865673+00:00 a10a5a7764ef systemd-logind[87]: Failed to preallocate VT 1: Permission denied
2024-04-07T18:51:01.865689+00:00 a10a5a7764ef systemd-logind[87]: Failed to preallocate VT 2: Permission denied
2024-04-07T18:51:01.865704+00:00 a10a5a7764ef systemd-logind[87]: Failed to preallocate VT 3: Permission denied
2024-04-07T18:51:01.865719+00:00 a10a5a7764ef systemd-logind[87]: Failed to preallocate VT 4: Permission denied
2024-04-07T18:51:01.865735+00:00 a10a5a7764ef systemd-logind[87]: Failed to preallocate VT 5: Permission denied
2024-04-07T18:51:01.865752+00:00 a10a5a7764ef systemd-logind[87]: Failed to preallocate VT 6: Permission denied

View file

View file

@ -1,8 +0,0 @@
2024-04-07T18:47:08.746677+00:00 a10a5a7764ef cron[123]: (CRON) INFO (pidfile fd = 3)
2024-04-07T18:47:08.746960+00:00 a10a5a7764ef cron[123]: (CRON) INFO (Running @reboot jobs)
2024-04-07T18:48:34.679093+00:00 a10a5a7764ef cron[119]: (CRON) INFO (pidfile fd = 3)
2024-04-07T18:48:34.679589+00:00 a10a5a7764ef cron[119]: (CRON) INFO (Running @reboot jobs)
2024-04-07T18:49:24.663674+00:00 a10a5a7764ef cron[118]: (CRON) INFO (pidfile fd = 3)
2024-04-07T18:49:24.664851+00:00 a10a5a7764ef cron[118]: (CRON) INFO (Running @reboot jobs)
2024-04-07T18:51:02.862614+00:00 a10a5a7764ef cron[119]: (CRON) INFO (pidfile fd = 3)
2024-04-07T18:51:02.863210+00:00 a10a5a7764ef cron[119]: (CRON) INFO (Running @reboot jobs)

Binary file not shown.

View file

@ -1,12 +0,0 @@
0 5 - 07/Apr/2024:18:47:07 +0000 starting pvefw logger
0 5 - 07/Apr/2024:18:48:24 +0000 received terminate request (signal)
0 5 - 07/Apr/2024:18:48:24 +0000 stopping pvefw logger
0 5 - 07/Apr/2024:18:48:33 +0000 starting pvefw logger
0 5 - 07/Apr/2024:18:49:14 +0000 received terminate request (signal)
0 5 - 07/Apr/2024:18:49:14 +0000 stopping pvefw logger
0 5 - 07/Apr/2024:18:49:23 +0000 starting pvefw logger
0 5 - 07/Apr/2024:18:50:52 +0000 received terminate request (signal)
0 5 - 07/Apr/2024:18:50:52 +0000 stopping pvefw logger
0 5 - 07/Apr/2024:18:51:01 +0000 starting pvefw logger
0 5 - 07/Apr/2024:18:54:30 +0000 received terminate request (signal)
0 5 - 07/Apr/2024:18:54:30 +0000 stopping pvefw logger

View file

@ -1,2 +0,0 @@
client connection: [::1]:54428
TASK OK

View file

@ -1 +0,0 @@
TASK ERROR: KVM virtualisation configured, but not available. Either disable in VM configuration or enable in BIOS.

View file

@ -1,3 +0,0 @@
Formatting '/var/lib/vz/images/100/vm-100-disk-0.qcow2', fmt=qcow2 cluster_size=65536 extended_l2=off preallocation=metadata compression_type=zlib size=34359738368 lazy_refcounts=off refcount_bits=16
virtio0: successfully created disk 'local:100/vm-100-disk-0.qcow2,iothread=1,size=32G'
TASK OK

View file

@ -1,7 +0,0 @@
starting file import from: /var/tmp/pveupload-4abeed85f279511d30bb3d86e4507a6a
target node: a10a5a7764ef
target file: /var/lib/vz/template/iso/netboot.xyz.iso
file size is: 2392064
command: cp -- /var/tmp/pveupload-4abeed85f279511d30bb3d86e4507a6a /var/lib/vz/template/iso/netboot.xyz.iso
finished file import successfully
TASK OK

View file

@ -1,12 +0,0 @@
UPID:a10a5a7764ef:00000153:00080E7D:6612EBE4:stopall::root@pam: 1 6612EBE4 OK
UPID:a10a5a7764ef:000000D4:0007CEAE:6612EB41:qmstart:100:root@pam: 1 6612EB41 KVM virtualisation configured, but not available. Either disable in VM configuration or enable in BIOS.
UPID:a10a5a7764ef:000000C1:0007CB26:6612EB38:qmcreate:100:root@pam: 1 6612EB38 OK
UPID:a10a5a7764ef:00000096:0007BF24:6612EB19:startall::root@pam: 1 6612EB19 OK
UPID:a10a5a7764ef:000000E8:0007B965:6612EB0A:stopall::root@pam: 1 6612EB0A OK
UPID:a10a5a7764ef:00000096:000798DA:6612EAB7:startall::root@pam: 1 6612EAB7 OK
UPID:a10a5a7764ef:000000CC:00079309:6612EAA8:stopall::root@pam: 1 6612EAA8 OK
UPID:a10a5a7764ef:000000B6:00078F3C:6612EA9E:imgcopy::root@pam: 1 6612EA9F OK
UPID:a10a5a7764ef:00000096:00078549:6612EA85:startall::root@pam: 1 6612EA85 OK
UPID:a10a5a7764ef:000000FF:00077FAE:6612EA77:stopall::root@pam: 1 6612EA77 OK
UPID:a10a5a7764ef:000000BC:00076A69:6612EA40:vncshell::root@pam: 1 6612EA4C OK
UPID:a10a5a7764ef:000000A9:0007645C:6612EA31:startall::root@pam: 1 6612EA31 OK

View file

@ -1,12 +0,0 @@
UPID:a10a5a7764ef:000000A9:0007645C:6612EA31:startall::root@pam: 6612EA31 OK
UPID:a10a5a7764ef:000000BC:00076A69:6612EA40:vncshell::root@pam: 6612EA4C OK
UPID:a10a5a7764ef:000000FF:00077FAE:6612EA77:stopall::root@pam: 6612EA77 OK
UPID:a10a5a7764ef:00000096:00078549:6612EA85:startall::root@pam: 6612EA85 OK
UPID:a10a5a7764ef:000000B6:00078F3C:6612EA9E:imgcopy::root@pam: 6612EA9F OK
UPID:a10a5a7764ef:000000CC:00079309:6612EAA8:stopall::root@pam: 6612EAA8 OK
UPID:a10a5a7764ef:00000096:000798DA:6612EAB7:startall::root@pam: 6612EAB7 OK
UPID:a10a5a7764ef:000000E8:0007B965:6612EB0A:stopall::root@pam: 6612EB0A OK
UPID:a10a5a7764ef:00000096:0007BF24:6612EB19:startall::root@pam: 6612EB19 OK
UPID:a10a5a7764ef:000000C1:0007CB26:6612EB38:qmcreate:100:root@pam: 6612EB38 OK
UPID:a10a5a7764ef:000000D4:0007CEAE:6612EB41:qmstart:100:root@pam: 6612EB41 KVM virtualisation configured, but not available. Either disable in VM configuration or enable in BIOS.
UPID:a10a5a7764ef:00000153:00080E7D:6612EBE4:stopall::root@pam: 6612EBE4 OK

File diff suppressed because it is too large Load diff

Binary file not shown.

View file

@ -0,0 +1,8 @@
[Match]
Name=eth1
[Network]
DHCP=no
Address=192.167.0.3/20
Gateway=192.167.0.1
DNS=10.10.0.1

View file

@ -0,0 +1,3 @@
[NetDev]
Name=vmbr0
Kind=bridge

View file

@ -0,0 +1,10 @@
[Match]
Name=vmbr0
[Network]
DHCP=no
[Bridge]
Ports=eth1
STP=true
ForwardDelaySec=0

Binary file not shown.

View file

@ -1 +0,0 @@
{}

View file

@ -1,9 +1,24 @@
networks:
customnetwork:
external: true
name: pve-network
customnetwork2:
external: true
name: pve-network2
services: services:
pveowo: pveowo:
image: neomediatech/pve:latest image: pveowotesttest
build: ./pve
#build: ./minecraft-docker #build: ./minecraft-docker
#command: ["java", "-Xmx2048M", "-jar", "server.jar", "true"]
privileged: true privileged: true
hostname: pve-test
networks:
customnetwork:
ipv4_address: 192.168.0.2
customnetwork2:
ipv4_address: 192.167.0.3
env_file: env_file:
- .env - .env
devices: devices:
@ -18,6 +33,8 @@ services:
- "./data/pve_cluster:/var/lib/pve-cluster" - "./data/pve_cluster:/var/lib/pve-cluster"
- "./data/pve_manager:/var/lib/pve-manager" - "./data/pve_manager:/var/lib/pve-manager"
- "./data/bin:/srv/bin" - "./data/bin:/srv/bin"
- "./data/vz:/var/lib/vz"
# - "./data/network:/etc/systemd/network/"
ports: ports:
- "8006:8006" - "8006:8006"
restart: always restart: always

View file

@ -78,14 +78,57 @@ RUN apt-get update && \
#set (temporary) password for root #set (temporary) password for root
RUN echo "root:root"|chpasswd RUN echo "root:root"|chpasswd
# RUN touch /etc/systemd/network/eth0.network && \
# echo "[Match]" >> /etc/systemd/network/eth0.network && \
# echo "Name=eth0" >> /etc/systemd/network/eth0.network && \
# echo "" >> /etc/systemd/network/eth0.network && \
# echo "[Network]" >> /etc/systemd/network/eth0.network && \
# echo "DHCP=no" >> /etc/systemd/network/eth0.network && \
# echo "Address=192.168.0.2/20" >> /etc/systemd/network/eth0.network && \
# echo "Gateway=192.168.0.1" >> /etc/systemd/network/eth0.network && \
# echo "DNS=10.10.0.1" >> /etc/systemd/network/eth0.network
#
# RUN touch /etc/systemd/network/eth1.network && \
# echo "[Match]" >> /etc/systemd/network/eth1.network && \
# echo "Name=eth1" >> /etc/systemd/network/eth1.network && \
# echo "" >> /etc/systemd/network/eth1.network && \
# echo "[Network]" >> /etc/systemd/network/eth1.network && \
# echo "DHCP=no" >> /etc/systemd/network/eth1.network && \
# echo "Address=192.167.0.3/20" >> /etc/systemd/network/eth1.network && \
# echo "Gateway=192.167.0.1" >> /etc/systemd/network/eth1.network && \
# echo "DNS=10.10.0.1" >> /etc/systemd/network/eth1.network
#
# # Create vmbr0.netdev network configuration
# RUN touch /etc/systemd/network/vmbr0.netdev && \
# echo "[NetDev]" >> /etc/systemd/network/vmbr0.netdev && \
# echo "Name=vmbr0" >> /etc/systemd/network/vmbr0.netdev && \
# echo "Kind=bridge" >> /etc/systemd/network/vmbr0.netdev
#
# # Create vmbr0.network bridge configuration
# RUN touch /etc/systemd/network/vmbr0.network && \
# echo "[Match]" >> /etc/systemd/network/vmbr0.network && \
# echo "Name=vmbr0" >> /etc/systemd/network/vmbr0.network && \
# echo "" >> /etc/systemd/network/vmbr0.network && \
# echo "[Network]" >> /etc/systemd/network/vmbr0.network && \
# echo "DHCP=no" >> /etc/systemd/network/vmbr0.network && \
# echo "" >> /etc/systemd/network/vmbr0.network && \
# echo "[Bridge]" >> /etc/systemd/network/vmbr0.network && \
# echo "Ports=eth1" >> /etc/systemd/network/vmbr0.network && \
# echo "STP=true" >> /etc/systemd/network/vmbr0.network && \
# echo "ForwardDelaySec=0" >> /etc/systemd/network/vmbr0.network
#
# Restart systemd-networkd (commented out because Dockerfile can't directly restart services)
#RUN systemctl enable systemd-networkd
RUN systemctl enable pvenetcommit.service
COPY entrypoint.sh / COPY entrypoint.sh /
RUN sed -i '/imklog/s/^/#/' /etc/rsyslog.conf && \ RUN sed -i '/imklog/s/^/#/' /etc/rsyslog.conf && \
chmod +x /entrypoint.sh chmod +x /entrypoint.sh
RUN systemctl disable pvestatd pvefw-logger corosync spiceproxy getty@tty1 postfix ssh.service pve-ha-lrm.service pve-ha-crm.service && \ RUN systemctl disable pvestatd pvefw-logger corosync spiceproxy getty@tty1 postfix ssh.service pve-ha-lrm.service pve-ha-crm.service && \
systemctl disable pve-firewall.service pvescheduler.service spiceproxy.service || echo ok && \ systemctl disable pvescheduler.service spiceproxy.service || echo ok && \
systemctl enable rsyslog systemctl enable pve-firewall.service rsyslog
#use setup.sh to start proxmox service #use setup.sh to start proxmox service
STOPSIGNAL SIGINT STOPSIGNAL SIGINT

73
pve/entrypoint.sh Normal file
View file

@ -0,0 +1,73 @@
#!/bin/bash
set -eo pipefail
shopt -s nullglob
# logging functions
pve_log() {
local type="$1"; shift
printf '%s [%s] [Entrypoint]: %s\n' "$(date --rfc-3339=seconds)" "$type" "$*"
}
pve_note() {
pve_log Note "$@"
}
pve_warn() {
pve_log Warn "$@" >&2
}
pve_error() {
pve_log ERROR "$@" >&2
exit 1
}
# Verify that the minimally required password settings are set for new databases.
docker_verify_minimum_env() {
if [ -z "$ADMIN_PASSWORD" ]; then
pve_error $'Password option is not specified\n\tYou need to specify an ADMIN_PASSWORD'
fi
}
docker_setup_pve() {
#Set pve user
echo "root:$ADMIN_PASSWORD"|chpasswd
}
RELAY_HOST=${RELAY_HOST:-ext.home.local}
sed -i "s/RELAY_HOST/$RELAY_HOST/" /etc/postfix/main.cf
PVE_ENTERPRISE=${PVE_ENTERPRISE:-no}
rm -f /etc/apt/sources.list.d/pve-enterprise.list
docker_verify_minimum_env
#bridge
brctl addbr vmbr0 eth1
brctl addif vmbr0 eth1
ip link set vmbr0 up
#ip link set vmbr0 on
# Start api first in background
#echo -n "Starting Proxmox VE API..."
#/usr/lib/x86_64-linux-gnu/proxmox-backup/proxmox-backup-api &
#while true; do
# if [ ! -f /run/proxmox-backup/api.pid ]; then
# echo -n "..."
# sleep 3
# else
# break
# fi
#done
#echo "OK"
docker_setup_pve
if [ ! -d /var/log/pveproxy ]; then
mkdir -p /var/log/pveproxy
chmod 777 /var/log/pveproxy
fi
if [ -n "$ENABLE_PVE_FIREWALL" -a "$ENABLE_PVE_FIREWALL" == "no" ]; then
systemctl mask pve-firewall.service
fi
echo "Running PVE..."
exec "$@"
#exec gosu backup /usr/lib/x86_64-linux-gnu/proxmox-backup/proxmox-backup-proxy "$@"

View file

@ -1,3 +0,0 @@
ADMIN_PASSWORD=nyaowo
RELAY_HOST=10.40.50.4
PVE_ENTERPRISE=no

View file

@ -1,4 +0,0 @@
${BASE_PATH}/data/logs:/var/log
${BASE_PATH}/data/pve_cluster:/var/lib/pve-cluster
${BASE_PATH}/data/pve_manager:/var/lib/pve-manager
${BASE_PATH}/data/bin:/srv/bin