.
ctys-uc-Android - Use-Cases for Setup of Android
The current document shows the basic installation of Android, which is a Linux variant.
The following environment is used here:
androidx86/eeeDroid_2008-12-20_1843Z.img
.
The installation for the following variants has to be performed by the appropriate standard setup of the HostOS and , which quite straight forward:
ln -s /opt/vde2-2.2.3 /opt/vdeThe wrapper vde may not be required, when the Qemu support option is compiled in, but this is not yet widely the case. Thus vde2 is still utilized as standard.
ctys-distribute -F 2 -P UserHomeCopy root@lab02
ctys -t cli -a create=l:tst137 root@tlab02
ctys-plugins -T all -E
The following steps are required for a RPM based setup on CentOS. The installation is relocatable, but located at '/opt', and installed locally by 'ctys-distribute'.
rpm -i ctys-base-01.11.011.noarch.rpm
/opt/ctys-01.11.011/bin/ctys-distribute -F 2 -P UserHomeCopy
ctys-xdg --menu-create
The setup of the Gnome Menu is quite simple, the contained tool ctys-xdg(1) sets up a standard menu by the call:
ctys-xdg --menu-create
The setup could be targeted either for private menus or shared menus. Both setups are based on a menu template, which is stored in the configuration subdirectory 'xdg.d'. The call
ctys-xdg --menu-cancel
removes the installed files. For current version no checks for changed files is done. The menues could be edited and extended by the call
ctys-xdg --menu-edit
which opens the related directories for modification of '*.menu', '*.desktop', and '*.directory' files.
The demo example VM is here named tst141, this is the hostname of GuestOS too.
ssh -X ap2
mkdir tst141
ARCH=i386 \ DIST=Android \ DISTREL=1.6-r2 \ OS=Linux \ OSREL=2.6 \ ctys-createConfVM -t qemu --label=tst141This call creates a virtual image(hda.img), the call-wrapper(tst140.sh), and the configuration file(tst140.ctys). The files are created from templates by assigning configuration values either from pre-configured default values, or interactive variation.
Not all values require to be set, some will be requested later by dialogue. Thus it is not neccessary to have values assigned to the complete displayed set. Actually used sources for default values: no-marker = Pre-Set value, either from defaults configuration, or by commandline. no-value = Either requested by dialog later, or the defaults of the finally called application are used. (c) = Read from actual configuration file, e.g. vmx-file. (d) = Read from database. (g) = Dynamically generated. (h) = Used from current host as default. (m) = Received from mapping definitions. Applicable modifications: blue = By call option, defines dependency for others. green = By environment, 'could be set almost independent' from other values. cyan = By miscellaneous facilities, but is dependent from others. E.g. LABEL defines by convention the network 'hostname', thus the TCP/IP params. This could ..., but should not be altered! Most of the missing values will be fetched during actual execution of this tool by dynamic evaluation. VAR name:Initial Value C_SESSIONTYPE:QEMU LABEL:tst141 MAC:00:50:56:13:11:69 (m) IP:172.20.2.245 (m) BRIDGE: DHCP: NETMASK: TCP: GATEWAY: EDITOR:acue UUID:ff81f9d8-ba06-4c90-a801-484ad4841b50 (h) DIST:Android DISTREL:1.6-r2 OS:Linux OSREL:2.6 ARCH:i386 ACCELERATOR:KVM (h) SMP: MEMSIZE:512 KBD_LAYOUT:de STARTERCALL:/usr/libexec/qemu-kvm WRAPPERCALL:tst141.sh DEFAULTBOOTMODE:HDD DEFAULTINSTTARGET:/mntn/vmpool/vmpool05/kvm/test/tst-ctys/... ...tst141/hda.img HDDBOOTIMAGE_INST_SIZE:8G HDDBOOTIMAGE_INST_BLOCKSIZE:256M HDDBOOTIMAGE_INST_BLOCKCOUNT:32 HDDBOOTIMAGE_INST_BALLOON:y DEFAULTINSTMODE:CD INSTSRCCDROM:/mntn/swpool/UNIXDist/../miscOS/Android/raw/... ...android-x86/android-x86-1.6-r2.iso DEFAULTINSTSOURCE:/mntn/swpool/UNIXDist/../miscOS/Android/... ...raw/android-x86/android-x86-1.6-r2.iso INST_KERNEL: INST_INITRD: VMSTATE:ACTIVE Remember that his is a draft pre-display of current defaults. No consistency-checks for provided values are performed at this stage. Some missing values are evaluated at a later stage dynamically.
ctys -t qemu \ -a create=l:tst140,id:${TST140}/tst140.ctys,instmode,console:sdl\ app2
./tst141.sh --console=vnc --vncaccessdisplay=47 --print --checkThis shows the current resulting call:
########################### #Display call # ########################### QEMU_VERSION = "qemu-0.9.1-kvm-83-maint-snapshot-20090205" QEMU_MAGIC = "QEMU_091" QEMU_ACCELERATOR = "KVM" ctys-uc-AndroidNAME = "tst141.sh" +->STARTERCALL = /usr/libexec/qemu-kvm +->REALSTARTERCALL = /usr/libexec/qemu-kvm #The resulting call is: # ---> eval "/opt/vde/bin/vdeq /usr/libexec/qemu-kvm \ -net nic,macaddr=00:50:56:13:11:69,model=rtl8139 \ -net vde,sock=/var/tmp/vde_switch0.acue \ -name "tst141" -vga cirrus -localtime -k de -m 512 -cpu qemu32 \ -serial mon:unix:/var/tmp/qemumon.tst141.21844.acue,server,nowait \ -daemonize -vnc :47 \ -boot c /mntn/vmpool/vmpool05/kvm/test/tst-ctys/tst141/hda.img" <--- EXECALL:/opt/vde/bin/vdeq /usr/libexec/qemu-kvm -net nic,macaddr=00:50:56:13:11:69,model=rtl8139 -net vde,sock=/var/tmp/vde_switch0.acue -name "tst141" -vga cirrus -localtime -k de -m 512 -cpu qemu32 -serial mon:unix:/var/tmp/qemumon.tst141.21844.acue,server,nowait -daemonize -vnc :47 -boot c /mntn/vmpool/vmpool05/kvm/test/tst-ctys/tst141/hda.img
./tst141.sh --console=vnc --vncaccessdisplay=47 --print --instmode --check
########################### #Display call # ########################### QEMU_VERSION = "qemu-0.9.1-kvm-83-maint-snapshot-20090205" QEMU_MAGIC = "QEMU_091" QEMU_ACCELERATOR = "KVM" ctys-uc-AndroidNAME = "tst141.sh" +->STARTERCALL = /usr/libexec/qemu-kvm +->REALSTARTERCALL = /usr/libexec/qemu-kvm #The resulting call is: # ---> eval "/opt/vde/bin/vdeq /usr/libexec/qemu-kvm \ -net nic,macaddr=00:50:56:13:11:69,model=rtl8139 \ -net vde,sock=/var/tmp/vde_switch0.acue \ -name "tst141" -vga cirrus -localtime -k de -m 512 -cpu qemu32 \ -serial mon:unix:/var/tmp/qemumon.tst141.23708.acue,server,nowait \ -daemonize -vnc :47 -boot d \ -cdrom /mntn/swpool/UNIXDist/../miscOS/Android/raw/... ...android-x86/android-x86-1.6-r2.iso \ -hda /mntn/vmpool/vmpool05/kvm/test/tst-ctys/tst141/hda.img " <--- EXECALL:/opt/vde/bin/vdeq /usr/libexec/qemu-kvm -net nic,macaddr=00:50:56:13:11:69,model=rtl8139 -net vde,sock=/var/tmp/vde_switch0.acue -name "tst141" -vga cirrus -localtime -k de -m 512 -cpu qemu32 -serial mon:unix:/var/tmp/qemumon.tst141.23708.acue,server,nowait -daemonize -vnc :47 -boot d -cdrom /mntn/swpool/UNIXDist/../miscOS/Android/raw/... ...android-x86/android-x86-1.6-r2.iso -hda /mntn/vmpool/vmpool05/kvm/test/tst-ctys/tst141/hda.img
ctys -t qemu \ -a create=l:tst141,id:${PWD}/tst141.ctys,console:sdl \ app2
ctys -t qemu \ -a create=l:tst141,id:${PWD}/tst141.ctys,console:vnc \ app2
Settings -> Sound&display -> Screen timeout -> Never timeout
The creation of the raw VM is the first step to be executed at the host operating system. This could be either performed locally or remote and requires the usage of the provided tools by VirtualBox(TM).
ssh -X lab02
VirtualBox
ARCH=i386 \ DIST=Android \ DISTREL=1.6-r2 \ OS=Linux OSREL=2.6 \ ctys-createConfVM -t vbox --label=tst140 --levo
Not all values require to be set, some will be requested later by dialogue. Thus it is not neccessary to have values assigned to the complete displayed set. Actually used sources for default values: no-marker = Pre-Set value, either from defaults configuration, or by commandline. no-value = Either requested by dialog later, or the defaults of the finally called application are used. (c) = Read from actual configuration file, e.g. vmx-file. (d) = Read from database. (g) = Dynamically generated. (h) = Used from current host as default. (m) = Received from mapping definitions. Applicable modifications: blue = By call option, defines dependency for others. green = By environment, 'could be set almost independent' from other values. cyan = By miscellaneous facilities, but is dependent from others. E.g. LABEL defines by convention the network 'hostname', thus the TCP/IP params. This could ..., but should not be altered! Most of the missing values will be fetched during actual execution of this tool by dynamic evaluation. VAR name:Initial Value C_SESSIONTYPE:VBOX LABEL:tst140 MAC:08:00:27:A4:51:0B (c) IP: BRIDGE: DHCP: NETMASK: TCP: GATEWAY: EDITOR:root UUID:97d5a071-1914-477c-89c4-d47dd7adac74 (c) DIST:Android DISTREL:1.6-r2 OS:Linux OSREL:2.6 ARCH:i386 ACCELERATOR:HVM (c) SMP:1 (c) MEMSIZE:768 (c) KBD_LAYOUT:de STARTERCALL:/usr/bin/VirtualBox DEFAULTBOOTMODE:HDD DEFAULTINSTTARGET:/mntn/vmpool/vmpool05/vbox/test/... ...tst-ctys/tst140/tst140.vdi HDDBOOTIMAGE_INST_SIZE:8192M VMSTATE:ACTIVE Remember that his is a draft pre-display of current defaults. No consistency-checks for provided values are performed at this stage. Some missing values are evaluated at a later stage dynamically.
VirtualBoxThe following call variant starts the remote VM with a VirtualBox console:
ctys -t vbox \ -a create=l:tst140,id:${TST140}/tst140.ctys,console:vbox\ app2
ctys -t vbox \ -a create=l:tst140,id:${PWD}/tst140.ctys,console:vbox \ app2The default console is here RDP.
In case of a common mounted NFS filesystem for the pool VMs for simplicity just change into the directory of the VM on any machine. Call for the first check ctys-vdbgen(1) with the --stdio option for display only.
cd /mntn/vmpool/vmpool05/vbox/test/tst-ctys/tst140 ctys-vdbgen --append --base=$PWD --stdio -- root@lab02 cd /mntn/vmpool/vmpool05/kvm/test/tst-ctys/tst141 ctys-vdbgen --append --base=$PWD --stdio -- app2
When the result is displyed correctly just call without the '--stdio' option.
cd /mntn/vmpool/vmpool05/vbox/test/tst-ctys/tst140 ctys-vdbgen --append --base=$PWD -- root@lab02
The following output should be displayed:
Prepare execution-call: Require DB-PATH, USE: DEFAULT_DBPATHLST="/homen/acue/.ctys/db/default" Require DB-PATH, USE: -o => "/homen/acue/.ctys/db/default" APPEND mode : ON(1) STDIO mode off : OFF(0) Set TYPE scope ADD: DEFAULT="-t ALL" Preload TYPE set ADD: DEFAULT="-T ALL" For splitted operations ADD: DEFAULT="-b sync,seq " Nameservice cache OFF: DEFAULT="-c off " Data cache OFF: DEFAULT="-C off " Resulting ENUMERATE ADD: DEFAULT="-a enumerate=matchvstat:... ...active%disabled%empty,machine,b:/mntn/vmpool/vmpool05/vbox/... ...test/tst-ctys/tst140 -C off -c off -T ALL " -> generate DB(may take a while)... ----------------------------------- START:14:55:11 ------ ------ END:14:55:38 DURATION:00:00:27 ----------------------------------- RET=0 ----------------------------------- Cached data: Mode: APPEND Pre-Appended: 835 records Appended: 1 records Fetched Records Raw: records Fetched Records Unique: records Final: 836 records ----------------------------------- ...finished.
The QEMU/KVM scan by:
cd /mntn/vmpool/vmpool05/kvm/test/tst-ctys/tst141 ctys-vdbgen --append --base=$PWD -- app2
Should display:
Prepare execution-call: Require DB-PATH, USE: DEFAULT_DBPATHLST="/homen/acue/.ctys/db/default" Require DB-PATH, USE: -o => "/homen/acue/.ctys/db/default" APPEND mode : ON(1) STDIO mode off : OFF(0) Set TYPE scope ADD: DEFAULT="-t ALL" Preload TYPE set ADD: DEFAULT="-T ALL" For splitted operations ADD: DEFAULT="-b sync,seq " Nameservice cache OFF: DEFAULT="-c off " Data cache OFF: DEFAULT="-C off " Resulting ENUMERATE ADD: DEFAULT="-a enumerate=matchvstat:active%... ...disabled%empty,machine,b:/mntn/vmpool/vmpool05/kvm/test/tst-ctys/tst141 -C off -c off -T ALL " -> generate DB(may take a while)... ----------------------------------- START:14:55:40 ------ ------ END:14:56:29 DURATION:00:00:49 ----------------------------------- RET=0 ----------------------------------- Cached data: Mode: APPEND Pre-Appended: 836 records Appended: 1 records Fetched Records Raw: records Fetched Records Unique: records Final: 837 records ----------------------------------- ...finished.
This shows that only two(1+1) entries are appended to the existing database with 835 VM-Entries. Now check the database entry by calling:
ctys-vhost tst14
The following result should be displayed when the regular expression 'tst14.*' matches only twice:
label |stype|accel|distro |distrorel|os |osrel|PM |if|TCP ------+-----+-----+-------+---------+-------+-----+---------+--+------------ tst141|QEMU |KVM |Android|1.6-r2 |Linux |2.6 |app2.soho|0 |172.20.2.245 tst140|VBOX |HVM | | |Linux26| |lab02 | |
This chapter demostrates the seamless integration of the hypevisors QEMU(emulation), QEMU/KVM, and VirtualBox(TM). The fully automatic generated database is synchronous with the graphical starter and offers the same and one user interface. This is the case for all supported plugins, due to missing native plugins for Android the LOGIN could not be demostrated for this special case.
Now call the menue item for start of the VM 'tst141'.
The created cacheDB record for thr VM 'tst140' is now automatically visible in the
list of startable virtual machines.
Confirm the selected entry.
Boot...
...and enjoy Android.
Now call the menue item for start of the VM 'tst140'.
The created cacheDB record for thr VM 'tst140' is now automatically visible in the
list of startable virtual machines.
Confirm the selected entry.
Boot ...
...and enjoy Android.
For now no native plugin for Android is supported.
ctys(1) , ctys-configuration-QEMU(7) , ctys-configuration-VBOX(7) , ctys-createConfVM(1) , ctys-QEMU(1) , ctys-uc-QEMU(7) , ctys-uc-VBOX(7) , ctys-VBOX(1) , ctys-vhost(1)
For System Tools:
Android: [ http://www.android.com ]
Android-x86: [ http://www.android-x86.org ]
Written and maintained by Arno-Can Uestuensoez:
Maintenance: | <<acue_sf1 (a) users sourceforge net>> |
Homepage: | <https://arnocan.wordpress.com> |
Sourceforge.net: | <http://sourceforge.net/projects/ctys> |
Project moved from Berlios.de to OSDN.net: | <https://osdn.net/projects/ctys> |
Commercial: | <https://arnocan.wordpress.com> |
Copyright (C) 2008, 2009, 2010, 2011 Ingenieurbuero Arno-Can Uestuensoez
For BASE package following licenses apply,
This document is part of the DOC package,
For additional information refer to enclosed Releasenotes and License files.