IVI/IVI 2.0 VMware

From Tizen Wiki
< IVI
Jump to: navigation, search

Introduction

Being able to run a Tizen IVI image in a virtual machine has always been an attractive solution for various reasons. It may be that you don't have enough hardware platforms for the whole development team, or that you are often on the road and want to only carry one laptop, or that you just want to take a quick glance at Tizen IVI, or ... (make up your own reason). However, while the basic kernel and services will start in a Virtual Machine environment, the graphical environment, and specifically the Home Screen, will not come up. The next few paragraphs explain how you can modify a stock Tizen IVI 2.0 image to be able to run it in VMware.

Preliminary steps

Preparing the Tizen IVI 2.0 image

Convert the Tizen IVI 2.0 image into a VMDK format (VMware Virtual Disk format)

bunzip2 ivi-release-tizen-2.0_20130423.12-sdb.raw.bz2
qemu-img convert -f raw -O vmdk ivi-release-tizen-2.0_20130423.12-sdb.raw tizen-ivi-2.0-vmware.vmdk

Setting up VMware® on your host

Here is a summary of the host/VMware combinations that will work:

Windows [1] Linux [2]
VMware Player [3] OK NOK
VMware Workstation [4] OK(?) OK(?)

[1] Tested with Microsoft Windows 7 Entreprise Service Pack 1 (64-bit)
[2] Tested with Ubuntu 12.10 (32-bit)
[3] Tested with VMware® Player 5.0.2 build-1031769
[4] Should work but not tested
Other versions of host should work too. The reason why VMware Player under Linux does not work is because there is no 3D acceleration available and it causes Enlightenment to close unexpectedly.

Creating your Tizen IVI 2.0 virtual machine

Steps to create a new Virtual Machine (VM):

  • Create a New Virtual Machine
  • Select I will install the operating system later
  • Use Linux -> Fedora
  • Give it a new name, e.g. tizen-ivi-2.0-vmware
  • Create a new disk and select store virtual disk as a single file. The size does not matter as we will later delete it and a new one (mapped to tizen-ivi-2.0-vmware.vmdk will be added as IDE(0:0))
  • Once the VM has been created, go to Edit virtual machine settings
  • (optional) Uncheck the Connect on power-on option for the CD/DVD (unless you have such device on your dev machine)
  • (optional) Uncheck the Connect at power-on for Printer
  • Check the Connect at power-on for Sound Card
  • Check Accelerate 3D graphics for Display

We will now use the tizen-ivi-2.0-vmware.vmdk disk we have created earlier:

  • Remove the current Hard Disk
  • Add a new Hard Disk
  • Select Use an existing virtual disk
  • Select your tizen-ivi-2.0-vmware.vmdk file
  • When you save these changes, it will ask you if you want to upgrade the virtual disk format, select Keep existing format instead.

Tweaking and Running the image for a VM environment

Start up (Play) your virtual machine.

As it stands, the UI will not come up and you'll most likely end up with a black screen and perhaps a mouse cursor. To tweak your image and enable the graphics stack, please follow these steps:

  • Get focus from the VM and press Ctrl-Alt+F1
  • The very first time, the VM machine gets stuck in an infinite look waiting for X to start and the following messages appear on the F1 console:
Xinit: give up
Xinit: unable to connect to X server: Network is unreachable
Xinit: server error
Waiting X…
  • At that stage, press Ctrl-C. You now have access to other consoles on F3 to F6 (Ctrl-Alt+F3)
  • Log on: root/tizen
  • Start Connman (so you have an IP address): connmand

Note: connman is most likely not running this time around so we start it manually. You shouldn't have to do that in the future, i.e. once you've tweaked your image.

  • Add this repo to your system:
curl http://download.tizen.org/live/home:/gvancuts:/vmware:/2.0/standard/home:gvancuts:vmware:2.0.repo –o /etc/zypp/repos.d/tizen-vmware.repo
zypper refresh
zypper up
zypper in xorg-x11-server-misc-vmware mesa-dri-vmwgfx-driver

It will tell you it conflicts with xorg-x11-server-misc-ndis, choose to uninstall this xorg-x11-server-misc-ndis package

reboot

You should now initially see the Tizen animation followed by the Home Screen coming up.

Known issues

This is to be considered an experiment and many functionalities may be missing or incomplete. More specifically, I have not (yet) tried to play video files for example.

Other oddities you may run into:

Caps Lock infinite loop on the host

Sometimes my host system gets into a weird state and the Capslock status gets toggled on and off infinitely. You can usually get out of this by killing the VM.

Audio output

Basic audio works but you will have to make sure that the audio device is connected to the VM and also unmute the devices in Tizen. You can quickly test this as follows (switch to a console first Ctrl-Alt-F3

amixer sset Master unmute
amixer sset Master 100
amixer sset PCM unmute
amixer sset PCM 100

Now try to play one of the same WAV file as follows:

aplay /usr/share/sounds/alsa/Front_Left.wav

Shutting down/rebooting the VM

Switch to a console first Ctrl-Alt-F3:

reboot

Note: The system gets stuck if you issue shutdown -r now so I recommend to use reboot and power off the VM when it's about to reboot.

Virtual screen resolution

The virtual screen resolution is hard-coded in /etc/X11/xorg.conf and is set to 1024x768. You can experiment with different resolutions by editing that file but you should only use resolutions exposed by VMware Player, you can get a list of those by typing xrandr. Here is what I get on my system for example:

Screen 0: minimum 1 x 1, current 1024 x 768, maximum 8192 x 8192
Virtual1 connected 1024x768+0+0 (normal left inverted right x axis y axis) 0mm x 0mm
   1024x768       60.0*+
   800x600        60.0 +   60.3  
   2560x1600      60.0  
   1920x1440      60.0  
   1856x1392      60.0  
   1792x1344      60.0  
   1920x1200      59.9  
   1600x1200      60.0  
   1680x1050      60.0  
   1400x1050      60.0  
   1280x1024      60.0  
   1440x900       59.9  
   1280x960       60.0  
   1360x768       60.0  
   1280x800       59.8  
   1152x864       75.0  
   1280x768       59.9  
   640x480        59.9  
Virtual2 disconnected (normal left inverted right x axis y axis)
Virtual3 disconnected (normal left inverted right x axis y axis)
Virtual4 disconnected (normal left inverted right x axis y axis)
Virtual5 disconnected (normal left inverted right x axis y axis)
Virtual6 disconnected (normal left inverted right x axis y axis)
Virtual7 disconnected (normal left inverted right x axis y axis)
Virtual8 disconnected (normal left inverted right x axis y axis)

Conclusion

There is no formal QA or validation that's been done on this so please treat this as experimental. I do, however, hope that this can be useful to other folks so I'm posting this all out there... feel free to provide feedback, improve the wiki page or share additional tips & tricks with everyone else.