简体   繁体   English

在 Google Kubernetes Engine 集群上启用 VMX/SVM

[英]Enable VMX/SVM on Google Kubernetes Engine Cluster

I have GKE cluster (Master version: 1.14.10-gke.24).我有GKE集群(主版本:1.14.10-gke.24)。

I'm trying to run the following container (Android-Emulator): https://github.com/budtmo/docker-android .我正在尝试运行以下容器(Android-Emulator): https : //github.com/budtmo/docker-android

*I just create yaml deployment file for this. *我只是为此创建了 yaml 部署文件。

After I running my deploy and try to run new android emulator inside the pod using:在我运行部署并尝试使用以下命令在 pod 内运行新的 android 模拟器后:

emulator @samsung_galaxy_s8_8.0

I got the following error:我收到以下错误:

emulator: ERROR: x86 emulation currently requires hardware acceleration!模拟器:错误:x86 模拟当前需要硬件加速!

Please ensure KVM is properly installed and usable.请确保 KVM 已正确安装并可使用。

CPU acceleration status: KVM requires a CPU that supports vmx or svm CPU加速状态:KVM需要支持vmx或svm的CPU

More info on configuring VM acceleration on Linux: https://developer.android.com/studio/run/emulator-acceleration#vm-linux有关在 Linux 上配置 VM 加速的更多信息: https : //developer.android.com/studio/run/emulator-acceleration#vm-linux

General information on acceleration: https://developer.android.com/studio/run/emulator-acceleration .有关加速的一般信息: https : //developer.android.com/studio/run/emulator-acceleration

How can I solve it?我该如何解决? Should I enable VMX on cluster, If so, how can I do it?我应该在集群上启用 VMX,如果是这样,我该怎么做?

Currently nested virtualization is available only on GCE as per this docs .根据此文档,目前嵌套虚拟化仅在 GCE 上可用。

There is already a question regarding supporting of Nested Virtualization on GKE .已经有一个关于在GKE上支持Nested Virtualization问题 I'd say it's not introduced yet, thats why you cannot find proper documentation about GKE and nested virtualization .我想说它还没有介绍,这就是为什么你找不到关于 GKE 和nested virtualization正确文档。

So far I can see only one workaround:到目前为止,我只能看到一种解决方法:

As a workaround, I've been doing what this user was doing which is to clone the existing GKE node image and add the license, and copy-and-edit the instance group's template to the image:作为一种解决方法,我一直在执行此用户正在执行的操作,即克隆现有的 GKE 节点映像并添加许可证,然后将实例组的模板复制并编辑到该映像中:

https://groups.google.com/d/msg/kubernetes-users/Lq0ttadDOYI/1y1RVQMCBgAJ https://groups.google.com/d/msg/kubernetes-users/Lq0ttadDOYI/1y1RVQMCBgAJ

Obviously it's not 100% supported but I still get a lot of the GKE benefits AND nested virtualization.显然它不是 100% 支持,但我仍然获得了很多 GKE 的好处和嵌套虚拟化。

Hope that helps.希望有帮助。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM