Reputation: 41
I have just created a server in GCP. It is a Ubuntu that i want to use with GNS3. The problem is that machines created in GCP does not have KVM support. Is there sone way to use it in GCP? Regards!!
Upvotes: 4
Views: 4927
Reputation: 1292
The GCP Compute Engine supports KVM virtualization module but isn't super clear about how to actually create the instance. Here is a concrete way to create a cloud instance that supports KVM.
gcloud compute instances create kvm1 \
--zone=us-central1-a \
--min-cpu-platform="Intel Haswell" \
--image-project=ubuntu-os-cloud \
--image=ubuntu-2004-focal-v20220610 \
--boot-disk-size 200GB \
--machine-type=n1-standard-16 \
--enable-nested-virtualization
After creating the instance I SSHd into the machine to verify that KVM can be used:
>> ls /dev/kvm
/dev/kvm
>> egrep -c '(vmx|svm)' /proc/cpuinfo
32
>> sudo apt install cpu-checker
>> sudo kvm-ok
INFO: /dev/kvm exists
KVM acceleration can be used
This worked for my use-case of building AOSP.
Upvotes: 7
Reputation: 251
For now GCP Compute Engine supports KVM based nested virtualization - check docs here.
Upvotes: 2