How to identify if my CentOS has virtual server into it

Support for security such as Firewalls and securing linux
Post Reply
cadesa
Posts: 3
Joined: 2022/10/09 04:35:52

How to identify if my CentOS has virtual server into it

Post by cadesa » 2022/10/09 04:45:34

Hello community,

Beforehand thank you for your answers.

Context:
Some months ago the company fired the person in charge of IT and good/sadly I am support them while they hired a new one, into the "transition" that the company requested to him was that he needed to left the credentials and the information of where are the servers installed, until here all good but this person just f**k up with all and left mixed and "wrong" information and just extended many things to not provide the correct information so, right now we can't we into some servers because he didn't left some credentials and some locations of the servers or how he "start again" those servers when he got errors (and he got a lot); you can think you have an issue and a bad transition, and yes but right now we want to solve, so all the blames we will accepted.

----

With this context I am very worried because we can't identify some servers, I can't get where the server is (host) because we have the IP but when we looked for them there are not into the servers farm, so we expect that these servers are virtualized or in some cases dockerized (this is the least) and my question is how can I identify or find this servers into CentOS?

I was looking for docker but when I executed "docker info" I didn't get any container upload and I don't know how to look for virtual servers into CentOS.

Please let me know if you need more information.

Thank you,

User avatar
TrevorH
Site Admin
Posts: 33215
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: How to identify if my CentOS has virtual server into it

Post by TrevorH » 2022/10/09 10:55:56

Can you ssh to the "lost" ip addresses and get a response (even if it says "Go away")? What sort of ip address is it? Is it a public one or a private one (known as an RFC1918 address and in the ranges 10.0.0.0 to 10.255.255.255, 192.168.0.0 to 192.168.255.255, or 172.16.0.0 to 172.31.255.255)?

Also look to see if you packages called libvirt or qemu-kvm installed (rpm -q libvirt qemu-kvm)
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

cadesa
Posts: 3
Joined: 2022/10/09 04:35:52

Re: How to identify if my CentOS has virtual server into it

Post by cadesa » 2022/10/09 18:24:53

Hello TrevorH,

Below my answers

1. Yes I can while the server does not fail (somedays the server does not response)
2. one of them is 192.168.100.0 (many hosts have this range) and the other one is 172.17.2.0 and I didn't identify any other server with this ip range.

When I ran the instruction rpm -q libvirt qemu-kvm the results were:

libvirt-4.5.0-36.el7_9.3.x86_64
qemu-kvm-1.5.3-175.el7_9.1.x86_64

What kind of action can I take from this point?

Thank you

User avatar
TrevorH
Site Admin
Posts: 33215
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: How to identify if my CentOS has virtual server into it

Post by TrevorH » 2022/10/09 19:11:28

2. one of them is 192.168.100.0 (many hosts have this range) and the other one is 172.17.2.0 and I didn't identify any other server with this ip range.
So that means these are all internal servers as that ip range will not route across the internet.

Since you have libvirt/qemu-kvm installed, try running virsh list as root on the physical server in question. You can also run virt-what and if it produces no output then the linux machine you are on is a physical one. If it's a VM then it will tell you so. If it's not a VM then it says nothign at all.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

cadesa
Posts: 3
Joined: 2022/10/09 04:35:52

Re: How to identify if my CentOS has virtual server into it

Post by cadesa » 2022/10/10 00:27:33

Hi,
I ran the instructions that you advised me with the follow result:

host (centos) (image host)
supposed virtualized (image guest)

So, in some moment those virtual must be up but here is not the image (or do I not looking correctly?)

Thanks
Attachments
image guest.png
image guest.png (27.98 KiB) Viewed 12379 times
image host.png
image host.png (13.93 KiB) Viewed 12379 times

User avatar
TrevorH
Site Admin
Posts: 33215
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: How to identify if my CentOS has virtual server into it

Post by TrevorH » 2022/10/10 10:07:14

From the bottom screenshot where you ran as root, no output from virt-what means it is a physical machine. No output from virsh list means it has no VMs running.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

User avatar
jlehtone
Posts: 4530
Joined: 2007/12/11 08:17:33
Location: Finland

Re: How to identify if my CentOS has virtual server into it

Post by jlehtone » 2022/10/10 10:50:44

The machine 'app2' is not a CentOS, because it mentions command 'apt' that is typical for Debian-family of distros.

The libvirt is virtualization that one can install from CentOS repos. Some admins do use third-party virtualization, like virtualbox.

You could run "ip ro" on every machine that you have (access to). On normal desktop you see something like:

Code: Select all

default via a.b.c.254 dev eth0
a.b.c.0/24 dev eth0 proto kernel scope link src a.b.c.123
If you have many more routes, then machine might have VM's and/or containers.

Post Reply