Troubleshooting Google Virtual NIC


Here are some tips to help troubleshoot Google Virtual NIC (gVNIC).

Common errors

The following issue occurs when the image used to create the VM is not tagged to use gVNIC.

ERROR: (gcloud.compute.instances.create) Could not fetch resource:
 - Invalid value for field 'resource.networkInterfaces[0].nicType': 'GVNIC'. NetworkInterface NicType can only be set to GVNIC on instances with GVNIC GuestOsFeature.

To resolve this issue, ensure that you are using an image that is tagged to use gVNIC. For more information, see Create a custom image.

Other issues

VM instance didn't boot

  • Cause: gVNIC is not enabled on the image.

  • Diagnosis: Check that the image has gVNIC enabled. To verify, run the following command:

    gcloud compute images describe IMAGE_NAME

    Replace IMAGE_NAME with the name of your image.

    The output of the command should show GVNIC under guestOsFeatures.

    You can also check if the VM was created with the nic-type set to gVNIC. To do this run the following command:

    gcloud compute instances describe VM_NAME

    Replace VM_NAME with the name of your VM.

  • Resolution: Ensure that you are using a supported image or that you have properly set up the gVNIC driver on your custom image.

VM instance booted but is not reachable over the network

  • Cause: gVNIC was not successfully installed and loaded.

  • Diagnosis: To check if the driver was installed and loaded, complete the following steps:

    Linux

    1. Check that the driver is installed.

      modinfo gve

      The output should resemble the following:

      filename:       /lib/modules/4.15.0-1036-gcp/updates/dkms/gve.ko
      version:        1.1.0
      license:        Dual MIT/GPL
      description:    gVNIC Driver
      author:         Google, XXX.
      srcversion:     5FEFB9DD945EB2DEC94EE09
      alias:          pci:v00001AE0d00000042sv*sd*bc*sc*i*
      depends:
      retpoline:      Y
      name:           gve
      vermagic:       4.15.0-1036-gcp SMP mod_unload
      
    2. Check that the driver is loaded.

      lsmod | grep gve

      The output should resemble the following:

      gve                    49152  0

    Windows

    1. Connect to instance through SAC.
    2. Login with your username and password.
    3. From the command prompt, run the following command:

      dism /online /get-drivers | findstr gvnic
    4. Review the result.

      • If the driver is installed, you should see the text Original File Name : gvnic.inf in the output.
      • If the driver is not installed, no message is returned.
  • Resolution: If gVNIC is not available, ensure that you are using a supported image or that you have properly set up gVNIC on your custom image.

Poor networking throughput for Windows Server 2022 and Windows 11 VMs

You might experience poor networking throughput when using Google Virtual NIC (gVNIC) with Windows Server 2022 and Windows 11 VMs that use gVNIC driver GooGet package version 1.0.0@44 or earlier.

To resolve this issue, update the gVNIC driver GooGet package to version 1.0.0@45 or later by doing the following:

  1. Check which driver version is installed on your VM by running the following command from an administrator Command Prompt or Powershell session:

    googet installed
    

    The output looks similar to the following:

    Installed packages:
      ...
      google-compute-engine-driver-gvnic.x86_64 VERSION_NUMBER
      ...
    
  2. If the google-compute-engine-driver-gvnic.x86_64 driver version is 1.0.0@44 or earlier, update the update the GooGet package repository by running the following command from an administrator Command Prompt or Powershell session:

    google-compute-engine-driver-gvnic.x86_64