TurnKey LXC Template Scripts #1742
Replies: 11 comments 26 replies
-
Beta Was this translation helpful? Give feedback.
-
I'm not succeeding of installing these new scripts,. tried the fileserver and observium and still getting the error message on the screenshot below. Any idea how to fix this? |
Beta Was this translation helpful? Give feedback.
-
It works now with the fileserver image but still not with observium image, what's the diference within those 2 images? |
Beta Was this translation helpful? Give feedback.
-
Observium:For all users who cannot add a device because it cannot be pinged. The problem can be solved by execute |
Beta Was this translation helpful? Give feedback.
-
I've been trying to get nextcloud turnkey working and it just wont get any dns responses. I set it to DHCP because all my other containers work fine that way, and I can assign them a reserved IP. They cannot connect to any external sites at all. So I tried static, /w 1.1.1.1 as DNS, and still same. For some reason its setting my broacast to 192.168.3 instead of 192.168.2? Possible reason? Im really not sure. The webui etc... is responsive, it just has 0 net connection. Edit: OK I figured it out, for some reason turnkey wanted to set my DNS to 100.100.100.100, I edited /etc/resolv.conf and fixed it. So weird considring I manually changed it with the menu, but it didn't take. |
Beta Was this translation helpful? Give feedback.
-
I've created a
This has streamlined the process and eliminated the need for maintaining 13 separate scripts. |
Beta Was this translation helpful? Give feedback.
-
Thanks. It got further (see below). This time only 1 unknown failure
occurred instead of two, but with the one that occurred it destroyed the
newly created container again.
…______ __ __ __ _ _______
/_ __/_ _________ / //_/__ __ __ / / | |/_/ ___/
/ / / // / __/ _ \/ ,< / -_) // / / /___> </ /__
/_/ \_,_/_/ /_//_/_/|_|\__/\_, / /____/_/|_|\___/
/___/
[INFO] Using 'local' for template storage.
[INFO] Using 'local' for container storage.
Updating LXC template list...
Creating LXC container...
Starting LXC Container...
[ERROR] ***@***.*** Unknown failure occured.
***@***.***:~#
------ Original Message ------
From: "tteckster" ***@***.***>
To: "tteck/Proxmox" ***@***.***>
Cc: "swilkey" ***@***.***>; "Comment"
***@***.***>
Sent: 4/12/2023 9:59:18 PM
Subject: Re: [tteck/Proxmox] TurnKey LXC Template Scripts (Discussion
#1742)
I think that I have the issue resolved. Would you be so kind and create
a new LXC to test?
—
Reply to this email directly, view it on GitHub
<#1742 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AB5UXTEDVUUKNCZ5JDKRSW3YHWUINAVCNFSM6AAAAAA4DDCVYWVHI2DSMVQWIX3LMV43SRDJONRXK43TNFXW4Q3PNVWWK3TUHM3TONJRHA2DG>.
You are receiving this because you commented.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
The script runs without any problems from this end.
|
Beta Was this translation helpful? Give feedback.
-
If you can tell me how to run your script with debugging turned on I can
give you the output of it step by step and you can see where it is
failing.
…------ Original Message ------
From: "tteckster" ***@***.***>
To: "tteck/Proxmox" ***@***.***>
Cc: "swilkey" ***@***.***>; "Comment"
***@***.***>
Sent: 5/12/2023 7:22:22 AM
Subject: Re: [tteck/Proxmox] TurnKey LXC Template Scripts (Discussion
#1742)
The script runs without any problems from this end.
______ __ __ __ _ _______
/_ __/_ _________ / //_/__ __ __ / / | |/_/ ___/
/ / / // / __/ _ \/ ,< / -_) // / / /___> </ /__
/_/ \_,_/_/ /_//_/_/|_|\__/\_, / /____/_/|_|\___/
/___/
[INFO] Using 'local' for template storage.
[INFO] Using 'local-lvm' for container storage.
Updating LXC template list...
Creating LXC container...
Starting LXC Container...
______ __ __ __ _ _______
/_ __/_ _________ / //_/__ __ __ / / | |/_/ ___/
/ / / // / __/ _ \/ ,< / -_) // / / /___> </ /__
/_/ \_,_/_/ /_//_/_/|_|\__/\_, / /____/_/|_|\___/
/___/
[INFO] LXC container '102' was successfully created, and its IP address is 192.168.86.253.
[INFO] Proceed to the LXC console to complete the setup.
[INFO] login: root
[INFO] password: 5Fsb9xb/wQ0=
—
Reply to this email directly, view it on GitHub
<#1742 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AB5UXTFGOKN7RUHOTU5FCGDYHYWH5AVCNFSM6AAAAAA4DDCVYWVHI2DSMVQWIX3LMV43SRDJONRXK43TNFXW4Q3PNVWWK3TUHM3TONJXGMYDK>.
You are receiving this because you commented.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
Thanks. Hopefully this is helpful.
+ cat
______ __ __ __ _ _______
/_ __/_ _________ / //_/__ __ __ / / | |/_/ ___/
/ / / // / __/ _ \/ ,< / -_) // / / /___> </ /__
/_/ \_,_/_/ /_//_/_/|_|\__/\_, / /____/_/|_|\___/
/___/
+ whiptail --backtitle 'Proxmox VE Helper Scripts' --title 'TurnKey
LXCs' --yesno 'This will allow for the creation of one of the many
TurnKey LXC Containers. Proceed?' 10 68
+ TURNKEY_MENU=()
+ MSG_MAX_LENGTH=0
+ read -r TAG ITEM
++ cat
+ OFFSET=2
+ (( 7 + OFFSET > MSG_MAX_LENGTH ))
+ MSG_MAX_LENGTH=7+OFFSET
+ TURNKEY_MENU+=("$TAG" "$ITEM " "OFF")
+ read -r TAG ITEM
+ OFFSET=2
+ (( 9 + OFFSET > MSG_MAX_LENGTH ))
+ MSG_MAX_LENGTH=9+OFFSET
+ TURNKEY_MENU+=("$TAG" "$ITEM " "OFF")
+ read -r TAG ITEM
+ OFFSET=2
+ (( 4 + OFFSET > MSG_MAX_LENGTH ))
+ TURNKEY_MENU+=("$TAG" "$ITEM " "OFF")
+ read -r TAG ITEM
+ OFFSET=2
+ (( 14 + OFFSET > MSG_MAX_LENGTH ))
+ MSG_MAX_LENGTH=14+OFFSET
+ TURNKEY_MENU+=("$TAG" "$ITEM " "OFF")
+ read -r TAG ITEM
+ OFFSET=2
+ (( 11 + OFFSET > MSG_MAX_LENGTH ))
+ TURNKEY_MENU+=("$TAG" "$ITEM " "OFF")
+ read -r TAG ITEM
+ OFFSET=2
+ (( 7 + OFFSET > MSG_MAX_LENGTH ))
+ TURNKEY_MENU+=("$TAG" "$ITEM " "OFF")
+ read -r TAG ITEM
+ OFFSET=2
+ (( 11 + OFFSET > MSG_MAX_LENGTH ))
+ TURNKEY_MENU+=("$TAG" "$ITEM " "OFF")
+ read -r TAG ITEM
+ OFFSET=2
+ (( 5 + OFFSET > MSG_MAX_LENGTH ))
+ TURNKEY_MENU+=("$TAG" "$ITEM " "OFF")
+ read -r TAG ITEM
+ OFFSET=2
+ (( 6 + OFFSET > MSG_MAX_LENGTH ))
+ TURNKEY_MENU+=("$TAG" "$ITEM " "OFF")
+ read -r TAG ITEM
+ OFFSET=2
+ (( 13 + OFFSET > MSG_MAX_LENGTH ))
+ TURNKEY_MENU+=("$TAG" "$ITEM " "OFF")
+ read -r TAG ITEM
+ OFFSET=2
+ (( 12 + OFFSET > MSG_MAX_LENGTH ))
+ TURNKEY_MENU+=("$TAG" "$ITEM " "OFF")
+ read -r TAG ITEM
+ OFFSET=2
+ (( 9 + OFFSET > MSG_MAX_LENGTH ))
+ TURNKEY_MENU+=("$TAG" "$ITEM " "OFF")
+ read -r TAG ITEM
+ OFFSET=2
+ (( 9 + OFFSET > MSG_MAX_LENGTH ))
+ TURNKEY_MENU+=("$TAG" "$ITEM " "OFF")
+ read -r TAG ITEM
+ OFFSET=2
+ (( 4 + OFFSET > MSG_MAX_LENGTH ))
+ TURNKEY_MENU+=("$TAG" "$ITEM " "OFF")
+ read -r TAG ITEM
+ OFFSET=2
+ (( 7 + OFFSET > MSG_MAX_LENGTH ))
+ TURNKEY_MENU+=("$TAG" "$ITEM " "OFF")
+ read -r TAG ITEM
+ OFFSET=2
+ (( 8 + OFFSET > MSG_MAX_LENGTH ))
+ TURNKEY_MENU+=("$TAG" "$ITEM " "OFF")
+ read -r TAG ITEM
+ OFFSET=2
+ (( 5 + OFFSET > MSG_MAX_LENGTH ))
+ TURNKEY_MENU+=("$TAG" "$ITEM " "OFF")
+ read -r TAG ITEM
+ OFFSET=2
+ (( 14 + OFFSET > MSG_MAX_LENGTH ))
+ TURNKEY_MENU+=("$TAG" "$ITEM " "OFF")
+ read -r TAG ITEM
+ OFFSET=2
+ (( 9 + OFFSET > MSG_MAX_LENGTH ))
+ TURNKEY_MENU+=("$TAG" "$ITEM " "OFF")
+ read -r TAG ITEM
+ OFFSET=2
+ (( 9 + OFFSET > MSG_MAX_LENGTH ))
+ TURNKEY_MENU+=("$TAG" "$ITEM " "OFF")
+ read -r TAG ITEM
+ OFFSET=2
+ (( 10 + OFFSET > MSG_MAX_LENGTH ))
+ TURNKEY_MENU+=("$TAG" "$ITEM " "OFF")
+ read -r TAG ITEM
++ tr -d '"'
++ whiptail --backtitle 'Proxmox VE Helper Scripts' --title 'TurnKey
LXCs' --radiolist '\nSelect a TurnKey LXC to create:\n' 16 74 6 ansible
'Ansible ' OFF bookstack 'BookStack ' OFF core 'Core ' OFF
faveo-helpdesk 'Faveo Helpdesk ' OFF fileserver 'File Server ' OFF
gallery 'Gallery ' OFF gameserver 'Game Server ' OFF gitea 'Gitea ' OFF
gitlab 'GitLab ' OFF invoice-ninja 'Invoice Ninja ' OFF mediaserver
'Media Server ' OFF nextcloud 'Nextcloud ' OFF observium 'Observium '
OFF odoo 'Odoo ' OFF openvpn 'OpenVPN ' OFF owncloud 'ownCloud ' OFF
phpbb 'phpBB ' OFF torrentserver 'Torrent Server ' OFF wireguard
'WireGuard ' OFF wordpress 'Wordpress ' OFF zoneminder 'ZoneMinder ' OFF
+ turnkey=nextcloud
+ '[' -z nextcloud ']'
++ openssl rand -base64 8
+ PASS=gNE05GvOiBQ=
++ pvesh get /cluster/nextid
+ CTID=105
+ PCT_OPTIONS='
-features keyctl=1,nesting=1
-hostname turnkey-nextcloud
-tags proxmox-helper-scripts
-onboot 1
-cores 2
-memory 2048
-password gNE05GvOiBQ=
-net0 name=eth0,bridge=vmbr0,ip=dhcp
-unprivileged 1
'
+ DEFAULT_PCT_OPTIONS=(-arch $(dpkg --print-architecture))
++ dpkg --print-architecture
++ select_storage template
++ local CLASS=template
++ local CONTENT
++ local CONTENT_LABEL
++ case $CLASS in
++ CONTENT=vztmpl
++ CONTENT_LABEL='Container template'
++ local -a MENU
++ read -r line
+++ pvesm status -content vztmpl
+++ awk 'NR>1'
+++ echo local dir active 959318096 457403764 453109932 47.68%
+++ awk '{print $1}'
++ local TAG=local
+++ echo local dir active 959318096 457403764 453109932 47.68%
+++ awk '{printf "%-10s", $2}'
++ local 'TYPE=dir '
+++ echo local dir active 959318096 457403764 453109932 47.68%
+++ numfmt --field 4-6 --from-unit=K --to=iec --format %.2f
+++ awk '{printf( "%9sB", $6)}'
++ local 'FREE= 422.00GB'
++ local 'ITEM= Type: dir Free: 422.00GB '
++ local OFFSET=2
++ [[ 38 -gt 14+OFFSET ]]
++ local MSG_MAX_LENGTH=38
++ MENU+=("$TAG" "$ITEM" "OFF")
++ read -r line
++ '[' 1 -eq 0 ']'
++ '[' 1 -eq 1 ']'
++ printf local
+ TEMPLATE_STORAGE=local
+ info 'Using '\''local'\'' for template storage.'
+ local 'REASON=Using '\''local'\'' for template storage.'
+ local 'FLAG=\e[36m[INFO]\e[39m'
+ msg '\e[36m[INFO]\e[39m Using '\''local'\'' for template storage.'
+ local 'TEXT=\e[36m[INFO]\e[39m Using '\''local'\'' for template
storage.'
+ echo -e '\e[36m[INFO]\e[39m Using '\''local'\'' for template storage.'
[INFO] Using 'local' for template storage.
++ select_storage container
++ local CLASS=container
++ local CONTENT
++ local CONTENT_LABEL
++ case $CLASS in
++ CONTENT=rootdir
++ CONTENT_LABEL=Container
++ local -a MENU
++ read -r line
+++ pvesm status -content rootdir
+++ awk 'NR>1'
+++ echo local dir active 959318096 457403764 453109932 47.68%
+++ awk '{print $1}'
++ local TAG=local
+++ echo local dir active 959318096 457403764 453109932 47.68%
+++ awk '{printf "%-10s", $2}'
++ local 'TYPE=dir '
+++ echo local dir active 959318096 457403764 453109932 47.68%
+++ numfmt --field 4-6 --from-unit=K --to=iec --format %.2f
+++ awk '{printf( "%9sB", $6)}'
++ local 'FREE= 422.00GB'
++ local 'ITEM= Type: dir Free: 422.00GB '
++ local OFFSET=2
++ [[ 38 -gt 14+OFFSET ]]
++ local MSG_MAX_LENGTH=38
++ MENU+=("$TAG" "$ITEM" "OFF")
++ read -r line
++ '[' 1 -eq 0 ']'
++ '[' 1 -eq 1 ']'
++ printf local
+ CONTAINER_STORAGE=local
+ info 'Using '\''local'\'' for container storage.'
+ local 'REASON=Using '\''local'\'' for container storage.'
+ local 'FLAG=\e[36m[INFO]\e[39m'
+ msg '\e[36m[INFO]\e[39m Using '\''local'\'' for container storage.'
+ local 'TEXT=\e[36m[INFO]\e[39m Using '\''local'\'' for container
storage.'
+ echo -e '\e[36m[INFO]\e[39m Using '\''local'\'' for container
storage.'
[INFO] Using 'local' for container storage.
+ msg 'Updating LXC template list...'
+ local 'TEXT=Updating LXC template list...'
+ echo -e 'Updating LXC template list...'
Updating LXC template list...
+ pveam update
+ mapfile -t TEMPLATES
++ pveam available -section turnkeylinux
++ awk -v turnkey=nextcloud '$0 ~ turnkey {print $2}'
++ sort -t - -k 2 -V
+ '[' 1 -gt 0 ']'
+ TEMPLATE=debian-12-turnkey-nextcloud_18.0-1_amd64.tar.gz
+ pveam list local
+ grep -q debian-12-turnkey-nextcloud_18.0-1_amd64.tar.gz
+ PCT_OPTIONS=(${PCT_OPTIONS[@]:-${DEFAULT_PCT_OPTIONS[@]}})
+ [[ -features keyctl=1,nesting=1 -hostname turnkey-nextcloud -tags
proxmox-helper-scripts -onboot 1 -cores 2 -memory 2048 -password
gNE05GvOiBQ= -net0 name=eth0,bridge=vmbr0,ip=dhcp -unprivileged 1 =~
-rootfs ]]
+ PCT_OPTIONS+=(-rootfs $CONTAINER_STORAGE:${PCT_DISK_SIZE:-8})
+ msg 'Creating LXC container...'
+ local 'TEXT=Creating LXC container...'
+ echo -e 'Creating LXC container...'
Creating LXC container...
+ pct create 105
local:vztmpl/debian-12-turnkey-nextcloud_18.0-1_amd64.tar.gz -features
keyctl=1,nesting=1 -hostname turnkey-nextcloud -tags
proxmox-helper-scripts -onboot 1 -cores 2 -memory 2048 -password
gNE05GvOiBQ= -net0 name=eth0,bridge=vmbr0,ip=dhcp -unprivileged 1
-rootfs local:8
+ echo 'TurnKey nextcloud password: gNE05GvOiBQ='
+ msg 'Starting LXC Container...'
+ local 'TEXT=Starting LXC Container...'
+ echo -e 'Starting LXC Container...'
Starting LXC Container...
+ pct start 105
+ sleep 5
+ set +e
+ max_attempts=5
+ attempt=1
+ IP=
+ [[ 1 -le 5 ]]
++ pct exec 105 ip a show dev eth0
++ grep -oP 'inet \K[^/]+'
+ IP=
++ EXIT=1
++ LINE=212
++ error_exit
++ trap - ERR
++ local 'DEFAULT=Unknown failure occured.'
++ local 'REASON=\e[97mUnknown failure occured.\e[39m'
++ local 'FLAG=\e[91m[ERROR] ***@***.***'
++ msg '\e[91m[ERROR] ***@***.*** \e[97mUnknown failure occured.\e[39m'
++ local 'TEXT=\e[91m[ERROR] ***@***.*** \e[97mUnknown failure
occured.\e[39m'
++ echo -e '\e[91m[ERROR] ***@***.*** \e[97mUnknown failure
occured.\e[39m'
[ERROR] ***@***.*** Unknown failure occured.
++ '[' '!' -z 105 ']'
++ cleanup_ctid
++ pct status 105
+++ pct status 105
+++ awk '{print $2}'
++ '[' running == running ']'
++ pct stop 105
++ pct destroy 105
++ exit 1
***@***.***:~#
…------ Original Message ------
From: "tteckster" ***@***.***>
To: "tteck/Proxmox" ***@***.***>
Cc: "swilkey" ***@***.***>; "Comment"
***@***.***>
Sent: 5/12/2023 8:52:53 AM
Subject: Re: [tteck/Proxmox] TurnKey LXC Template Scripts (Discussion
#1742)
Use the set -x option
bash -c "set -x; $(wget -qLO - https://github.com/tteck/Proxmox/raw/main/turnkey/turnkey.sh)"
—
Reply to this email directly, view it on GitHub
<#1742 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AB5UXTFLTXKC2JIEFSF7WPDYHZA3LAVCNFSM6AAAAAA4DDCVYWVHI2DSMVQWIX3LMV43SRDJONRXK43TNFXW4Q3PNVWWK3TUHM3TONJYGA4DM>.
You are receiving this because you commented.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
Thanks. The interesting thing I found was that it was getting the IP
address correctly, but it was just throwing an error when checking the
address. Made me think that there must be some assumption made when
checking it that isn't being satisfied.
…On Tue, Dec 5, 2023, 9:42 PM tteckster ***@***.***> wrote:
I've seen this before, checking for an IP address is throwing an error. I
turned off all error checking for that snippet. Hopefully this resolves
your issue.
—
Reply to this email directly, view it on GitHub
<#1742 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AB5UXTG5JOW3UOPJ6HSDC5TYH33CVAVCNFSM6AAAAAA4DDCVYWVHI2DSMVQWIX3LMV43SRDJONRXK43TNFXW4Q3PNVWWK3TUHM3TONRTGE2TK>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Primitive scripts to install TurnKey LXC templates using basic settings.
Resource and network settings are adjustable post LXC creation.
More can be added on request.
I would like to keep the TurnKey scripts as simple as possible (single file) with few options (if any).
The script creates a
*.creds
file in the Proxmox root directory with the password of the newly created TurnKey LXC.To view the password:
Beta Was this translation helpful? Give feedback.
All reactions