July 14, 2017

CyanogenMod 13 Hyper-V VM

So, I configured a CyanogenMod 13 Android Hyper-V VM using the cm-x86_64-13.0-r1 iso from the Android-x86 project. I'm sharing the setup specifics and hard disk primarily for my colleagues. Of course there are other Android VMs available for e.g. Oracle VirtualBox or VMware Player, but that makes it impossible to simultaneously run Hyper-V VMs. The hardware virtualization technology (IntelVT/ AMD-V) is already claimed. This setup fixes that.

data.img: 3GB (user data)
Filesystem: NTFS
Partitioning: GPT

You have to navigate the Android CM13 factory boot welcome menu before you can fix the mouse integration issue (read: Limitations). Use the keyboard navigation keys to select.

Create the Hyper-V VM

You need to create a generation 1 Hyper-V virtual machine, because the Android-X86 kernel doesn't support booting a hard disk from a SCSI controller. On my Windows 10 (version 1703) the VM breaks when I remove the SCSI controller. Advise: leave it.

Memory: e.g. 2GB, disable Dynamic Memory 
Processor: e.g. 1
IDE Controller 0: attach yourvm.vhdx
Network Adapter: Connected to a Virtual Switch with DHCP servicing.
No legacy network adapter required.
Integration Services: All services
Boot from IDE.

Edit the GRUB menu

Mount the virtual disk to a driveletter by double-clicking the vhdx file. Edit \grub\menu.lst and append vga=ask at the end of the first kernel execution line. When you choose the edited GRUB entry, after starting the VM, you will be able to choose a screen resolution e.g.: j. If you want to make your resolution preference permanent, replace the vga=ask with the decimal equivalent of the hexadecimal value. For example. j = 32B = 881. I changed vga=ask to vga=881. You can use an online hex to dec converter.

GRUB video modes

GRUB menu.lst


  • SU application permissions don't stick.
    Not fixed in latest release (Android-x86 7.1-rc1).
  • Hyper-V mouse integration doesn't work.
    Open Developer Options by clicking Settings > About phone > 7x click Build number > Enable Root Access & Local terminal. Launch terminal, su, rmmod hid_hyperv.
  • ADB over Network doesn't work, probably because Android WiFi is disabled.
    The VM uses a different nic to connect to Hyper-V. I'm am using FTP Server for file transfer. E.g. FTP Server Ultimate doesn't work because it needs WiFi enabled.
  • No clipboard sharing between host and Android client.
    I am currently using Alt-C to mitigate this. My preferred tool (ClipSync) needs WiFi.
  • The on-screen keyboard appears, but you don't need it. A solution is Null Keyboard.

0 reacties:

Post a Comment