VHM and Google Compute Engine
You can use a virtual host manager (VHM) to gather instances from Google Compute Engine (GCE).
The VHM allows SUSE Manager to obtain and report information about your virtual machines. For more information on VHMs, see Virtual Host Managers.
1. Prerequisites
The VHM you create needs to have the correct permissions assigned to access the GCE VM.
Log in to your Google Cloud Platform account as an administrator, and use the Cloud Identity and Access Management (IAM) tool to ensure that the service account has the appropriate roles.
2. Create a GCE VHM
The Virtual Host Manager (VHM) runs on the SUSE Manager Server.
To run a VHM, your SUSE Manager Server needs to have port 443 open, to access the clients.
Ensure you have installed the virtual-host-gatherer-libcloud package on the SUSE Manager Server.
Before you begin, log in to the GCE panel, and download a certificate file. Store this file locally on your SUSE Manager Server, and take note of the path.
-
In the SUSE Manager Web UI, navigate to .
-
Click Create and select
Google Compute Enginefrom the drop-down menu. -
In the
Add a Google Conpute Engine Virtual Host Managersection, use these parameters:-
In the
Labelfield, type a custom name for your VHM. -
In the
Service Account Emailfield, type the email address associated with your service account. -
In the
Cert Pathfield, type the local path on the SUSE Manager Server to the key that you downloaded from the GCE panel. -
In the
Project IDfield, type the project ID used by the GCE instance. -
In the
Zonefield, type the zone your VM is located in. This is required for subscription matching to work.
-
-
Click Create to save your changes and create the VHM.
-
On the
Virtual Host Managerspage, select the new VHM. -
On the
Propertiespage, click Refresh Data to inventory the new VHM.
To see which objects and resources have been inventoried, navigate to .
3. Assigning Permissions
If the permissions are not set correctly, you might receive an error like this when you run virtual-host-gatherer:
ERROR: {'domain': 'global', 'reason': 'forbidden', 'message': "Required 'compute.zones.list' permission for 'projects/project-id'"}
ERROR: Could not connect to the Google Compute Engine Public Cloud using specified credentials.
To determine the correct credentials, run this command at the prompt on the SUSE Manager Server:
virtual-host-gatherer -i input_google.json -o out_google.json -vvv
The input_google.json file should contain this information:
[
{
"id": "google_vhm",
"module": "GoogleCE",
"service_account_email": "mail@example.com",
"cert_path": "secret-key",
"project_id": "project-id",
"zone": "zone"
}
]
4. GCE UUID
Instances running on the Google public cloud report this UUID to SUSE Manager Server:
152986662232938449