The issue is here in this line:
...
if [ "$(grep -zi '^container=.\+$' /proc/1/environ )" != "" ]; then
...
The issue is here in this line:
...
if [ "$(grep -zi '^container=.\+$' /proc/1/environ )" != "" ]; then
...
If you go to /var/lib/dpkg/info, you can find the script itself.
My concern is container detection is long-stable code. I donāt understand why it would suddenly change.
[chuck@lizum ~.1999]$ cd /var/lib/dpkg/info/
[chuck@lizum info.2000]$ ls plex*
plexmediaserver.list plexmediaserver.postinst* plexmediaserver.preinst*
plexmediaserver.md5sums plexmediaserver.postrm* plexmediaserver.prerm*
[chuck@lizum info.2001]$
# Independently, evaluate if in a LXC. This is used later in installation to avoid UDEV trigger bug
# Look only for a the prefix 'container='. No further refinement needed as docker already handled above.
if [ "$(grep -zi '^container=.\+$' /proc/1/environ )" != "" ]; then
LinuxContainer=1
fi
I just opened a LXC. I found it but not sure why yet.
root@media:~# LinuxContainer=0
root@media:~# if [ "$(grep -zi '^container=.\+$' /proc/1/environ )" != "" ]; then
> LinuxContainer=1
> fi
bash: warning: command substitution: ignored null byte in input
root@media:~# if [ "$(grep -Zi '^container=.\+$' /proc/1/environ )" != "" ]; then LinuxContainer=1; fi
root@media:~#
TERM=linuxcontainer=lxccontainer_ttys=pts/1 pts/2
And here is the reason, why there is this warning here:
https://lists.gnu.org/archive/html/bug-bash/2016-09/msg00015.html
hereās what you get from cat /proc/1/environ
root@media:~# cat /proc/1/environ
container=lxcroot@media:~#
Notice itās null terminated.
Iām looking for container=.
Reading ā Wonderful. Bash changed.
Isnāt this better?
# grep -zq "container=lxc" /proc/1/environ && echo LXC || echo notLXC
LXC
Because in my proc/1/environ (see previous comment) the line with container begins with ālinuxcontainerā.
I have this LXC on proxmox 7-2.7.
Are the choices Zi or zq ?
Proxmox is its own beast. Itās a BEAR to support and why we canāt
q is just for quiet. i is for ignore upper or lower case. Iām not sure about zā¦
If you generlize the line, it should just for proxmox LXCs also. nothing to support proxmox specific here.
Do you know a way for me to get Proxmox into a standard (ESXi) VM?
Yeah, just create a normal VM or a VM in Virtualbox.
Here are some links for you:
https://pve.proxmox.com/wiki/Proxmox_VE_inside_VirtualBox
I have VMware Workstation and ESXi (on the big machine). Proxmox is too smart for Workstation.
It should be similar, just create a VM with a minimal storage (1 virtual drive) and install it over a BIOS (or EFI, as it supports it too).
Edit: One more link for ESXi
Any licensing required?
No, you can use community license and the community repositories.
Thanks. I will try this again. Last I tried it was Proxmox 6.
Itās even better now. Let me know, if you need something with your proxmox setup.
For the LXC, I used the default debian11 image:
![]()
I will. Iāll also setup a Ubuntu LXC because that is another common one