How to detect that a server is a Proxmox 4 (LXC) host

grobs

Active Member
Apr 1, 2016
56
0
26
37
France
Hi everyone,

In Proxmox 3 (and before), detecting that we were in a Proxmox host was easy by issuing commands like "ls /proc/vz/version" (which only reside in hosts and not in guests).

Is there a simple way like this to know if we are on a Proxmox 4 (LXC) host without using some tools like virt-what, system_profiler and other none system core commands?

Regards,
Tom
 
Last edited:
I don't know but maybe you would like to broadcast to with avahi?

Code:
cat /etc/avahi/services/http_proxmox.service
<?xml version="1.0" standalone='no'?>
<!DOCTYPE service-group SYSTEM "avahi-service.dtd">
<service-group>
  <name replace-wildcards="Proxmox Virtualization on %h</name> ## Name of the Bookmark
  <service>
    <type>_https._tcp</type>
    <port>8006</port>
    <txt-record>path=/</txt-record> ## Path 
  </service>
</service-group>

Then you in Webrowser like Epihany or filebrowser like dolphin this service and you can use it directly. Also available with CMDtools like "avahi-browser".
 
I think I misunderstood your message grobs. You want to know if you're on a proxmox HOST not inside a guest in Proxmox. The lxc was misleading for me.

There are multiple ways to check
  • What if you try to check if there is a /etc/pve directory?
  • Installed pve-packages
  • activated pve repository
  • special versions of standard packages.
  • running pve processes
  • As fireon already mentioned, opened 8006 port
Then you know, that you're on a Proxmox host.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!