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
underguestOsFeatures
.You can also check if the VM was created with the
nic-type
set togVNIC
. 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
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
Check that the driver is loaded.
lsmod | grep gve
The output should resemble the following:
gve 49152 0
Windows
- Connect to instance through SAC.
- Login with your username and password.
From the command prompt, run the following command:
dism /online /get-drivers | findstr gvnic
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.
- If the driver is installed, you should see the text
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.