Guest environment

This document describes the steps to configure and manage a guest environment on a virtual machine (VM) instance in Google Distributed Cloud (GDC) air-gapped.

The Distributed Cloud guest environment is a necessary component to configure SSH keys on your virtual machines (VM) to both connect and transfer files remotely. You must have the guest environment before you connect to a VM and transfer files, where you configure the SSH keys and use the secure copy (SCP) command-line tool. The guest environment is installed and enabled by default on all GDC VMs.

This document is for developers in platform administrator or application operator groups that manage the guest environment for VMs in a Distributed Cloud environment. For more information, see Audiences for GDC air-gapped documentation.

Request IAM roles

To manage the guest environment in a VM system within the project namespace, contact your Project IAM Admin to request the Virtual Machine Project Admin (project-vm-admin) role.

All VM roles must bind to the namespace of the project where the VM resides. Follow the steps to verify your access.

Disable access management

Follow these steps to disable the access management feature while keeping the guest environment enabled:

  1. Stop your VM.
  2. Edit the VM spec field:

    kubectl --kubeconfig MANAGEMENT_API_SERVER \
      -n VM_NAMESPACE \
      edit virtualmachines.virtualmachine.gdc.goog VM_NAME
    

    Replace VM_NAME with your VM name, and VM_NAMESPACE with your VM namespace.

  3. Add the following fields to the spec field:

    apiVersion: virtualmachine.gdc.goog/v1
    kind: VirtualMachine
    metadata:
      name: vm-example
      namespace: project-example
    spec:
      guestEnvironment:
        accessManagement:
          enable: false
    

    The name field contains your VM name, and the namespace field contains your VM namespace.

  4. Restart your VM.