After successfully compiling the AOSP build from the repo tried starting the emulator with the command provided in the documentation
$launch_cvd --daemon
but encountered the following error log:
06-03 14:31:46.869 2117619 2117619 I launch_cvd: main.cc:179 Using system_image_dir of: ===================================================================
NOTICE:
By using this Android Virtual Device, you agree to Google Terms of Service (https://policies.google.com/terms). The Google Privacy Policy (https://policies.google.com/privacy) describes how Google handles information generated as you use Google Services.
===================================================================
Automatically send diagnostic information to Google, such as crash reports and usage data from this Android Virtual Device. You can adjust this permission at any time by running "launch_cvd -report_anonymous_usage_stats=n". (Y/n)?:n
Reading --config option from: /path/to/output_file/out/target/product/vsoc_x86_64/android-info.txt
Launching CVD using --config='phone'.
exec of /usr/lib/cuttlefish-common/bin/capability_query.py with path "/usr/lib/cuttlefish-common/bin/capability_query.py" failed (No such file or directory)
VM manager crosvm is not supported on this machine.
Invalid vm_manager: crosvm
06-03 14:31:56.823 2117619 2117619 E launch_cvd: subprocess.cpp:207 Subprocess 2122296 was interrupted by a signal 'Aborted' (6)
06-03 14:31:56.823 2117619 2117619 E launch_cvd: main.cc:263 assemble_cvd returned -1
My understanding is that VM manager crosvm is not supported on this machine
error says that virtualization is not enabled on the Linux OS where you're launching Cuttlefish emulator. It might be because your OS is already virtual or virtualization is turned off in the CPU settings on your machine. You can reenable it in the BIOS settings.
If there's no way to enable virtualization on your machine and you want to build AOSP image there still, you can just move output emulator image to another machine with the virtualization enabled and run the emulator there. There's an example guide where they run Docker on Mac to build AOSP and then run emulator on the output image locally on Mac.
I got the same error when I was trying to run an emulator on AWS EC2 c5ad.8xlarge instance. They don't allow virtualization on this type of instance since it's already virtual. If you're using AWS as well, you can move to metal
instance type where you would have real hardware under your control with virtualization powers.