From VNX
Jump to: navigation, search

How to create a KVM Android X86 root filesystem for VNX

Basic installation

Follow this procedure to create a KVM Android X.86 based root filesystem for VNX. The procedure has been tested with Android-x86-4.4 (

  • Create the filesystem disk image:
  • qemu-img create -f qcow2 vnx_rootfs_kvm_android-4.4-v025.qcow2 12G
  • Get Android X86 installation CD. For example:
  • wget
    cp android-x86-4.4-RC2.iso /almacen/iso
  • Create the virtual machine with:
  • vnx --create-rootfs vnx_rootfs_kvm_android-4.4-v025.qcow2 --install-media /almacen/iso/android-x86-4.4-RC2.iso --mem 1G --video vga
  • Do a standard installation, for example, following the steps described here
  • Choose reboot at the end and before it starts again, kill the virtual machine with:
  • # virsh list
     Id    Name                           State
     166   vnx_rootfs_kvm_android-4.4-v025.qcow2-2425 running
    # virsh destroy 166
    Domain 166 destroyed


  • Start the VM again with:
  • vnx --modify-rootfs vnx_rootfs_kvm_android-4.4-v025.qcow2 --mem 1G --video vga
  • Complete the installation assistant and after that, go to "Dev Tools->Developer Options" and check "Stay Awake" (if not, you won't be able to awake the virtual machine when the screen is switched off after inactivity timeout). Besides, go to "Setting->Display->Sleep" and select "Never time out".
  • Halt the VM, for example, going to the console typing "Alt-F1" and "halt".
  • Optionally, you can redirect the console to the serial port (ttyS0) to be able to have a cut&paste capable text console:
  • vnx_mount_rootfs -p 1 -r vnx_rootfs_kvm_android-4.4-v025.qcow2  /mnt/
    vi /mnt/grub/menu.lst
    # Add "console=ttyS0" to the kernel line of default boot option
    vnx_mount_rootfs -u /mnt/

    For android 7 use:

    virt-list-partitions vnx_rootfs_kvm_android64-7.1-v025.qcow2
    sudo guestmount -a vnx_rootfs_kvm_android64-7.1-v025.qcow2 -m /dev/sda1 /mnt/
    sudo guestunmount /mnt/

Known problems

  • Command execution for Android is not implemented yet. Use adb to execute commands in Android VMs from the host.