Как установить Android x86 6.0, 7.0 на VMWare ESXi. Осторожно, много скриншотов.

По какой-то непонятной для меня причине установка Android x86 6.0 и 7.0 на VMWare ESXi — это не совсем тривиальное занятие.

Если покороче

1) Правильно создайте загрузочный диск
2) Установите Android
3) Измените параметры GRUB «nomodeset xforcevesa» чтобы загрузиться в Android
4) Пофиксите эти параметры в GRUB после успешной загрузки

А если подлиннее, то вот

Загрузите Android x86 6.0 ISO с официальной страницы.

Да, и не забудьте скопировать его к себе в ESXi datastore.

Создайте новую виртуальную машину с кастомной конфигурацией

Назовите её так, как хотите

Выберите хранилище по вкусу

Выберите версию виртуальной машины

В качестве гостевой системы укажите «Other (32-bit)«

Одного ядра процессора должно быть достаточно.

2GB RAM тоже

Вкладку Network оставьте как есть

Вкладку SCSI controller оставьте тоже

Создайте новый виртуальный диск

5GB достаточно

В качестве virtual device mode поставьте IDE

Поставьте галочку «Edit the virtual machine settings before completion» и кликните на «Continue».

Отредактируйте CD/DVD-накопитель. Выберите Android x86 6.0 ISO в качестве Datastore ISO File. Поставьте галочку «Connect at power on».

Запустите виртуальную машину и выберите обычную установку.

На первом экране выберите «Create/Modify partition».

Не используйте GPT для форматирования диска

Создайте диск

Сделайте его первичным

Оставьте размер диска по-умолчанию(максимальный).

Сделайте диск загрузочным.

И сбросьте изменения на диск.


Теперь можете нажать «Quit»

Выберите только что созданный раздел

Отформатируйте его в Ext4

Подтвердите форматирование

Установите GRUB

Но не устанавливайте EFI GRUB2

Я предпочитаю устанавливать системную директорию как read-write, т.к. это разработческая тестовая машина.

Подождите пока установка закончится

И перезагрузите машину

После перезагрузки нажмите английскую «e» на первом же экране.

Нажмите «e» опять,чтобы отредактировать первую строчку конфигурации


Переместите курсор на параметр «quiet»

Вы можете оставить параметр «quiet» как есть, но я предпочитаю видеть логи загрузки системы прямо на экране, поэтому я удаляю эту строчку.
А вот что вы реально должны сделать, так это вставить параметры «nomodeset xforcevesa» как на скриншоте.

Нажмите кнопку «b» для загрузки

После этого вы увидите окно загрузки Android

Первичные настройки Android тривиальны и схожи с настройками на любом телефоне или планшете, поэтому я оставляю эти настройки без детальных скриншотов.

После того как Android загрузится, нажмите Alt+F1 чтобы увидеть командную строку Android

Примонтируйте раздел sda1 и измените GRUB.

mkdir /mnt/sda
mount /dev/block/sda1 /mnt/sda
vi /mnt/sda/grub/menu.lst

В редакторе vi нажмите «i», чтобы включить режим редактирования файла. Добавьте параметры «nomodeset xforcevesa» в первый раздел GRUB как на скриншоте.

Нажмите Esc, чтобы выйти из режима редактирования. Затем, наберите на клавиатуре «:w» чтобы записать изменения на диск. После этого наберите «:q» и нажмите Enter чтобы выйти.

И самое главное не забудьте дунуть. Ведь если не дунуть, никакого чуда не произойдёт.

Вот и всё. Наберите «reboot» и нажмите Enter. Android перезагрузится и включится сам без модификации GRUB.


Чтобы включить режим разработчика перейдите в настройки Android > About tablet. и нажмите на «Build number» 7 раз.
Чтобы отключить засыпание виртуалки и отключение её экрана перейдите в настройки -> Developer options и включите опцию «Stay awake».
Если вы будете использовать виртуалку для целей разработки, будет полезным включить опцию «USB Debugging» и отключить опцию «Verify apps over USB».

Чтобы найти IP адрес виртуалки, нажмите Alt+F1 и выполните команду «ifconfig». Чтобы вернуться к графическому интерфейсу нажмите Alt+F7.


51 комментарий к “Как установить Android x86 6.0, 7.0 на VMWare ESXi. Осторожно, много скриншотов.”

  1. Finally! The only guide that actually gets this to work! There are so many rubbish guides out there that tell you all the wrong things on very old versions of Android with recent versions of VMWare.

    Thank-you!

        1. Bump. Echo. Me too.
          Side note: if you select the VM type as «Windows» you can enable 3D Graphics support in the VM settings which negates the need to modify Grub.
          Still no mouse worky. Android-x86 7.1

          1. Benjamin Gathmann

            The mouse works if you use the latest versions of Android 7.1 and 8.1 (release 3).
            It seems that this is one of the things that was fixed from r2 to r3.

    1. So it occurs to me that the screenshots are using vSphere client, which is only compatible with ESXi 6.0 and earlier. If all of us with the mouse problem are using ESXi 6.5 that may be the problem. I know the mouse doesn’t work in the web client nor does it work in the VM Remote Console for ESXi 6.5.

      vSphere client won’t connect to an ESXi 6.5 server. I may try rolling an ESXi 6.0 server to see how it goes.

      1. OK here’s the mouse thing sort-of solved:
        1. You have to use ESXi 6.0 (6.5+ WILL NOT WORK)
        2. You have to connect using vSphere Client (web UI WILL NOT WORK)
        3. You have to use Android-x86 6.0 32 bit (7.1 WILL NOT WORK)
        4. You have to use 32 bit (64 bit WILL NOT WORK)

        It’s a little laggy but these appear to be the conditions under which the mouse will work.

        Furthermore, in 6.5 enabling 3D graphics support works and negates the need for modifying Grub, this does NOT work in 6.0. Enabling 3D graphics causes the VM to hang at a black screen. I suspect this is related to hardware rendering support and 6.5 has a better driver for my hardware.

        Now to figure out how to get wireless working. ESXi won’t pass through my wireless adapter so I think the best solution will end up being trying to talk the Android-x86 developers into doing some sort of virtual wireless bridge.

    2. Here is my solution which works on VMware Workstation 15.

      1) Connect a 2nd USB mouse to the host
      2) Start Workstation
      3) Virtual Machine Settings>USB Controller>Show all USB input devices (enabled)
      4) Launch the VM
      5) Player>Removable Devices>[Mouse #2]>Connect (disconnect from host)

      You might see a couple of warnings notifying you that a mouse will be disconnected from the host. Just click OK on the warnings. Your 2nd mouse should now work in Android.

      I could not get this to work with only one mouse. I tried steps 2-5 before I added my 2nd mouse but step 5 produced a warning that the mouse could not be disconnected from the host because it was needed by the host.

  2. Works good until I hit Yes to install GRUB. After hitting Yes, I just get a solid cursor at the bottom of the screen and nothing ever happens after that. ESXi 5.5

  3. Hi,

    I followed your tutorial and everything runs perfectl, but I can’t get any network connection.
    I need to setup a static ip for Android x86 on ESXi.

    I used:
    ifconfig eth0 up X.X.X.X
    route add default gw Y.Y.Y.Y dev eth0
    setprop net.dns1 8.8.8.8

    Then I try to ping 8.8.8.8 for example (or any IP on my network), but it fails with no connection.

    What could it be?
    Thanks

    1. I have not encountered this issue before. All android systems I have, got their IP successfully via standard VMWare virtual network adapter.
      Maybe it’s not an Android issue, but network issue?

    2. Append this before return 0 in /system/etc/init.sh:

      ifconfig eth0 192.168.1.x
      ndc network create 100
      ndc network interface add 100 eth0
      ndc network route add 100 eth0 0.0.0.0/0 192.168.1.1
      ndc reolver setnetdns 100 «» 8.8.8.8 8.8.4.4

      1. Thank your for this great guide.
        It worked perfectly to have android booting in ESXI virtual environnement. However, network is not working. This commands do not help. Somehow there is no IP assigned to the eth0.

  4. On my local network I don’t use DHCP and I must have it that way.

    All VM’s within ESXi (Windows, linux, etc) have static address and they are working great.
    Only this new Android VM can’t connect to my network =/

    I also tried to change a parameter on .vmx file, but no luck =(

  5. Gimbras Batatoides

    Hello,
    I also tried to define a static IP on an Android-x86 VM machine (and failed) but after several trial and error I quit when I checked a page at the official Android-x86 web site
    http://www.android-x86.org/releases/releasenote-7-1-rc1
    that states as key feature for Android-x86 7.1-rc1 the «Ethernet (DHCP only)» feature.
    With this in mind (and I hope someone could prove me wrong) I believe ethernet (and internet) is not avaliable if a DHCP server is not present on the network.
    Maybe creating a VM with a lightweight server (e.g Win Server 2003) and setting the DHCP to assign only one IP to specifically the Mac Adress of the Android-x86 networkcard would work as a workaround…

  6. At the last screenshoot, after edit the line with «nomodeset xforcevesa», then pressed «Esc» to exit edit mode, ok.

    But stayed at the same place. So, where I am supposed to type «:w» and «:q» ???

    I didn’t undertand that part

    1. No problem. Vi is an old text editor and not so obvious for modern users (for me too 🙂 ).

      Vi has two working mods: edit and command. When you pressing Esc you are exiting edit mode and entering command mode. From this time you are able to write commands «:w» and «:q». You will see them at the bottom of the screen. It’s important to begin them from «:», otherwise they will not appears. Don’t forget to press Enter after each of them.

  7. I followed everything and the OS booted ok. But it’s plagued with instabilities and I don’t know how to fix it:
    1. The OS itself would randomly freeze and nothing short of restarting the VM would resurrect it
    2. Any app I install will simple stop for no apparent reason. «Unfortunately, [app_name] has stopped»

    The host machine is admittedly not what I’d call beefy, but could that be an issue? FWIW, it’s an HP N40L Microserver with 10GB RAM. It is also running 2 other VMs (WIn2012 server as DNS and Untangle NG firewall). Would appreciate any insights.

    1. Never seen such freezes before, so I can only guess, sorry. First, I would try another build, or maybe Android version. Second, I would look at both Android and ESXi logs.
      Anyway, I don’t know is HP N40L Microserver hardware officially supported by VmWare. It should not be an issue since it already works, but some ESXi versions may conflict with some guest OS versions in rare cases.

  8. Using Android x86 7.1, on ESXi 6.5, I follow the instructions, but get no GUI at all. Have tried «vga=ask» and tried several graphics modes, all fail. Any ideas?

    1. i met the same problem, and it was resovled.
      try the following:
      (1)firstly, shutdown the vm and os should be set to ubuntu x64 in esxi
      (2)in setting dialog of vm, enable the 3D function of the display.
      (3)reboot it.

  9. Thanks InnerLife—I just got this running today. By the way, my mouse is working under VMWare Remote Console (web console doesn’t work but that’s fine for me). Here is my setup: ESXi 6.7, android-x86-7.1-r2

  10. Excellent guide. It contains all of the things I learned the hard way but still showed me how to edit the grub menu on a standalone install. Well done!

  11. Hi there!

    I am using VMware workstation 15 Pro on Windows 7 and I installed Android Oreo 8.1. However I get the same back screen when it boots. Adding the command »nomodeset xforcevesa» actually made it boot properly but then when I tried to edit the grub menu using your last instructions in this article didn’t work for me.

    I have problem executing the following command lines:

    When I enter »mkdir /mnt/sda» Basically nothing happens!
    In the next line when I enter »mount /dev/block/sda1 /mnt/sda» in first attempt it said there is no such directory and later attempts just like the first command line, nothing really happened.

    And lastly when I enter »vi /mnt/sda/grub/menu.lst» a new screen shows up, but it’s like empty. On the other hands, basically no information is there to change OR edit.

    I have already spend an entire day on how to solve this problem and yet I haven’t found a solution that works for me!

    Can you please explain the reasons for the errors I mentioned here OR how do you propose to solve this problem.

    I really appreciate if you get back to me here OR send me an email.

    Thank you;

    Regards;

    1. «mkdir /mnt/sda» just creates new directory which became a mount point at the next step, nothing special.
      «no such directory» probably means Android 8.1 has another logical device to mount. «/dev/sda1» or «/dev/sdb» or «/dev/sdc» or something similar. Try to «ls /dev/sd*» and mount devices one by one trying to find the correct one with «grub» directory. Or maybe grub is now a part of a root filesystem and you can find it in «/» without mounting.
      As device was not mounted, command «vi /mnt/sda/grub/menu.lst» can’t open file on not mounted device and you see an empty file.

  12. To resolve mouse issue install vmware workstation on windows then goto file > connection to server input esxi ip and credentials then connect to phoenix os from there, mouse should be working now

Добавить комментарий для naf-naf Отменить ответ

Ваш адрес email не будет опубликован. Обязательные поля помечены *