Monitoring and reporting for Veeam Data Platform
Post Reply
wane
Enthusiast
Posts: 39
Liked: 5 times
Joined: Jun 26, 2020 9:47 pm
Full Name: Walter Neu
Contact:

How to get Ubuntu version

Post by wane »

We need to finde out which ubuntu version is running inside a vm.
Currently we are only able to find out the OS type, i.e. Ubuntu. But we need a report about the OS version, for example 12.04, 20.04 and so on.
Is this possible with VeeamONE or maybe with a Powershell script (Invoke-VMScript cmdlet)?

Best thanks
nielsengelen
Product Manager
Posts: 5635
Liked: 1181 times
Joined: Jul 15, 2013 11:09 am
Full Name: Niels Engelen
Contact:

Re: How to get Ubuntu version

Post by nielsengelen »

You'll have to use a script that runs "lsb_release -a" on the guest to return the details of it.

It will show things like this:

Code: Select all

No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 18.04 LTS
Release:    18.04
Codename:   bionic
Personal blog: https://foonet.be
GitHub: https://github.com/nielsengelen
jorgedlcruz
Veeam Software
Posts: 1369
Liked: 617 times
Joined: Jul 17, 2015 6:54 pm
Full Name: Jorge de la Cruz
Contact:

Re: How to get Ubuntu version

Post by jorgedlcruz »

Hello Walter,
I have checked, and we are not collecting this value in Veeam ONE; we collect the Guest OS type, but we do not take the granular OS version. I think it is a good idea and it is noted for future releases.

Alternatively you can do this using PowerCLI - https://communities.vmware.com/t5/VMwar ... -p/2686309

Thanks a lot!
Jorge de la Cruz
Senior Product Manager | Veeam ONE @ Veeam Software

@jorgedlcruz
https://www.jorgedelacruz.es / https://jorgedelacruz.uk
vExpert 2014-2024 / InfluxAce / Grafana Champion
RomanK
Veeam Software
Posts: 640
Liked: 167 times
Joined: Nov 01, 2016 11:26 am
Contact:

Re: How to get Ubuntu version

Post by RomanK »

Hello Walter,

The maximum we have there at the moment is general OS data like that in the "Custom Infrastructure" report.
Image

Veeam ONE is using VMware API to collect the information. When VMware tools are installed GuestInfo is populated and we get guestFullName property. For Ubuntu, it would be the "Ubuntu Linux (64-bit)" string or similar.
Image

As far as I know, PowerCLI scripts would return the same property ("Guest.GuestFullName") as we collect. Scripts from the inside OS are the only way to get version numbers at the moment.

Thanks.
jorgedlcruz
Veeam Software
Posts: 1369
Liked: 617 times
Joined: Jul 17, 2015 6:54 pm
Full Name: Jorge de la Cruz
Contact:

Re: How to get Ubuntu version

Post by jorgedlcruz »

Hello,
Roman is right, we do not get any more information than what VMware gives us. We could try to get some more information using PowerCLI and guest user/pass, which we use for other purposes today, we will take a look.

For your current need, this should work without issues, a little bit of PowerCLI + the shell command Niels mentioned above:

Code: Select all

Get-VM YOURVM | Invoke-VMScript -ScriptType Bash -ScriptText "lsb_release -a" -GuestUser YOURUSERNAMEFORTHISOS -GuestPassword YOURPPASSFORTHISOS

ScriptOutput
-----------------------------------------------------------------------------------------------------------------------
|  No LSB modules are available.
|  Distributor ID:      Ubuntu
|  Description: Ubuntu 20.04.1 LTS
|  Release:     20.04
|  Codename:    focal
|
-----------------------------------------------------------------------------------------------------------------------
A combination of everything, and with a proper scripting and looping, you can get all the details of all your Linux VMs, as long as they have a common username/pass, and it is same Distro.

Hope it helps.
Jorge de la Cruz
Senior Product Manager | Veeam ONE @ Veeam Software

@jorgedlcruz
https://www.jorgedelacruz.es / https://jorgedelacruz.uk
vExpert 2014-2024 / InfluxAce / Grafana Champion
Post Reply

Who is online

Users browsing this forum: No registered users and 16 guests