mkdir -p ~/VMs
virt-install \
--name android-x86 \
--memory 3072 \
--vcpus 2 \
--cpu host \
--cdrom "$HOME/Downloads/android-x86_64-9.0-r2.iso" \
--disk path="$HOME/VMs/android-x86.qcow2",size=30,format=qcow2,bus=virtio \
--graphics spice \
--video virtio \
--network network=default,model=virtio \
--sound ich9 \
--os-variant generic \
--boot uefi,loader=/usr/share/OVMF/OVMF_CODE_4M.fd,nvram="$HOME/VMs/android-
x86_VARS.fd",bootmenu.enable=on
Option 2 – Upgrade your osinfo-db
That way your system will know about android9 and other newer OS profiles:
bash
Copy
Edit
sudo apt update
sudo apt install osinfo-db
(After upgrade, you can check with osinfo-query os.)
Since you already have the ISO, the fastest path is just to use --os-variant generic and run the
VM.
Do you want me to also tweak it so you get GPU acceleration inside Android for smoother
graphics? That will make a big difference in performance.
You said:
walk through the installation screen
ChatGPT said:
Alright — once you run the virt-install command successfully, you’ll be dropped into Android-
x86’s installation/boot screen inside your VM viewer (virt-manager or virt-viewer).
Here’s what you’ll see and do step-by-step:
1. Boot Menu
The first screen will have several options, something like:
diff
Copy
Edit
Android-x86 9.0-r2 Installation
- Live CD – Run Android-x86 without installation
- Installation – Install Android-x86 to harddisk
- Debug mode
- Advanced options
- Auto Installation
Use the arrow keys to highlight "Installation – Install Android-x86 to harddisk" and press
Enter.
2. Partition Selection (cfdisk)
You’ll be dropped into a text-based partition tool (likely cfdisk or parted).
If it asks about partition table type, choose "dos" (MBR) — Android-x86 works fine with this.
Create a new partition:
Use arrow keys → [New] → choose Primary → size = use all available space → press Enter.
Highlight [Bootable] to mark it as bootable.
Select [Write] → type yes → Enter.
Select [Quit] to exit partition tool.