Guest operating systems running on virtualised systems needs to cooperate with the underlying hypervisors when using virtualised resources. Virtio is a set of standard for disk and network virtualisation that is required to be installed on instances that runs on Openstack. The default Androidx86 kernel does not come with these modules installed. Also, you have to edit the source code of Androidx86 OS to detect the virtualised block devices. Otherwise you will see a screen with "Detecting Android-x86... (continuous dots :s)".
This is what you will see in androidx86 debug mode:
If you do not want to compile the source and set it up yourself. I have already created the image for you. Download it from here.
1. First, to compile the OS you have to initialise the build environment. Follow instructions here.
2. Download and install the repo client using instructions here.
3. Download Androidx86 source from here.
4. Alter the kernel defconfig files in "kernel/arch/x86/configs/android-x86_defconfig"
5. To be able to detect virtual block devices, alter the "bootable/newinstaller/initrd/init" file.
8. Then compile.
14. Create a virtual machine using the uploaded image. Your VM should get a private ip. (Make sure to specify a keypair)
15. You should be able to ssh into the androidx86 VM now.
16. To get get GUI, add "nomodeset" to grub.
Thanks to everyone helped me on this issue from Androidx86 mailing list.
This is what you will see in androidx86 debug mode:
If you do not want to compile the source and set it up yourself. I have already created the image for you. Download it from here.
1. First, to compile the OS you have to initialise the build environment. Follow instructions here.
2. Download and install the repo client using instructions here.
3. Download Androidx86 source from here.
4. Alter the kernel defconfig files in "kernel/arch/x86/configs/android-x86_defconfig"
and "kernel/arch/x86/configs/android-x86_64_defconfig" by adding following lines.
CONFIG_VIRT_DRIVERS=Y
CONFIG_VIRTIO=y
CONFIG_VIRTIO_PCI=y
CONFIG_VIRTIO_MMIO=m
CONFIG_VIRTIO_BALLOON=m
CONFIG_VIRTIO_BLK=y
CONFIG_VIRTIO_NET=m
CONFIG_VIRTIO_RING=m
CONFIG_VIRTIO_CONSOLE=m
CONFIG_HW_RANDOM_VIRTIO=m
5. To be able to detect virtual block devices, alter the "bootable/newinstaller/initrd/init" file.
In line 124, Change
for device in ${ROOT:-/dev/sr* /dev/[hs]d[a-z]* /dev/mmcblk*}; do
to
for device in ${ROOT:-/dev/sr* /dev/[hsv]d[a-z]* /dev/mmcblk*}; do
6. Insert following lines to device/generic/x86/init.sh
7. Add follwing packages to PRODUCT_PACKAGES in device/generic/x86/packages.mk.#Force dhcp on eth0 interface.
netcfg eth0 dhcp
#Start SSH daemon at startup.
start-ssh
ssh-keygen
sshd_config
start-ssh
9. Install androidx86 OS onto a disk storage (dvi, vmdk, qcow2) .
13. Upload the disk to Glance.
It should now detect /dev/vda1.
10. To fetch the nova keypair, create fetchsshkeys script with following lines in /data/local/.
#!/system/bin/sh
# Fetch public key using HTTP
cd /data
wget http://169.254.169.254/latest/meta-data/public-keys/0/openssh-key
cat /data/openssh-key > /data/ssh/authorized_keys
chmod 0600 /data/ssh/authorized_keys
restorecon /data/ssh/authorized_keys
rm /data/openssh-key
11. Make the script executable.
12. Call the script in /etc/init.sh file.chmod 755 /data/local/fetchsshkeys
#Fetch ssh keys from openstack metadata service.
/data/local/fetchsshkeys
13. Upload the disk to Glance.
It should now detect /dev/vda1.
14. Create a virtual machine using the uploaded image. Your VM should get a private ip. (Make sure to specify a keypair)
15. You should be able to ssh into the androidx86 VM now.
16. To get get GUI, add "nomodeset" to grub.
open stack cloud computing key words: open stack training, open stack online training, open stack cloud computing training, open stack cloud computing online training, open stack corporate training, best open stack training, open stack cloud computing training, expert open stack training, expert open stack cloud computing training
ReplyDeletehttp://www.21cssindia.com/courses/open-stack-online-training-224.html
Unable to GUI could you provide your grub menu.lst setting ?
ReplyDeleteIt's was great useful commands for openstack training
ReplyDeleteIt's was great useful commands for openstack training
ReplyDeleteThis comment has been removed by the author.
ReplyDeleteThis solution is a little bit outdated since all the source code has been modified like this:
ReplyDeletefor device in ${ROOT:-/dev/[hmsv][dmr][0-9a-z]*}; do
I am confused with your last sentence of this post: "To get get GUI, add "nomodeset" to grub." So basically we can install android on Openstack with GUI right?
Could you please take a look at the newest versions of android x86 and OpenStack, I could not make it run properly, even though the source code has been fixed by the developer.
The kernel cannot recognize the Virtual hard disk of the instance but can recognize the volume (i added) - this is the workaround and i can install the OS to the volume. After that, I tried to detach the volume, but it could not boot into the installed OS on that volume anymore.. weird