This page provides an overview of OS inventory management. For information on setting up and using OS inventory management, see Viewing operating system details.
Use OS inventory management to collect operating system and package information that is stored as guest attributes on the Compute Engine metadata server. You can then query these guest attributes to retrieve information about the operating system that is running on a virtual machine (VM) instance.
When to use OS inventory management
OS inventory management can be used to complete the following tasks:
- Identifying VMs that are running a specific version of an operating system.
- Viewing packages that are installed on a VM.
- Generating a list of package updates that are available for each VM.
- Identifying missing packages, updates, or patches for a VM.
Pricing
For information about pricing, see VM Manager pricing.
How OS inventory management works
When OS inventory management is enabled, the OS Config agent runs an inventory scan to collect data, and then sends this information to the metadata server and various log streams. This scan runs every 10 minutes on the VM.
How the data is collected
For Linux VMs, the OS Config agent runs on the VM and parses
the /etc/os-release
, or the equivalent file for the Linux distribution to
gather operating system details. The OS Config agent also uses package
managers such as apt
, yum
, or
GooGet to collect information about the
installed packages and available updates for the instance.
For Windows VMs, the OS Config agent uses the Windows system APIs to collect the OS information details. The Windows Update agent is also used to find the installed and available updates.
Where the data is stored
Inventory data is stored as
guest attributes
under the guestInventory
namespace. The contents for the installed packages
and package updates are compressed using gzip and then base64 encoded to save
space.
Logging
During the collection and storage of data, the OS Config agent writes activity logs to the various log streams on Compute Engine. These include:
- The serial port
- System logs - Windows event log and Linux syslog
- Standard streams - stdout
- Cloud Logging logs - These logs are only available if Cloud Logging is enabled on the VM instance.
Information provided by OS inventory management
Operating system information
OS inventory management can provide the following information about the operating system that is running on your VM instance:
- Hostname
- LongName - The detailed operating system name. For example,
Microsoft Windows Server 2016 Datacenter
. - ShortName - The short form of the operating system name. For example,
Windows
. - Kernel version
- OS architecture
- OS version
- OS Config agent version
- Last updated - A timestamp of the last time the agent successfully scanned the system and updated the guest attributes with OS Inventory data.
Installed package information
The following table summarises the installed package information that OS inventory management provides.
Operating system | Package manager | Available fields |
---|---|---|
Linux and Windows Server | Installed package information is available from the following
package managers:
|
For each installed package the following information is provided:
|
Windows Server | Windows update agent | The following fields are listed for the
Windows updates:
|
Windows Server | Windows Quick Fix Engineering updates | The following fields are listed for the
QuickFixEngineering updates
|
1This field is hidden in the default
gcloud compute instances os-inventory describe
command-line output.
To view this field you must view the output in the JSON format. To view the
output in JSON format, append the --format=JSON
to the gcloud
command. For more
information about output formatting, review
gcloud topic formats
.
Available package updates information
The following table summarises the package update information that OS inventory management provides.
Operating system | Package manager | Available fields |
---|---|---|
Linux and Windows Server | Package update information is available from the following package managers:
|
For each package update that is available the following information is provided:
|
Windows Server | Windows update agent | The following fields are listed for the
Windows updates:
|
1This field is hidden in the default
gcloud compute instances os-inventory describe
command-line output.
To view this field you must view the output in the JSON format. To view the
output in JSON format, append the --format=JSON
to the gcloud
command. For more
information about output formatting, review
gcloud topic formats
.
What's next
- Use the OS inventory management tool to view operating system details.