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