What are physical difference between a container and vm

vkosuri

New Member
Jan 8, 2020
13
0
1
Hyderabad
vkosuri.github.io
Hi,

I am new to virtualization

My question is: How do I find I am working a container or VM machine, is there a way to find? by looking physical difference for example /etc/os-release, or uname etc.

And please share any documentation.
 
Hi,

My question is: How do I find I am working a container or VM machine, is there a way to find? by looking physical difference for example /etc/os-release, or uname etc.

As CTs share the kernel with the host the uname -a can be some indicator for running inside a Proxmox VE based Container, albeit it isn't 100% fail save (a VM can run those kernel also):
uname -a

The init process normally has some hints in it's environment if it runs in a CT:
grep -a container=lxc /proc/1/environ

Depending if you run into a unprivileged or privileged CT the CT behaves a bit different, in the end there's always some way to tell if being in a CT.

And please share any documentation.

https://pve.proxmox.com/pve-docs/chapter-qm.html
https://pve.proxmox.com/pve-docs/chapter-pct.html
 

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!