admin管理员组文章数量:1419182
I am trying to set up an AVD in an Azure DevOps pipeline using these two guidelines:
- Microsoft documentation
- Independent guide
The articles state, that the AVD should be runnable in the default hosted build agent from Microsoft, but it is not working for me because of a missing virtualization.
ERROR | x86 emulation currently requires hardware acceleration!
CPU acceleration status: KVM requires a CPU that supports vmx or svm
I tried Ubuntu and macOS agents but still no luck (contradicting these a few years old articles).
I was able to get it running when I used custom-build agents using the D4ads v5
virtual machine in Azure.
Maybe I overlooked something and there is a way to simulate/enable the virtualization? Or did Microsoft change the build agents' HW configuration meanwhile and there is no chance to run AVD on the default agents? I would prefer to use the default build agents for simplicity and other anizational reasons.
I ended up with this script breaking the pipeline if the HW is not suitable:
set -e
MESSAGE="Virtualization is not enabled. Ensure you run this pipeline on a VM that supports nested virtualization."
if [[ "$OSTYPE" == "darwin"* ]]; then
if ! sysctl -a | grep -q 'machdep.cpu.features' | grep -q 'VMX'; then
echo $MESSAGE
exit 1
fi
else
if [ $(egrep -c '(vmx|svm)' /proc/cpuinfo) -eq 0 ]; then
echo $MESSAGE
exit 1
fi
fi
echo "It looks like HW virtualization is enabled"
I am trying to set up an AVD in an Azure DevOps pipeline using these two guidelines:
- Microsoft documentation
- Independent guide
The articles state, that the AVD should be runnable in the default hosted build agent from Microsoft, but it is not working for me because of a missing virtualization.
ERROR | x86 emulation currently requires hardware acceleration!
CPU acceleration status: KVM requires a CPU that supports vmx or svm
I tried Ubuntu and macOS agents but still no luck (contradicting these a few years old articles).
I was able to get it running when I used custom-build agents using the D4ads v5
virtual machine in Azure.
Maybe I overlooked something and there is a way to simulate/enable the virtualization? Or did Microsoft change the build agents' HW configuration meanwhile and there is no chance to run AVD on the default agents? I would prefer to use the default build agents for simplicity and other anizational reasons.
I ended up with this script breaking the pipeline if the HW is not suitable:
set -e
MESSAGE="Virtualization is not enabled. Ensure you run this pipeline on a VM that supports nested virtualization."
if [[ "$OSTYPE" == "darwin"* ]]; then
if ! sysctl -a | grep -q 'machdep.cpu.features' | grep -q 'VMX'; then
echo $MESSAGE
exit 1
fi
else
if [ $(egrep -c '(vmx|svm)' /proc/cpuinfo) -eq 0 ]; then
echo $MESSAGE
exit 1
fi
fi
echo "It looks like HW virtualization is enabled"
Share
Improve this question
edited Jan 29 at 11:06
Lukas K
asked Jan 29 at 10:57
Lukas KLukas K
6,4194 gold badges26 silver badges33 bronze badges
1 Answer
Reset to default 1The error indicates Microsoft-hosted agent doesn't support necessary hardware acceleration for x86 emulation.
As per the doc, it used virtual machines Standard_DS2_v2 as microsoft-hosted agent. It's recommended to setup the self-hosted agent
which support the feature required.
本文标签: Run Android UI Tests in a AVD in Azure DevOps pipelineStack Overflow
版权声明:本文标题:Run Android UI Tests in a AVD in Azure DevOps pipeline - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1745303433a2652509.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论