<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress.com" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	>

<channel>
	<title>qemu &amp;laquo; WordPress.com Tag Feed</title>
	<link>http://en.wordpress.com/tag/qemu/</link>
	<description>Feed of posts on WordPress.com tagged "qemu"</description>
	<pubDate>Fri, 27 Nov 2009 13:54:37 +0000</pubDate>

	<generator>http://en.wordpress.com/tags/</generator>
	<language>en</language>

<item>
<title><![CDATA[Developing kernel on a Virtual Machine (the solution)]]></title>
<link>http://albertoembedded.wordpress.com/2009/11/25/developing-kernel-on-a-virtual-machine-the-solution/</link>
<pubDate>Wed, 25 Nov 2009 16:01:43 +0000</pubDate>
<dc:creator>marramao</dc:creator>
<guid>http://albertoembedded.wordpress.com/2009/11/25/developing-kernel-on-a-virtual-machine-the-solution/</guid>
<description><![CDATA[I am working now on Ubuntu Karmic Koala. As I said in my previous post, Qemu is a complete platform ]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>I am working now on Ubuntu Karmic Koala.</p>
<p>As I said in my previous <a href="http://albertoembedded.wordpress.com/2009/11/24/developing-kernel-on-a-virtual-machine-first-try/">post</a>, <a href="http://www.qemu.org/">Qemu</a> is a complete platform emulator that can emulate the Integrator ARM machine platform (CPU and devices!).</p>
<p>In Karmic Koala the latests Qemu version (0.11.0) is shipped within Ubuntu repositories so with this line we can install it:</p>
<pre style="padding-left:30px;"># sudo apt-get install qemu qemu-kvm qemu-kvm-extras</pre>
<h2>ARM test images</h2>
<p>From the Qemu home page we can download a Linux 2.6 <a href="http://www.qemu.org/arm-test-0.2.tar.gz">ARM example image</a> builded by Paul Brook and extracting it in $PRJROOT/images, we can find the README file where it is written how to launch the test platform:</p>
<pre style="padding-left:30px;"># cp DownloadDirectory/arm-test-0.2.tar.gz $PRJROOT/images
# cd $PRJROOT/images
# tar -xvf arm-test-0.2.tar.gz
# cd arm-test
# cat README
</pre>
<p>So, with or without the graphical interface we can test the qemu arm installation with the followings:</p>
<pre style="padding-left:30px;"># qemu-system-arm -kernel zImage.integrator -initrd arm_root.img
or
# qemu-system-arm -kernel zImage.integrator -initrd arm_root.img \
  -nographic -append "console=ttyAMA0"</pre>
<h2>A suitable Linux config file</h2>
<p>Over the test purpose , executing the test image can give the kernel configuration file stored in /proc/config.gz ! so:</p>
<pre style="padding-left:30px;"># qemu-system-arm -kernel zImage.integrator -initrd arm_root.img \
  -nographic -append "console=ttyAMA0"
Uncompressing Linux...............................................
........................... done, booting the kernel.
Linux version 2.6.17-rc3 (paul@wren) (gcc version 4.1.0 (CodeSourcery ARM))
 #53 Thu May 4 15:05:18 BST 2006
CPU: ARM926EJ-Sid(wb) [41069265] revision 5 (ARMv5TEJ)
Machine: ARM-IntegratorCP
Memory policy: ECC disabled, Data cache writeback
CPU0: D VIVT write-through cache
CPU0: I cache: 4096 bytes, associativity 4, 32 byte lines, 32 sets
CPU0: D cache: 65536 bytes, associativity 4, 32 byte lines, 512 sets
Built 1 zonelists
Kernel command line: console=ttyAMA0
PID hash table entries: 1024 (order: 10, 4096 bytes)
Console: colour dummy device 80x30
Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
Memory: 128MB = 128MB total

...

Log in as root with no password.
qemu login: root
# cp /proc/config.gz .
# tar -xvf config.gz
# vi config.gz
</pre>
<p>With this file we can configure the mainline linux kernel! (copying from screen, copying within net, scrolling the options with a near mainline make menuconfig window).</p>
<h2>ARMv5te Toolchain to build the kernel</h2>
<p>The machine emulated by qemu-arm is based on the core ARMv5te , so I need the correct toolchain for build all the necessary code.</p>
<p>The Pengutronix OSELAS environment can do that in the <a href="http://www.pengutronix.de/oselas/toolchain/">OSELAS toolchain</a> project. Similarly at what described in <a title="Initializing a Linux Embedded Development Host Machine" href="../initializing-a-linux-embedded-development-host-machine/">Initializing a Linux Embedded Development Host Machine</a> moving in $PRJROOT/build-tools/OSELAS.Toolchain-1.99.3.4/ we can select the suitable ptxdist configs with:</p>
<pre style="padding-left:30px;"># cd $PRJROOT/build-tools/OSELAS.Toolchain-1.99.3.4/
# ls ptxconfigs/
arm-1136jfs-linux-gnueabi_gcc-4.1.2_glibc-2.5_binutils-2.17_kernel-2.6.18.ptxconfig
arm-1136jfs-linux-gnueabi_gcc-4.3.2_glibc-2.8_binutils-2.19_kernel-2.6.27-sanitized.ptxconfig
arm-1136jfs-linux-gnueabi_gcc-4.3.2_glibc-2.8_binutils-2.19_kernel-2.6.27-sanitized.ptxconfig.old
arm-cortexa8-linux-gnueabi_gcc-4.3.2_glibc-2.8_binutils-2.18_kernel-2.6.27-sanitized.ptxconfig
armeb-xscale-linux-gnueabi_gcc-4.1.2_glibc-2.5_binutils-2.17_kernel-2.6.18.ptxconfig
armeb-xscale-linux-gnueabi_gcc-4.3.2_glibc-2.8_binutils-2.18_kernel-2.6.27-sanitized.ptxconfig
...
arm-v4t-linux-gnueabi_gcc-4.1.2_glibc-2.5_binutils-2.17_kernel-2.6.18.ptxconfig
arm-v4t-linux-gnueabi_gcc-4.3.2_glibc-2.8_binutils-2.18_kernel-2.6.27-sanitized.ptxconfig
arm-v5te-linux-gnueabi_gcc-4.1.2_glibc-2.5_binutils-2.17_kernel-2.6.18.ptxconfig
arm-v5te-linux-gnueabi_gcc-4.3.2_glibc-2.8_binutils-2.18_kernel-2.6.27-sanitized.ptxconfig
arm-v5te_vfp-linux-gnueabi_gcc-4.3.2_glibc-2.8_binutils-2.18_kernel-2.6.27-sanitized.ptxconfig
arm-xscale-linux-gnueabi_gcc-4.1.2_glibc-2.5_binutils-2.17_kernel-2.6.18.ptxconfig
arm-xscale-linux-gnueabi_gcc-4.2.3_glibc-2.8_binutils-2.18_kernel-2.6.27-sanitized.ptxconfig
...
# ptxdist select ptxconfigs/\
  arm-v5te-linux-gnueabi_gcc-4.3.2_glibc-2.8_binutils-2.18_kernel-2.6.27-sanitized.ptxconfig
# ptxdist menuconfig
</pre>
<p>In the menuconfig, all can live as it is but in &#8220;misc-&#62;prefix for installation&#8221; we can choose $PRJROOT/tools where $PRJROOT must be manually extended. So with:</p>
<pre style="padding-left:30px;"># ptxdist go
</pre>
<p>A part from minor dependencies that we can solve installing software with apt-get, the toolchain is built and the correct prefix will be:</p>
<pre style="padding-left:30px;">CROSS_COMPILE_OSELAS_v5=$PRJROOT/tools/OSELAS.Toolchain-1.99.3/arm-v5te-linux-gnueabi/\
   gcc-4.3.2-glibc-2.8-binutils-2.18-kernel-2.6.27-sanitized/bin/arm-v5te-linux-gnueabi-
</pre>
<p>If we assign the environmental variable CROSS_COMPILE=CROSS_COMPILE_OSELAS_v5 the kernel configured by the upper config file and compiled with this toolchain is a good kernel to execute within the qemu-system-arm emulator!</p>
<h2>A suitable Root Filesystem</h2>
<p>Ok we have a good kernel ad a small initrd filesystem, but we have to develop application to run in the emulated device!</p>
<p>We can use the <a href="http://www.ptxdist.org/oselas/bsp/phytec/index_en.html">OSELAS.BSP Phytec phyCORE</a> project installed following the description in <a title="Initializing a Linux Embedded Development Host Machine" href="../initializing-a-linux-embedded-development-host-machine/">Initializing a Linux Embedded Development Host Machine</a>.</p>
<p>Download the platform_config file <a href="http://www.dei.unipd.it/~panizzoa/platformconfig-qemu">platformconfig-qemu</a> and the ptxconfig one <a href="http://www.dei.unipd.it/~panizzoa/ptxconfigThiny">ptxconfigThiny</a> (that is the normal ptxconfig removing all graphic subsystem for a speedier compilation)</p>
<p>Every two configuration file must be placed in $PRJROOT/build-BSP/OSELAS.BSP-Phytec-phyCORE-12-1/configs so with:</p>
<pre style="padding-left:30px;"># cd $PRJROOT/build-BSP/OSELAS.BSP-Phytec-phyCORE-12-1/
# ptxdist select configs/ptxconfigThiny
# ptxdist platform configs/platformconfig-qemu
# ptxdist toolchain $CROSS_COMPILE_OSELAS_v5
# ptxdist go
# ptxdist images
</pre>
<p>In  $PRJROOT/build-BSP/OSELAS.BSP-Phytec-phyCORE-12-1/platform-phyCORE-qemu/images/ we will find the root.ext2 image, ready to be the SD/MMC image of the qemu device!</p>
<h2>Running qemu</h2>
<p>If in the $PRJROOT directory we create the images/phyCORE directory and we put all the necessary:</p>
<pre style="padding-left:30px;"># cd $PRJROOT
# mkdir -p images/phyCORE
# cp (kernel_path)/arch/arm/boot/zImage images/phyCORE/
# cp $PRJROOT/build-BSP/OSELAS.BSP-Phytec-phyCORE-12-1/platform-phyCORE-qemu/images/root.ext2\
  images/phyCORE/
</pre>
<p>then we can start qemu:</p>
<pre style="padding-left:30px;"># qemu-system-arm -kernel images/phyCORE/zImage -sd images/phyCORE/root.ext2 \
  -nographic -append "console=ttyAMA0 root=/dev/mmcblk0"
</pre>
<h2>Results</h2>
<p>In results we have a complete developing environment: emulator, toolchain, kernel, software ecosystem.</p>
<p>Kernel modification that do not deal with the hardware abstraction layer can be well developed in the emulator and tested by ad-hoc software inserted in the phyCORE-qemu distribution!</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Developing kernel on a Virtual Machine (First try)]]></title>
<link>http://albertoembedded.wordpress.com/2009/11/24/developing-kernel-on-a-virtual-machine-first-try/</link>
<pubDate>Tue, 24 Nov 2009 08:55:57 +0000</pubDate>
<dc:creator>marramao</dc:creator>
<guid>http://albertoembedded.wordpress.com/2009/11/24/developing-kernel-on-a-virtual-machine-first-try/</guid>
<description><![CDATA[To save writing cycles of the Armadillo NAND flash, in those days I had  searched a way to execute t]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>To save writing cycles of the Armadillo NAND flash, in those days I had  searched a way to execute the developing kernel on an ARM emulator.</p>
<h2>First try: Android Emulator</h2>
<p>I am working on Android? so why not using the Android Emulator tool??</p>
<p>I am not a guru on this, so maybe I&#8217;m wrong with something.. Someone will correct me if there were an easier way.</p>
<p>Android emulator is known to be build over the <a href="http://www.qemu.org">Qemu Open Source Process Emulator</a> but Google tend to do things harder than they are: they have introduced a new virtual hardware device based on ARMv5te architecture called Goldfish.</p>
<p>Qemu emulate so well the ARM Integrator platform (same processor architecture), why build another? why create another buggy linux platform? buggy in the sense that it work for the kernel version that is developed, but must be maintained in the successive kernel release and who do this work? Maybe unanswerable question..</p>
<p>I&#8217;ve tried to port in mainline the Goldfish platform taking it from the <a href="http://android.git.kernel.org/?p=kernel/common.git;a=shortlog;h=refs/heads/android-goldfish-2.6.29">android-goldfish-2.6.29</a> branch, correcting all the Coding Style problems given by checkpatch.pl resulting in: early support, console output  and maybe network ability, but no ability to mount initrd images or nand images -&#62; no rootfilesystem ability and so I not spend here so many time describing this developing path.</p>
<p>Fortunately the light bulb come up my head and through the Qemu home page I&#8217;ve found that the reference machine platform for ARM emulation is the ARM Integrator, well supported in mainline Linux kernel and within the downloads I&#8217;ve found a reference kernel plus initrd file to use within.<br />
Good! Second try!</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA["VirtualBox can't operate in VMX root mode" Error Starting VM]]></title>
<link>http://ubuntugenius.wordpress.com/2009/11/22/virtualbox-cant-operate-in-vmx-root-mode-error-starting-vm/</link>
<pubDate>Sat, 21 Nov 2009 17:55:32 +0000</pubDate>
<dc:creator>ubuntugenius</dc:creator>
<guid>http://ubuntugenius.wordpress.com/2009/11/22/virtualbox-cant-operate-in-vmx-root-mode-error-starting-vm/</guid>
<description><![CDATA[If VirtualBox opens fine, but when you try to start a virtual machine (VM) you get the following err]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>If <strong><span style="color:#800000;">VirtualBox</span></strong> opens fine, but when you try to start a <strong>virtual machine</strong> (<em>VM</em>) you get the following error:</p>
<p><strong><span style="color:#0000ff;">Failed to start the virtual machine Windows XP.</span><br />
<span style="color:#333399;">VirtualBox can&#8217;t operate in VMX root mode. Please disable the KVM kernel extension, recompile your kernel and reboot (VERR_VMX_IN_VMX_ROOT_MODE).</span></strong></p>
<p>&#8230; it means another virtualisation package &#8211; <strong><span style="color:#3366ff;">kvm</span></strong> &#8211; is interfering with <strong><span style="color:#800000;">VirtualBox</span></strong>. <strong><span style="color:#3366ff;">kvm</span></strong> isn&#8217;t installed on <strong><span style="color:#993300;">Ubuntu</span></strong> by default, so you probably installed <strong><span style="color:#3366ff;">qemu</span></strong>, the popular open-source emulator.</p>
<p>A quick fix is to stop <strong><span style="color:#3366ff;">kvm</span></strong> via the terminal:</p>
<p><strong><span style="color:#3366ff;">sudo /etc/init.d/kvm stop</span></strong></p>
<p>To <strong>stop this happening completely</strong>, mark the following packages for <strong>complete removal</strong> in Synaptic if they&#8217;re installed: <strong><span style="color:#3366ff;">kvm</span></strong>, <strong><span style="color:#3366ff;">qemu</span></strong>, <strong><span style="color:#3366ff;">qemu-kvm</span></strong> &#38; <strong><span style="color:#3366ff;">qemu-launcher</span></strong>. Or you can do it via the terminal, and ignore errors regarding packages that weren&#8217;t installed (so can&#8217;t be uninstalled):</p>
<p><strong><span style="color:#3366ff;">sudo apt-get remove </span></strong><strong><span style="color:#3366ff;">kvm </span></strong><strong><span style="color:#3366ff;">qemu</span></strong> <strong><span style="color:#3366ff;">qemu-kvm </span></strong><strong><span style="color:#3366ff;">qemu-launcher</span></strong></p>
<p>You should now be able to start your <em>VM</em>, without having to close and restart <strong><span style="color:#800000;">VirtualBox</span></strong>.</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[An Introduction to the Symbian Virtual Platform]]></title>
<link>http://blog.symbian.org/2009/11/20/an-introduction-to-the-symbian-virtual-platform/</link>
<pubDate>Fri, 20 Nov 2009 16:51:55 +0000</pubDate>
<dc:creator>Tyson Key</dc:creator>
<guid>http://blog.symbian.org/2009/11/20/an-introduction-to-the-symbian-virtual-platform/</guid>
<description><![CDATA[Hi, I&#8217;m Tyson Key, a college student currently residing somewhere in the north of England. Whe]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>Hi, I&#8217;m Tyson Key, a college student currently residing somewhere in the north of England.</p>
<p>When I&#8217;m not studying, I happen to advocate and contribute to open source, and open platforms and enjoy spending time testing and documenting software, and exploring various aspects of low-level operating system and computer networking technology &#8211; all whilst trying to be a generally reasonable and agreeable person&#8230;</p>
<p>Of course, I also happen to be a heavy user, and advocate of the Symbian platform, and have been involved with the Symbian Foundation to varying extents, since its announcement.</p>
<p>Introduction aside, I&#8217;ve been invited to introduce the Symbian Virtual Platform. This is a project that I&#8217;ve been involved in beta testing, prior to the release of the Symbian Kernel Taster Kit.</p>
<p style="text-align:left;"><strong>What&#8217;s the Symbian Virtual Platform?</strong></p>
<p>The <a href="http://developer.symbian.org/wiki/index.php/SYBORG/QEMU">Symbian Virtual Platform</a> consists of a customised version of <a href="http://www.qemu.org">QEMU</a> (an Open Source CPU instruction set and hardware emulator), containing several additional features, along with a corresponding baseport referred to as Syborg.</p>
<p>This combination potentially represents the future of inexpensive, accurate, user-level application testing, and low-level debugging and experimentation on the Symbian Platform, without the need for additional hardware.</p>
<p>As a bonus, some of the hallmark causes of frustration with the older Windows-based emulator (commonly referred to as WINS or WINSCW dependant upon toolchain used) are removed, such as:</p>
<ul>
<li>Low performance</li>
<li>Simulation inaccuracy (e.g. differing memory models with various limitations, behavioural differences from real hardware, and disabled/restricted software functionality)</li>
<li>Platform dependence &#8211; QEMU is well-supported under Windows, most Linux distributions and Mac OS X, and also runs under many other operating systems<!--more--></li>
</ul>
<p style="text-align:center;">
<p style="text-align:left;"><strong>What can it do for you?</strong></p>
<p>The &#8220;official&#8221;/mainline version of QEMU already emulates an ARMv5 architecture CPU, and a number of hardware features including &#8211; but not limited to:</p>
<ul>
<li>Serial ports &#8211; complete with the ability to redirect traffic to a file, which is essential for Symbian Platform debugging and problem diagnosis</li>
<li>Ethernet chipsets &#8211; a driver for which is included in Syborg, although additional work is necessary, before being suitable for intensive use</li>
<li>Various forms of Flash memory devices (e.g. MultiMediaCard/SD Card, and SPI NAND Flash)</li>
<li>An audio chipset &#8211; support for this in the baseport was <a href="http://developer.symbian.org/oss/FCL/interim/QEMU/rev/5fca9e46c6fa">recently contributed</a> by Johnathan White of Accenture</li>
</ul>
<p>However, the version supplied by Symbian also adds a number of useful features that enhance this functionality to potentially save development time and effort, and let users/enthusiasts test software quickly and easily without access to a physical handset, including:</p>
<ul>
<li>The ability to run real Symbian OS binaries &#8220;as-is&#8221; &#8211; meaning that you no longer also need to rebuild software to run within an x86 and Windows-only simulator</li>
<li>A host file system-backed emulated drive (<code><em>S:\</em></code> on the QEMU guest, which maps to <code><em>\svphostfs</em></code> on the host) that acts as an extension of firmware when custom executables are added, and allows for quickly moving files between the host and guest whilst the Platform is running</li>
<li>A Python-based dynamic hardware modelling system that allows for varying degrees of control over the behaviour of the emulated system at runtime, without needing to modify QEMU source code and rebuild</li>
</ul>
<p style="text-align:left;">The source code for these enhancements, and the baseport are available in the Symbian Foundation <a href="http://developer.symbian.org/oss/FCL/sf/adaptation/qemu/">repositories</a>.</p>
<p style="text-align:left;">
<p style="text-align:center;">
<p style="text-align:left;"><strong>Intrigued? Here&#8217;s what it looks like&#8230;</strong></p>
<p style="text-align:center;"><strong> </strong></p>
<div class="wp-caption aligncenter" style="width: 410px"><strong><strong><img title="Symbian OS under QEMU" src="http://lh6.ggpht.com/_Y5mZY1-de8o/SvW6fUEjS9I/AAAAAAAADPo/7FfhBD0BTdk/Symbian_OS_on_QEMU.PNG" alt="" width="400" height="316" /></strong></strong><p class="wp-caption-text">An EShell session, showing the output of various utilities, on a Windows XP host</p></div>
<p style="text-align:center;">
<p style="text-align:center;">
<p style="text-align:center;">
<p><strong> </strong></p>
<p style="text-align:center;"><strong> </strong></p>
<p><strong> </strong></p>
<p style="text-align:center;">
<p style="text-align:left;"><strong>What have I done with QEMU?</strong></p>
<ul>
<li>Built several ROM images containing various Platform components, and documented the results on the <a href="http://developer.symbian.org/forum/forumdisplay.php?f=31">Symbian forums</a> so that others can assist in resolving problems, and enhancing the results</li>
<li>Spent time debugging the execution of various binaries using serial port file redirection, and resolving dependency issues, as they arose</li>
</ul>
<p>Which leads nicely on to a practical example, based upon a problem that I faced&#8230;</p>
<p><strong>Getting the EUserHL Walkthrough test suite running</strong></p>
<p>A forum thread that I started, with additional suggestions from the community, prior to writing this post is available <a href="http://developer.symbian.org/forum/showthread.php?t=3653">here</a> for reference.  I&#8217;ll now attempt to explain how I answered a not-too-uncommon question using several features of the Symbian Virtual Platform, and a process of elimination -</p>
<blockquote><p><em>How can I test a Platform component (in this case &#8211; EUserHL), when I don&#8217;t have access to the source code?</em></p></blockquote>
<p>The initial steps involved boil down to:</p>
<ul>
<li>Install and configure the Symbian <a href="http://developer.symbian.org/main/tools_and_kits/downloads/view.php?id=8">Kernel Taster Kit</a> and RVCT 4.0 according to the instructions on the Symbian Wiki</li>
<li>Create a directory on the host file system at <em>\svphostfs</em> and a set of subdirectories to hold executables and DLLs inside: <em>sys\bin</em></li>
<li>Copy <em>\epoc32\release\armv5\urel\euserhl_walkthrough.exe</em> and <em>\epoc32\release\armv5\urel\euserhl.dll</em> to <em>\svphostfs\sys\bin</em></li>
<li>Start a <em>cmd.exe </em>prompt session, and switch to <em>\symbian-qemu-0.9.1\bin\</em></li>
</ul>
<ul>
<li>Run QEMU using the prebuilt Syborg ROM image using: <em>arm-none-symbianelf-qemu-system -M \sf\adaptation\qemu\baseport\syborg\syborg.dtb -kernel \epoc32\rom\syborg.img </em>within the active <em>cmd.exe </em>session</li>
<li>Once the ROM has booted to EShell, attempt to invoke <em>euserhl_walkthrough.exe</em></li>
<li>Notice that execution simply bails, before printing a rather vague, generic &#8220;<em>Not found&#8221;</em> error message</li>
</ul>
<p>Obviously, this a rather sorry state of affairs &#8211; but there&#8217;s hope.  So, let&#8217;s move on:</p>
<ul>
<li>Halt the previous QEMU session</li>
<li>This time, run QEMU again using <em>arm-none-symbianelf-qemu-system -M \sf\adaptation\qemu\baseport\syborg\syborg.dtb -kernel \epoc32\rom\syborg.img <strong>-serial file:&#8221;EUserHLDebug.txt&#8221; <span style="font-style:normal;"><span style="font-weight:normal;">to redirect serial port output to a file</span></span></strong></em></li>
<li>Within the EShell session, invoke <em>trace /L 4 </em>to enable debugging of executable loading and DLL iteration</li>
<li>Attempt to invoke <em>euserhl_walkthrough.exe </em>once again within EShell, to receive the familiar <em>&#8220;Not found</em>&#8221; error</li>
<li>Open <em>\symbian-qemu-0.9.1\bin\EUserHLDebug.txt </em>on the host, using your favourite text editor</li>
<li>Following the chain of execution, from <em>euserhl_walkthrough.exe</em> onwards, to <em>euserhl.dll</em>, we can see that various dependency DLLs are located successfully (demarcated by &#8220;<em>New image found</em>&#8220;)</li>
<li>However, if we closely follow <em>euserhl.dll</em>, the fact that a critical dependency is missing at a late stage is alluded to by &#8220;<em>No suitable image found</em>&#8221; &#8211; although reattempts are constantly being made to locate the missing DLL</li>
<li>Unfortunately, this debug output does not tell us exactly which DLL we require &#8211; so we turn to another useful tool (<em>elftran</em>)</li>
<li>At this stage, it would be a good idea to halt the QEMU session, to avoid some rather confusing behaviour that arises from the handling of the <em>S:\</em> drive, and executable caching when copying additional DLLs and executables to <em>\sys\bin</em> within it</li>
</ul>
<p>Now, we should be on the home stretch:</p>
<ul>
<li>Within another <em>cmd.exe</em> session, run: <em>elftran \svphostfs\sys\bin\euserhl.dll &#62; EUserHLDeps.txt </em>to create a file containing information related to the dependencies of the <em>euserhl.dll </em>binary, amongst other attributes</li>
<li>Searching for &#8220;imports from&#8221; within the <em>EUserHLDeps.txt </em>file will reveal that <em>euserhl.dll </em>depends upon <em>estor.dll</em> &#8211; which doesn&#8217;t exist in the prebuilt ROM image, or in <em>\svphostfs\sys\bin</em></li>
<li>Copy <em>\epoc32\release\armv5\urel\estor.dll</em> to <em>\svphostfs\sys\bin</em></li>
<li>Run <em>arm-none-symbianelf-qemu-system -M \sf\adaptation\qemu\baseport\syborg\syborg.dtb -kernel \epoc32\rom\syborg.img</em> once again</li>
<li>With a little luck, attempting to invoke <em>euserhl_walkthrough.exe </em>should result in:</li>
<div class="wp-caption aligncenter" style="width: 410px"><img title="EUserHL Test Suite" src="http://symbianfoundation.wordpress.com/files/2009/11/euserhl-start.png" alt="" width="400" height="313" /><p class="wp-caption-text">Partial output from running the EUserHL Walkthrough test suite</p></div>
<li>Have fun exploring the serial debugging and tracing tracing functionality, and the host-bound file system</li>
</ul>
<p>If that&#8217;s not enough, you can even try to build these components into a ROM image:</p>
<ul>
<li>Copy <em>\sf\os\kernelhwsrv\kernel\eka\rombuild\tshell.oby</em> to <em>\sf\os\kernelhwsrv\kernel\eka\rombuild\tshellwitheuserhl.oby</em></li>
<li><em> </em>
<div id="_mcePaste"><span style="font-style:normal;"><em>Add the following lines to the bottom of <em>\sf\os\kernelhwsrv\kernel\eka\rombuild\tshellwitheuserhl.oby</em>:</em></span></div>
<div id="_mcePaste"><em>file=\epoc32\release\armv5\udeb\estor.dll \sys\bin\estor.dll</em></div>
<div id="_mcePaste"><em>file=\epoc32\release\armv5\udeb\euserhl_walkthrough.exe\sys\bin\euserhl_walkthrough.exe</em></div>
<div id="_mcePaste"><em>file=\epoc32\release\armv5\udeb\euserhl.dll \sys\bin\euserhl.dll</em></div>
<p><em> </em></li>
<li>Delete <em>euserhl_walkthrough.exe</em>, <em>euserhl.dll</em> and <em>estor.dll</em> from <em>\svphostfs\sys\bin\</em> to ensure that the contents of the ROM are not being supplemented/overridden with the contents of <em>S:\sys\bin</em> on the guest at boot time</li>
<li>Within a <em>cmd.exe</em> session, switch to <em>\sf\os\kernelhwsrv\kernel\eka\rombuild</em></li>
<li>Run <em>rom &#8211;variant=syborg &#8211;inst=armv5 &#8211;build=udeb &#8211;type=tshellwitheuserhl &#8211;name=\epoc32\rom\tshellwitheuserhl.img </em>to attempt to build a new ROM image containing the EUserHL DLL, walkthrough/demo application, and the EStor DLL</li>
<li>If everything worked according to plan, you should be able to run your new ROM image using: <em>arm-none-symbianelf-qemu-system -M \sf\adaptation\qemu\baseport\syborg\syborg.dtb -kernel \epoc32\rom\tshellwitheuserhl.img </em>within the <em>\symbian-qemu-0.9.1\bin\ </em>directory</li>
<li>Invoking <em>euserhl_walkthrough.exe </em>for the final time should produce the same result as the previous exercise!</li>
</ul>
<p style="text-align:center;">
<p style="text-align:left;"><strong>Additional Resources and Information</strong></p>
<ul>
<li>A series of forum threads related to <a href="http://developer.symbian.org/forum/showthread.php?t=3685">PIPS and networking</a>, and the legacy, development-specific <a href="http://developer.symbian.org/forum/showthread.php?t=3739">TechView GUI</a>, in addition to the aforementioned EUserHL thread that I started, and continue to contribute to</li>
<li>A list of backlog items and planned features for the Symbian Virtual Platform are available, <a href="http://developer.symbian.org/wiki/index.php/QEMU_Backlog">here</a></li>
<li>Johnathan&#8217;s presentation about the Symbian Virtual Platform at SEE 2009:<object id="22311005" name="22311005" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" align="middle" height="500" width="100%">
<param name="movie" value="http://documents.scribd.com/ScribdViewer.swf?document_id=22311005&access_key=key-2ckdbevfesfwi42g36yx&page=&version=1&auto_size=true&viewMode="><param name="quality" value="high"><param name="play" value="true"><param name="loop" value="true"><param name="scale" value="showall"><param name="wmode" value="opaque"><param name="devicefont" value="false"><param name="bgcolor" value="#ffffff"><param name="menu" value="true"><param name="allowFullScreen" value="true"><param name="allowScriptAccess" value="always"><param name="salign" value="">
<embed src="http://documents.scribd.com/ScribdViewer.swf?document_id=22311005&access_key=key-2ckdbevfesfwi42g36yx&page=&version=1&auto_size=true&viewMode=" name="22311005_object" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" play="true" loop="true" scale="showall" wmode="opaque" devicefont="false" bgcolor="#ffffff" menu="true" allowfullscreen="true" allowscriptaccess="always" salign="" type="application/x-shockwave-flash" align="middle"  height="500" width="100%"></embed>
</object>
<div style="font-size:10px;text-align:center;width:100%"><a href="http://www.scribd.com/doc/22311005">View this document on Scribd</a></div></li>
</ul>
<p><strong> </strong></p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Debian rootfs installation customized for Bifferboard]]></title>
<link>http://blog.famzah.net/2009/11/18/debian-rootfs-installation-customized-for-bifferboard/</link>
<pubDate>Wed, 18 Nov 2009 08:55:14 +0000</pubDate>
<dc:creator>Ivan Zahariev</dc:creator>
<guid>http://blog.famzah.net/2009/11/18/debian-rootfs-installation-customized-for-bifferboard/</guid>
<description><![CDATA[First you have to mount a medium on which we are going to install the Debian system. Generally, you ]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>First you have to mount a medium on which we are going to install the Debian system. Generally, you have two options:</p>
<ul>
<li>Using a USB Flash drive:<br />
<blockquote><p><code><br />
## MAKE SURE THAT YOU UPDATE THIS<br />
$ export ROOTDEV=/dev/sdc1<br />
$ sudo mkfs.ext3 $ROOTDEV<br />
$ sudo tune2fs -c 0 -i 0 $ROOTDEV<br />
$ export MNTPOINT=/mnt/diskimage<br />
$ sudo mount $ROOTDEV $MNTPOINT<br />
</code></p></blockquote>
</li>
<li>Using a <a href="http://blog.famzah.net/2009/11/16/create-a-qemu-image-file-which-you-can-mount-in-both-linux-and-qemu/">Qemu image</a>:<br />
<blockquote><p><code><br />
$ export MNTPOINT=/mnt/diskimage<br />
$ export IMGFILE=hd0.img<br />
$ sudo mount -o loop,offset=32256 "$IMGFILE" $MNTPOINT<br />
</code></p></blockquote>
</li>
</ul>
<p>Once we have the medium mounted at $MNTPOINT, we can proceed with installing Debian there and configuring it for Bifferboard:</p>
<blockquote><p><code>$ export DBS_OS_VERSION=lenny<br />
## replace "bg." with your local archive, or just omit it<br />
$ export DBS_LOCAL_ARCHIVE=bg.<br />
$ sudo debootstrap --arch i386 ${DBS_OS_VERSION} $MNTPOINT/ http://ftp.${DBS_LOCAL_ARCHIVE}debian.org/debian<br />
## ... go grab a pizza or something ... this will take a while<br />
$ sudo cp /etc/resolv.conf $MNTPOINT/etc/<br />
$ sudo mount proc $MNTPOINT/proc -t proc<br />
$ sudo chroot $MNTPOINT<br />
##<br />
## We are now in the "chroot" environment as root<br />
##<br />
/# apt-get -qq update &#38;&#38; apt-get install wget<br />
/# cd /root &#38;&#38; wget http://www.famzah.net/download/bifferboard/debootstrap-postconfig.sh<br />
/root# chmod +x debootstrap-postconfig.sh &#38;&#38; ./debootstrap-postconfig.sh<br />
/root# passwd root<br />
/root# exit<br />
##<br />
## Back to our machine<br />
##<br />
$ sudo umount $MNTPOINT/proc<br />
$ sudo umount $MNTPOINT<br />
</code></p></blockquote>
<hr />
<p>Now you have a minimum Debian installation customized for Bifferboard in the following way:</p>
<ul>
<li>Custom kernel for Bifferboard installed by a .deb package.</li>
<li>Ethernet interface configured as DHCP client.</li>
<li>Temporary directories /tmp and /var/tmp mounted on a RAM-disk.</li>
<li>All APT sources &#8220;main contrib non-free&#8221; enabled.</li>
<li>Serial console on ttyS0 (115200 8N1).</li>
<li>RTC (real-time clock) kernel modules blacklisted &#8211; the Bifferboard has no RTC.</li>
<li>IPv6 disabled &#8211; takes a lot of resources and we won&#8217;t use it anyway, for now.</li>
</ul>
<p>I may add any further customizations if needed. You can always review the <a href="http://www.famzah.net/download/bifferboard/debootstrap-postconfig.sh">debootstrap-postconfig.sh</a> script for details on what is being configured.</p>
<p>You can use this image/disk as a rootfs which you can boot directly on Bifferboard or try in Qemu. Note that you have to install our Debian kernel on Bifferboard prior to booting this rootfs.</p>
<hr />
<p>Used resources:</p>
<ul>
<li><a href="http://www.debian-administration.org/articles/426">Debian Administration: Installing new Debian systems with debootstrap</a></li>
<li><a href="https://help.ubuntu.com/6.10/ubuntu/installation-guide/hppa/linux-upgrade.html">Installing Ubuntu from a Unix/Linux System</a></li>
</ul>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Create a Qemu image file which you can mount in both Linux and Qemu]]></title>
<link>http://blog.famzah.net/2009/11/16/create-a-qemu-image-file-which-you-can-mount-in-both-linux-and-qemu/</link>
<pubDate>Mon, 16 Nov 2009 12:01:21 +0000</pubDate>
<dc:creator>Ivan Zahariev</dc:creator>
<guid>http://blog.famzah.net/2009/11/16/create-a-qemu-image-file-which-you-can-mount-in-both-linux-and-qemu/</guid>
<description><![CDATA[The idea is to be able to easily manage a Qemu image outside of Qemu, natively on Linux. This can he]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>The idea is to be able to easily manage a Qemu image outside of Qemu, natively on Linux. This can help you to alter the files on the Qemu image easily on Linux and then test the modified Qemu image on a Qemu virtual machine.</p>
<p>You can download an empty, formatted with Ext3 Qemu raw image at the following URL address:</p>
<ul>
<li><a href="http://www.famzah.net/download/qemu/empty-ext3-2GB.img.tgz">empty-ext3-2GB.img.tgz</a> (download size is 2 MBytes)</li>
</ul>
<hr />
<p>There is nothing special about how you can achieve this yourself:</p>
<ul>
<li>Create an empty Qemu image file.</li>
<li>Run an installation CD of Debian (or any other Linux) under Qemu and use the empty image as an available hard disk.</li>
<li>Partition and format the Qemu hard disk (resp. the Qemu image file) using the Linux installer.</li>
<li>Interrupt the Linux installer, stop Qemu, mount the Qemu image on Linux and clean it up.</li>
</ul>
<p>You can achieve the above using the following commands:</p>
<blockquote><p><code># make sure to update the .iso URL if needed<br />
$ wget http://cdimage.debian.org/debian-cd/5.0.3/i386/iso-cd/debian-503-i386-netinst.iso<br />
$ qemu-img create hd0.img 2G<br />
$ qemu -hda hd0.img -cdrom debian-503-i386-netinst.iso -boot d<br />
# continue with the installation to the point where you can set up the partitions<br />
# set up a primary partition using the entire disk space, do not set up a swap partition; save changes to disk and continue<br />
# interrupt the installation (for example from the second console by executing "halt"), stop the virtual machine, we will not need it any further<br />
$ sudo mkdir -p /mnt/diskimage<br />
$ sudo mount -o loop,offset=32256 hd0.img /mnt/diskimage<br />
$ sudo rm -r /mnt/diskimage/*<br />
$ sudo mkdir -m 0700 '/mnt/diskimage/lost+found'<br />
$ sudo umount /mnt/diskimage</code></p></blockquote>
<p>Now we have an empty Qemu image which we can mount in both Linux and Qemu.</p>
<p>Here is an example on how to mount this image in Qemu:</p>
<blockquote><p><code>qemu -usb -usbdevice disk:hd0.img</code></p></blockquote>
<p>Do not use the image simultaneously as Linux mount and Qemu hard disk.</p>
<hr />
<p>Used resources:</p>
<ul>
<li><a href="http://www.gnu.org/software/hurd/hurd/running/qemu.html">Installing Debian/Hurd with QEMU</a></li>
</ul>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Qemu .deb package for the RDC Bifferboard hardware]]></title>
<link>http://blog.famzah.net/2009/11/10/qemu-deb-package-for-the-rdc-bifferboard-hardware/</link>
<pubDate>Tue, 10 Nov 2009 18:57:06 +0000</pubDate>
<dc:creator>Ivan Zahariev</dc:creator>
<guid>http://blog.famzah.net/2009/11/10/qemu-deb-package-for-the-rdc-bifferboard-hardware/</guid>
<description><![CDATA[Following the instructions found at these articles, I build a .deb package for Qemu which is suitabl]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>Following the instructions found at <a href="http://blog.famzah.net/2009/11/03/build-a-deb-package-from-scratch/">these articles</a>, I build a .deb package for Qemu which is suitable for the RDC processor which is used by <a href="http://bifferos.bizhat.com/">Bifferboard</a>. The instructions and patches can be found at <a href="http://sites.google.com/site/bifferboard/Home/howto/qemu">the official Qemu Wiki page of Bifferboard</a>.</p>
<p>There is nothing special I&#8217;ve done here, just packaged the qemu binary, so that you can easily try the &#8220;qemu-rdc&#8221; binary. The download link follows:</p>
<ul>
<li><a href="http://www.famzah.net/download/bifferboard/qemu-rdc_0.10.5-1_i386.deb">qemu-rdc_0.10.5-1_i386.deb</a> (595K)</li>
</ul>
<p>Here are some simple instructions on how to test your own &#8220;bzImage&#8221; kernel build:</p>
<blockquote><p><code>#<br />
# Installation instructions for the .deb package and for the Qemu setup<br />
#<br />
famzah@FURNA:~$ wget http://www.famzah.net/download/bifferboard/qemu-rdc_0.10.5-1_i386.deb<br />
famzah@FURNA:~$ sudo dpkg -i qemu-rdc_0.10.5-1_i386.deb<br />
famzah@FURNA:~$ mkdir test-kernel<br />
famzah@FURNA:~$ cd test-kernel/<br />
famzah@FURNA:~/test-kernel$ svn co https://bifferboard.svn.sourceforge.net/svnroot/bifferboard/qemu/<br />
famzah@FURNA:~/test-kernel$ cd qemu/run<br />
famzah@FURNA:~/test-kernel/qemu/run$ vi run-qemu.sh # at the last line, change "qemu" with "qemu-rdc"</p>
<p>#<br />
# You can now test your kernel/rootfs build. For example:<br />
#<br />
famzah@FURNA:~/test-kernel/qemu/run$ cp /home/famzah/biffer/qemu/custom_bzImage ./bzImage<br />
famzah@FURNA:~/test-kernel/qemu/run$ QEMU_BIN=qemu-rdc ./run-qemu.sh</code></p></blockquote>
<p>If you want to attach a USB mass-storage device and try your rootfs build there, please follow the instructions at <a href="http://sites.google.com/site/bifferboard/Home/howto/qemu">the official Qemu Wiki page of Bifferboard</a> on which parameters to add to &#8220;qemu-rdc&#8221; in &#8220;run-qemu.sh&#8221;.</p>
<p>You can exit the emulator by pressing CTRL+a and &#8220;x&#8221;. You will get some help info by pressing CTRL+a and &#8220;?&#8221;. See the man or <a href="http://www.qemu.org/qemu-doc.html#SEC11">documentation pages of &#8220;qemu&#8221;</a> for more information.</p>
<p>In a few days I&#8217;ll post an article and a .deb package for a kernel 2.6.30.5 build with (almost) all possible modules, suitable for running a native i386 Debian rootfs installation on Bifferboard.</p>
<p>P.S. Today I got my serial USB  RS232 @ 3.3V cable and can now start with some real tests <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Planai]]></title>
<link>http://courapca.wordpress.com/2009/10/26/planai/</link>
<pubDate>Mon, 26 Oct 2009 13:55:48 +0000</pubDate>
<dc:creator>courapca</dc:creator>
<guid>http://courapca.wordpress.com/2009/10/26/planai/</guid>
<description><![CDATA[Šalia grafinių darbelių nusprendžiau išbandyti ir keletą TVS naujoje savo konfigūracijoje. LAMP (Lin]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>Šalia grafinių darbelių nusprendžiau išbandyti ir keletą TVS naujoje savo konfigūracijoje. <a href="http://www.unixmen.com/linux-distributions/linux-mint/266-how-to-install-lamp-an-phpmyadmin-on-linuxmint-7-gloria-">LAMP</a> (<strong>L</strong>inux <strong>A</strong>pache <strong>M</strong>ySQL <strong>P</strong>HP) serverį pasileidau be problemų. Kadangi su <a href="http://www.wordpress.org">wordpress</a> jau esu pažįstamas tai artimiausiu metu išmėginsiu <a href="http://www.drupal.org">Drupal</a> (jau suinstaliavau, dabar tereikia užmanyti kokį projektuką, kad būtų įdomiau nei &#8220;Hello, World&#8221;). Vėliau &#8220;pačiupinėsiu&#8221; ir kitas sistemas. Galbūt netgi savo ką nors paPHPinsiu paprastiem puslapiam vaizduoti.</p>
<p>Ir šiandien išbandysiu kaip veikia <a href="http://sirex.raguvele.lt/node/114">virtualizuoti winXP iš po linux</a> (licenciją turiu oficialią, o ir šiaip įdomu). Tuo pačiu pastudijuosiu ir QEMU, o vėliau ir kitus virtualizatorius. Vakar mėginau instaliuoti iš CD, tačiau, kadangi aš dirbu GNOME aplinkoj (įtariu todėl), man nepasileido kqemu modulis, kas labai stabdo virtualios sistemos darbą. Šiandien mėginsiu iš *.iso failo instaliuoti, jei greitis bus panašus, tuomet mėginsiu virtualbox ar dar ką nors. Na ir, aišku pamėginsiu parašyti čia, kaip gi man sekėsi.</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Falando de virtualização]]></title>
<link>http://brunosimioni.wordpress.com/2009/10/19/falando-de-virtualizacao/</link>
<pubDate>Tue, 20 Oct 2009 02:40:54 +0000</pubDate>
<dc:creator>Bruno Simioni</dc:creator>
<guid>http://brunosimioni.wordpress.com/2009/10/19/falando-de-virtualizacao/</guid>
<description><![CDATA[Este post faz referência sobre virtualização computacional, modelo de abstração de recursos computac]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p style="text-align:justify;">Este post faz referência sobre virtualização computacional, modelo de abstração de recursos computacionais, afim de prover redução de recursos necessários para consolidar diferentes arquiteturas, sob um único hardware básico (ou avançado, indo do gosto do freguês).</p>
<p style="text-align:justify;">Pretendo cobrir a parte sobre virtualização de sistemas operacionais (virtualização de plataformas), portanto, não falarei detalhadamentesobre as outras abordagens de virtualização. Apesar de ser um assunto relativamente novo, é um assunto, ao mesmo tempo, relativamente muito velho. Entendo por virtualização a grande invenção da <span style="text-decoration:underline;">memória virtual </span>(que abstrai um segundo dispositivo de armazenamento, como memória principal, e estende sobre esse o espaço de endereçamento de instruções), as <span style="text-decoration:underline;">interfaces virtuais de rede </span>(onde, por exemplo, dependendo das capacidades do dispositivo, pode-se criar diversas interfaces de rede virtuais, com diversos pontos de acesso em IP, por exemplo, sob um único dispositivo físico), as <span style="text-decoration:underline;">interfaces virtuais de armazenamento</span> (que podem ser, desde abstrações via rede, até um storage inteiro virtual), <span style="text-decoration:underline;">VPNs</span> (que nada mais são que redes inteiras virtuais),<span style="text-decoration:underline;"> virtualização de desktops</span> (como terminais burros, ou por exemplo, serviços de terminais remotos), <span style="text-decoration:underline;">virtualização e clustering de sistemas de gestão de bancos de dados</span>, e por aí vai!</p>
<p style="text-align:justify;"><strong> Falando sobre Hypervisor</strong></p>
<p style="text-align:justify;">Para entrar no tema que eu quero sobre virtualização, não dá pra começar sem falar de uma entidade chamada de <em>Hypervisor</em>. Este é o sujeito responsável por prover uma interface lógica entre o que vai prover um ambiente de virtualização (chamado comumente de <em>hospedeiro</em>) e o que vai ser virtualizado (chamado comumente de <em>convidado</em>). Técnicamente, é uma porção de código que é executado pelo software hospedeiro, e age como um controlador de hardware e monitor do sistema operacional do software convidado. Geralmente, nesses moldes, o sistema operacional convidado, executa sob um nível abaixo do nível do <em>Hypervisor</em>.</p>
<p style="text-align:justify;">A primeira figura exibe quais as camadas definidas na arquitetura de virtualização a qual estou me referindo.</p>
<p style="text-align:center;"><img class="aligncenter size-full wp-image-57" title="figure1" src="http://brunosimioni.wordpress.com/files/2009/10/figure1.gif" alt="figure1" width="383" height="153" /></p>
<p style="text-align:center;"><em>Figura 1 &#8211; Arquitetura básica da virtualização provida pelo Hypervisor.</em></p>
<p style="text-align:center;">
<p style="text-align:justify;">Há dois principais modos de execução do Hypervisor. O modo nativo (portanto, <em>para virtualization</em>), e o modo abrigado (portanto, <em>full virtualization</em>).</p>
<p style="text-align:justify;">O primeiro modo de execução, chamado abrigado (com a palavrinha mágica &#8211; <em>hosted</em>), faz com que toda a plataforma de hardware disponível ao convidado seja totalmente virtualizada. Portanto, são implementados e aplicados gatilhos e tratadores nas chamadas de sistema e instruções de máquina (instruções nativas &#8211; sistema operacional convidado não sofre nenhuma modificação) enviadas pelo sistema operacional convidado, e convertidas para as instruções de máquina e chamadas de sistema do sistema operacional hospedeiro, portanto, executadas nativamente. O resultado de tais ações é novamente convertido para o formato de retorno do sistema operacional convertido, e tudo caminha nas mil maravilhas.</p>
<p style="text-align:justify;">A figura 2 mostra um modelo esquemático de aplicação do modelo 1 do Hypervisor.</p>
<p style="text-align:justify;"><img class="aligncenter size-full wp-image-58" title="figure2" src="http://brunosimioni.wordpress.com/files/2009/10/figure2.gif" alt="figure2" width="327" height="242" /></p>
<p style="text-align:center;"><em>Figura 2 &#8211; Arquitetura básica do modelo hospedado.</em></p>
<p style="text-align:justify;">Definem-se como vantagens dessa abordagem, o fato sistema operacional convidado não precisa ser modificado; para este, é uma máquina física como qualquer outra. Não há custos adicionais, nem modificação no software original, reservando as características originais do sistema operacional convidado. A grande desvantagem dessa abordagem é o desempenho comprometido (em relação ao desempenho original, o que não significa que fique lento &#8211; leia-se sem condições mínimas de emprego em um ambiente corporativo de produção). A queda do desempenho dá-se pela interpretação de todas as instruções disparadas pelo hardware virtual disponível para a máquina convidada. Além disso, claro, ainda há o escalonamento de processos do sistema operacional, através de um núcleo premptivo.</p>
<p style="text-align:justify;">O segundo modo de execução, chamado nativo (com a palavrinha mágica &#8211; <em>bare-metal</em>), cria um meio termo nas coisas. Através de um núcleo de chamadas de sistema (vulgo <em>Kernel</em>, no mundo *nix) modificado, torna o sistema operacional convidado, alguém que sabe que está sendo virtualizado, mas que consegue, através desse núcleo modificado, alcançar nativamente o hardware disponível na arquitetura do sistema hospedeiro. Mágico, não?</p>
<p style="text-align:justify;">Este novo núcleo, é então parte do <em>Hypervisor</em> (que agora é parte do sistema operacional convidado, e parte do sistema operacional hospedeiro), fazendo com que seja mais simples chegar ao hardware, e fazer algumas traduções das chamadas mais críticas do sistema.</p>
<p style="text-align:justify;">Como vantagens da técnica, está principalmente o desempenho, tornando as coisas mais fáceis, fazendo com que não haja tradução de instruções, nem emulação de hardware. Por exemplo, se você comprou sua nova Intel® PRO/1000 GT <em>Desktop</em> <em>Adapter</em>, ele vai ser Intel no sistema hospedeiro, e Intel no sistema convidado. Na primeira abordagem, ela seria Intel no sistema hoespedeiro, e <em>Network Virtual Driver</em>, no sistema convidado. A principal desvantagem é a modificação do núcleo do sistema convidado, aumentando a probabilidade do número de falhas (por sair da árvore principal de desenvolvimento do software, e ter dedos de terceiros), incompatibilidade de padrões, aumento de custo de manutenção, e blá blá blá.</p>
<p style="text-align:justify;">A figura 3 define um modelo esquemático de como aconteceria a implantação do segundo caso.</p>
<p style="text-align:justify;"><img class="aligncenter size-full wp-image-59" title="figure3" src="http://brunosimioni.wordpress.com/files/2009/10/figure3.gif" alt="figure3" width="334" height="257" /></p>
<p style="text-align:center;"><em>Figura 3 &#8211; Implantação do modelo nativo do Hypervisor.</em></p>
<p>Em relação ao modelo de virtualização de plataformas, com a presença de um <em>Hypervisor</em>, o assunto termina por aqui. Não há muito mais novidades na área.</p>
<p style="text-align:justify;">Continuando com o assunto de virtualização, é válido dizer que o hardware x86 é particularmente difícil de virtualizar. Com essa motivação, tanto a Intel, quanto a AMD, criaram tecnologias de virtualização diretamente embutidas no processador. A Intel a chamou de Intel-VT (VanderPool), e a AMD, AMD-V (Pacifica). Tais extensões são responsáveis por adicionar capacidades que são difíceis ou ineficientes de virtualizar via software, facilitando o trabalho do pessoal que desenvolve na área.</p>
<p style="text-align:justify;"><strong>Falando sobre implementações</strong></p>
<p style="text-align:justify;">Há diversos softwares comerciais e livres que implementam este modelo de monitor de máquinas virtuais, e com a idéia geral de virutalização de plataformas, dá pra nomear algumas categorias, de forma simplificada, e alguns softwares virtualizadores, que a implementam.</p>
<p style="text-align:justify;">No<strong> primeiro modelo</strong>,<strong> nativo</strong>, encaixam-se nomes como VMware ESX Server, IBM System z Hypervisor, Microsoft Hyper-V, Xen, Citrix XenServer, Oracle VM Server, Parallels Server, Sun&#8217;s Logical Domains Hypervisor, e finalmente, o Kernel-based Virtual Machine (KVM), disponível nas distribuições empresariais de Linux. Todos esses softwares permitem a virtualização do sistema operacional hospedeiro, bem como o sistema operacional convidado, exigindo a modificação de seu núcleo.</p>
<p style="text-align:justify;">Já no <strong>segundo modelo</strong>,<strong> hospedado</strong>, encaixam-se nomes como VMware Server, VMware Workstation, VMware Fusion, o projeto livre QEMU, Microsoft Virtual PC e Microsoft Virtual Server, Sun&#8217;s VirtualBox, Parallels Workstation e Parallels Desktop. Estes software virtualizam qualquer sistema opercional comum, sem a necessidade de sua modificação.</p>
<p style="text-align:justify;"><strong>Virtualização e instâncias de sistemas operacionais</strong></p>
<p style="text-align:justify;">Especificamente, o Sun Solaris e o BSD, implementam um outro modelo de virtualização de sistema operacional.</p>
<p style="text-align:justify;">O Sun Solaris (a partir de 2005) implementa Zones, definido como um abstração virtual do sistema operaciona, onde aplicações executam. Tais aplicações são protegidas e separadas umas das outras. Através de uma única instância principal do sistema operacional, pode-se gerencial diversas Zones (como instâncias do mesmo sistema).</p>
<p style="text-align:justify;">O uso do gerenciamento de recursos da arquitetura em questão, faz com que uma Zone seja chamada de Container, criando o conceito de Solaris Containers. A maioria das pessoas utilizam  os dois termos, sem fazer distinção entre eles.</p>
<p style="text-align:justify;">Existem dois tipos de Zones. As Zones nativas, criam instâncias do mesmo sistema operacional (Solaris), enquanto as Branded Zones, disponibilizam uma insfra estrutura virtual de hardware, para que seja possível criar instâncias de outros sistemas operacionais, como o Linux, por exemplo.</p>
<p style="text-align:justify;">Da mesma maneira, existem os Jails (que vieram antes dos Containers, em 1990, criados a partir do FreeBSD). Jail implementa o mesmo sentido de abstração do sistema operacional, criando instâncias desse, fazendo com que haja muito mais flexibilidade do uso do sistema operacional, em um ambiente de produção.</p>
<p style="text-align:justify;">Acredito que o uso de instâncias de sistema operacional, tenha tido como principal motivação, a flexibilidade de modelos de segurança que o *nix não conseguia prover, mas isso é um outro assunto.</p>
<p style="text-align:justify;">Para terminar o post, volto a dizer que virtualização pode ser vista de diversas formas, e existem diversos modelos e ferramentas para implementar. Vão desde abstrações de hardware de entrada e saída, até abstrações do sistema operacional. O que vale realmente realmente,  é estudar e medir as necessidades e as disponibilidades, para que seja feita a escolha certa.</p>
<p style="text-align:justify;">O modelo de cloud computing se encaixa em virtualizações. É um tema recente, poderoso, mas com a escolha errada, pode se tornar extremamente perigoso.</p>
<p style="text-align:justify;">Até a próxima!</p>
<p>Referências:</p>
<p style="text-align:justify;">http://en.wikipedia.org/wiki/Virtualization</p>
<p style="text-align:justify;">http://en.wikipedia.org/wiki/Hypervisor</p>
<p style="text-align:justify;">http://www.sun.com/servers/coolthreads/ldoms/index.jsp</p>
<p style="text-align:justify;">http://en.wikipedia.org/wiki/Paravirtualization</p>
<p style="text-align:justify;">http://www.ibm.com/developerworks/br/library/l-hypervisor/index.html</p>
<p style="text-align:justify;">http://blogs.technet.com/lpalma/archive/2008/10/01/paravirtualiza-o-emula-o-bare-metal.aspx</p>
<p style="text-align:justify;">http://www.intel.com/products/desktop/adapters/pro1000gt/pro1000gt-overview.htm</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Debugging Linux Kernel Source Code with Eclipse on FC11]]></title>
<link>http://hwchoi.wordpress.com/2009/10/19/debugging-linux-kernel-source-code-with-eclipse-on-fc11/</link>
<pubDate>Mon, 19 Oct 2009 21:21:25 +0000</pubDate>
<dc:creator>hwchoi</dc:creator>
<guid>http://hwchoi.wordpress.com/2009/10/19/debugging-linux-kernel-source-code-with-eclipse-on-fc11/</guid>
<description><![CDATA[I found an amazing linux kernel debugging post on the web, in this summer. http://issaris.blogspot.c]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>I found an amazing linux kernel debugging post on the web, in this summer.</p>
<p><a href="http://issaris.blogspot.com/2007/12/download-linux-kernel-sourcecode-from.html" target="_blank">http://issaris.blogspot.com/2007/12/download-linux-kernel-sourcecode-from.html</a></p>
<p>More interestingly, this linux kernel debugging is using Eclipse. After following the procedure, I could create a good environment for debugging kernel source code. So, for  easy presentation, I created slides, based on my experiments. Hopefully, it helps some people who are in the beginning of hacking and programming linux kernel.</p>
<h3 style="text-align:center;"><strong><a href="http://hwchoi.wordpress.com/files/2009/10/debugkerneleclipse-hyungwonchoi.pdf">DebugKernelEclipse-HyungWonChoi (PDF)</a></strong></h3>
<p>These experiments were done in the following environment:</p>
<p style="padding-left:30px;">OS: Fedora Core 11 (2.6.29.4-167.fc11.i686.PAE)<br />
Linux Kernel Source Code: 2.6.30.2<br />
Eclipse version:<br />
- eclipse-cdt-5.0.2-2.fc11.i586<br />
- eclipse-platform-3.4.2-11.fc11.i586<br />
QEMU:<br />
- qemu-common-0.10-16.fc11.i586<br />
- qemu-kvm-0.10-16.fc11.i586<br />
- qemu-img-0.10-16.fc11.i586<br />
- qemu-system-x86-0.10-16.fc11.i586</p>
<p>Thanks..</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Aqemu - Virtuelle Maschinen grapisch verwalten]]></title>
<link>http://trompetenkaefer.wordpress.com/2009/10/10/aqemu-virtuelle-maschinen-grapisch-verwalten/</link>
<pubDate>Sat, 10 Oct 2009 20:16:08 +0000</pubDate>
<dc:creator>trompetenkaefer</dc:creator>
<guid>http://trompetenkaefer.wordpress.com/2009/10/10/aqemu-virtuelle-maschinen-grapisch-verwalten/</guid>
<description><![CDATA[Auf der Suche nach freien Alternativen zu Virtualbox bin ich auf Aqemu, ein grapisches QT4-Frontend ]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>Auf der Suche nach freien Alternativen zu <a href="http://www.virtualbox.org/">Virtualbox</a> bin ich auf Aqemu, ein grapisches QT4-Frontend für <a href="http://www.qemu.org/">qemu</a> gestoßen. Da ich qemu schon auf der Kommandozeile kannte, hab ich hin und her überlegt ob ich es überhaupt installieren soll&#8230;  <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<p>Nachdem die Neugierde doch überwog, hab ich über apt das Paket aqemu installiert. Ich war gleich angenehm überrascht, mit allen Abhängigkeiten (inkl. qemu) wurden nur ca. 8 MB Platz nach der Installation belegt.  Nach dem Start der Software begrüßte mich ein Fenster, das ähnlich wie das von Virtualbox aussieht. Also schon mal keine große Umgewöhnung zu meiner jetzigen Virtualisierungslösung. <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />  Eins vorweg, leider gibt es noch keine deutsche Lokalisierung für Aqemu unter Sid.</p>
<div id="attachment_48" class="wp-caption alignnone" style="width: 520px"><img src="http://trompetenkaefer.wordpress.com/files/2009/10/aqemu_einstellungen.png" alt="Einstellungsfenster" title="Aqemu Einstellungen" width="510" height="425" class="size-full wp-image-48" /><p class="wp-caption-text">Einstellungsfenster</p></div>
<p>Um eine Virtuellemaschine einzurichten viel meine Entscheidung auf den Wizard. In ein paar Schritten lässt sich kinderleicht eine neue Maschine samt virtueller Festplatte einrichten. Dabei ist die Generierung der virtuellen Platte unter Aqemu viel schneller als unter Virtualbox erledigt. Kein ewig langes warten bis eine 10 GB Platte eingerichtet/erstellt ist, nach dem Klick auf Apply ist die Machine bereit. Was ich auch toll finde, eine Netzwerkverbindung von der virtuellen Netzwerkkarte zur realen klappt auf Anhieb. </p>
<p>Da nun eine Netzwerkverbindung besteht habe ich über den Reiter &#8220;Device Manager&#8221; die neueste Version von Frugalware Netinstall direkt aus der ISO-Datei installiert. Hier seht selbst, Installation von Frugalware unter Aqemu:</p>
<div id="attachment_52" class="wp-caption alignnone" style="width: 310px"><img src="http://trompetenkaefer.wordpress.com/files/2009/10/aqemu_frugalware_installation1.png?w=300" alt="Aqemu Frugalware Installation" title="Aqemu Frugalware Installation" width="300" height="232" class="size-medium wp-image-52" /><p class="wp-caption-text">Aqemu Frugalware Installation</p></div>
<p>Nun läuft Frugalware unter (A)qemu anstandslos. Bedingt durch den geringeren Speicherverbrauch (Fesplatte), der schnellen Einrichtung und der intuitiven GUI wird Aqemu, Virtualbox auf meinem Schleppi ablösen. <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' />  Das einzige was mich jetzt noch stört ist der fehlende USB-Support, dazu müsste ich mir einen neuen Kernel backen&#8230; Mal gucken, wenn ich mal die Muße dazu habe mach ichs vielleicht. <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Hewlett-Packard t5510 et Linux]]></title>
<link>http://bytesnwires.wordpress.com/2009/09/08/t5510-linux/</link>
<pubDate>Tue, 08 Sep 2009 14:48:03 +0000</pubDate>
<dc:creator>bytesnwires</dc:creator>
<guid>http://bytesnwires.wordpress.com/2009/09/08/t5510-linux/</guid>
<description><![CDATA[Slitaz sur un Hewlett-Packard t5510 sans écran ou Linux dans 32Mo sur une carte mini-ITX Fanless Des]]></description>
<content:encoded><![CDATA[Slitaz sur un Hewlett-Packard t5510 sans écran ou Linux dans 32Mo sur une carte mini-ITX Fanless Des]]></content:encoded>
</item>
<item>
<title><![CDATA[Qemu Networking (Tun/Tap)]]></title>
<link>http://mohan43u.wordpress.com/2009/09/05/qemu-networking-tuntap/</link>
<pubDate>Sat, 05 Sep 2009 01:01:36 +0000</pubDate>
<dc:creator>mohan43u</dc:creator>
<guid>http://mohan43u.wordpress.com/2009/09/05/qemu-networking-tuntap/</guid>
<description><![CDATA[Hi friends, Setting up networking in Qemu instance is very simple if you are using &#8216;user mode]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>Hi friends,</p>
<p>Setting up networking in Qemu instance is very simple if you are using &#8216;user mode&#8217; networking stack. And most of us don&#8217;t care about Full fledged networking while using Qemu Guests. But configuring Network in Qemu with full access requires TUN/TAP configuration.</p>
<p>Here is some simple steps which I did to configure TUN/TAP in Ubuntu 9.04,</p>
<p>Inside Ubuntu(Host), type the following commands:</p>
<pre style="background:green;color:yellow;white-space:pre-wrap;">$ sudo apt-get install qemu kqemu-common kqemu-source
$ wget ftp://ftp.osuosl.org/pub/lfs-livecd/lfslivecd-x86-6.3-r2145-min.iso
$ sudo qemu -cdrom lfslivecd-x86-6.3-r2145-min.iso -boot d -kernel-kqemu -m 512 -net nic -net tap &#38;
$ sudo ifconfig tap0 192.168.10.1
$ sudo sysctl -w net.ipv4.ip_forward=1
$ sudo iptables -t nat -A POSTROUTING -j MASQUERADE
$ sudo iptables -t filter -P FORWARD ACCEPT
</pre>
<p>Inside lfslivecd(Guest) type the following commands:</p>
<pre style="background:green;color:yellow;white-space:pre-wrap;">$ ifconfig eth0 192.168.10.2
$ route add default gw 192.168.10.1
$ cat &#62; /etc/resolv.conf &#60;&#60;EOF
nameserver 208.67.222.222
nameserver 208.67.220.220
EOF
$
</pre>
<p>Ofcourse, you can use any distro as a guest in qemu. Enjoy Qemuing.</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Share your Qemu Guest with your Friends]]></title>
<link>http://mohan43u.wordpress.com/2009/09/02/share-your-qemu-guest-with-your-friends/</link>
<pubDate>Wed, 02 Sep 2009 08:21:24 +0000</pubDate>
<dc:creator>mohan43u</dc:creator>
<guid>http://mohan43u.wordpress.com/2009/09/02/share-your-qemu-guest-with-your-friends/</guid>
<description><![CDATA[Hi friends, Don&#8217;t know about the how useful it will be, but I found some way to enable my frie]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>Hi friends,</p>
<p>Don&#8217;t know about the how useful it will be, but I found some way to enable my friends to access my Qemu Guest Instance running LFSLiveCD in Ubuntu Host using &#8217;ssh&#8217;. Here is the steps I did,</p>
<p>1. Download Qemu Packages</p>
<pre style="background:green;color:yellow;white-space:pre-wrap;">
$ sudo apt-get install qemu kqemu-common kqemu-source
</pre>
<p>2. Download LFSLiveCD from <a href="http://www.linuxfromscratch.org/livecd/download.html">here</a></p>
<p>3. Now start the LFSLiveCD guest using the following command</p>
<pre style="background:green;color:yellow;white-space:pre-wrap;">
$ qemu -cdrom lfslivecd-x86-6.3-r2145-min.iso -boot d -m 512 -net nic -net user -redir tcp:35000::22
</pre>
<p>4. Now Qemu will start &#8216;LFSLiveCD&#8217; with user mode network stack, that is, from LFSLiveCD, ip 10.0.2.2 will be the Default gateway and DHCP server. ip 10.0.2.3 will be the DNS server and the LFSLiveCD will get 10.0.2 15. If you look &#8216;netstat&#8217; output in Host(here Ubuntu), there will be a line which tells port &#8216;35000&#8242; is listening. Qemu process is listening in that port, it will redirect connections from Host(Ubuntu&#8217;s) 35000 port to Guest(LFSLiveCD&#8217;s) 22(ssh) port. All we need to do is, start &#8217;ssh&#8217; service in LFSLiveCD Guest. Type the following command in Qemu.</p>
<pre style="background:green;color:yellow;white-space:pre-wrap;">
[root:]# cd /etc/rc.d/init.d
[root:]# ./sysklogd start
[root:]# ./sshd start
[root:]# passwd
New Password: [newrootpassword]
Retype New Password: [newrootpassword]
[root:]# tail -f /var/log/*.log
</pre>
<p>Now you have &#8217;sshd&#8217; running in the guest, and you also changed the &#8216;root&#8217; password to a known password. All you need to do is, ask your friends to &#8217;ssh&#8217; to your Host&#8217;s(Ubuntu) ip address but with &#8216;35000&#8242; port instead of default &#8216;22&#8242; port. And ask them to login as &#8216;root&#8217; as userid and &#8216;[newrootpassword]&#8216; as password. Your friends will be so much happy to see thay are became &#8216;root&#8217;. In the mean while you can also login to your guest with &#8217;ssh root@127.0.0.1 -p 35000&#8242;. If you want, add a new user and share that userid and password to your friends, so that they can have less power.</p>
<p>Instead of Ubuntu Host, We can do this in Windows XP, as a Normal powerless user. The below thing you need to do,</p>
<p>1. Download QemuManager Zipfile Edition from <a href="http://www.davereyn.co.uk/qem/qman60.zip">here</a>.<br />
2. Download LFSLiveCD from <a href="http://www.linuxfromscratch.org/livecd/download.html">here</a>.<br />
3. Configure LFSLiveCD inside QemuManager(follow this <a href="http://www.davereyn.co.uk/qem/qemumanager6.pdf">Guide</a>).<br />
4. While configuring Network, DoubleClick &#8216;NetWork Card 1&#8242;, GoTo Port Redirectors tab, type &#8216;35000&#8242; in &#8216;Port Visible to Host&#8217; and &#8216;22&#8242; in &#8216;Port Visible On Guest&#8217; and click &#8216;Add&#8217; button.<br />
5. Start &#8216;LFSLiveCD&#8217; Qemu Guest. and Do all changes I explained above to start &#8217;sshd&#8217; inside LFSLiveCD.<br />
6. Download &#8216;Putty.exe&#8217; from <a href="http://the.earth.li/~sgtatham/putty/latest/x86/putty.exe">here</a>.<br />
7. Start &#8216;Putty.exe&#8217; with Host as &#8216;127.0.0.1&#8242; and Port as &#8216;35000&#8242; and Connection Type as &#8217;ssh&#8217;.<br />
8. Login with &#8216;root&#8217; as username and &#8216;[newrootpassword]&#8216; as your password.<br />
9. If you want to share your Qemu Guest, with your windows friends who&#8217;s machines and your&#8217;s machine are in same subnet, then ask them to start &#8216;putty.exe&#8217; with host as your machine&#8217;s ip address, port as &#8216;35000&#8242;, username as &#8216;root&#8217; and password as &#8216;[newrootpassword]&#8216;. You can also create seperate &#8216;user&#8217; in your Guest(LFSLiveCD) and share with your friends.<br />
10. Enjoy Virtualization.</p>
<p>I also tried this method in my friend&#8217;s Vista laptop, but it failed!! First, it is not allowing to run QemuManager.exe as a normal user, Second, it is giving warning while opening &#8216;35000&#8242; as listening port, Finally, &#8216;putty.exe&#8217; is not at all connecting to Guest Instance, even though &#8217;sshd&#8217; is running in the LFSLiveCD Guest. If anyone have success story, kindly share.</p>
<p>Finally Thanks to my company for blocking access to the linux learning server, which make me to go for alternate methods and finally endup in the Windows XP method.</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Processor Simulator, Emulator and Virtulization for Linux]]></title>
<link>http://mohammadthalif.wordpress.com/2009/08/29/processor-simulator-emulator-and-virtulization-for-linux/</link>
<pubDate>Sat, 29 Aug 2009 04:43:15 +0000</pubDate>
<dc:creator>mohammadthalif</dc:creator>
<guid>http://mohammadthalif.wordpress.com/2009/08/29/processor-simulator-emulator-and-virtulization-for-linux/</guid>
<description><![CDATA[I am listing here some of the virtualization tools used in Linux . User Mode Linux (UML) &#8211; htt]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>I am listing here some of the virtualization tools used in Linux .</p>
<ol>
<li>User Mode Linux (UML) &#8211; http://user-mode-linux.sourceforge.net</li>
<li>Qemu &#8211; http://www.qemu.org</li>
<li>KVM &#8211; http://www.linux-kvm.or</li>
<li>Bochs &#8211; http://bochs.sourceforge.net</li>
<li>CoLinux &#8211; http://www.colinux.org</li>
<li>VirtualBox &#8211; http://www.virtualbox.org</li>
<li>VMware &#8211; http://www.vmware.com<cite><strong></strong></cite></li>
<li>GXemul &#8211; http://gxemul.sourceforge.net</li>
<li>OpenVZ &#8211; http://wiki.openvz.org/Main_Page</li>
<li>Skyeye &#8211; http://skyeye.sourceforge.net</li>
<li>Xen -  https://www.xen.org</li>
<li>Virtual PC &#8211; http://www.microsoft.com/windows/virtual-pc/</li>
<li>OVP &#8211; http://www.ovpworld.org/index.php</li>
</ol>
<div class="zemanta-pixie"><img class="zemanta-pixie-img" src="http://img.zemanta.com/pixy.gif?x-id=3a17076f-9785-81a5-8e1f-5beacf9dc282" alt="" /></div>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Qemu and vmware internetworking]]></title>
<link>http://juniperhacks.wordpress.com/2009/08/24/qemu-and-vmware-internetworking/</link>
<pubDate>Mon, 24 Aug 2009 12:54:10 +0000</pubDate>
<dc:creator>hacksjuniper</dc:creator>
<guid>http://juniperhacks.wordpress.com/2009/08/24/qemu-and-vmware-internetworking/</guid>
<description><![CDATA[Good info on how to get qemu and vmware vms to talk http://stupefydeveloper.blogspot.com/2008/08/vm-]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>Good info on how to get qemu and vmware vms to talk</p>
<p>http://stupefydeveloper.blogspot.com/2008/08/vm-networking-qemu-and-vmware.html</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Half-baked ideas: inject syscalls into virtual machines]]></title>
<link>http://rwmj.wordpress.com/2009/08/18/half-baked-ideas-inject-syscalls-into-virtual-machines/</link>
<pubDate>Tue, 18 Aug 2009 22:45:35 +0000</pubDate>
<dc:creator>rich</dc:creator>
<guid>http://rwmj.wordpress.com/2009/08/18/half-baked-ideas-inject-syscalls-into-virtual-machines/</guid>
<description><![CDATA[For more half-baked ideas, see my &#8220;ideas&#8221; tag. After we wrote virt-df and later libguest]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>For more half-baked ideas, see <a href="http://rwmj.wordpress.com/tag/ideas/">my &#8220;ideas&#8221; tag</a>.</p>
<p>After we wrote virt-df and later <a href="http://libguestfs.org/">libguestfs</a>, what customers were asking me about was to be able to read out of /proc and /sys in a running virtual machine.</p>
<p>Of course that&#8217;s not possible with libguestfs.  libguestfs reads the filesystem.  /proc is a synthetic &#8220;filesystem&#8221; that only exists in the living C structs in the Linux kernel.  What&#8217;s worse, those structs change with every release and every vendor specific patch.  Following C structs is not easy, although we did it (with the help of a giant database) for virt-mem.</p>
<p>The prize of being able to &#8220;read&#8221; /proc is great &#8212; reading out statistics, process tables, network configuration, and much more information besides.</p>
<p>To do this tractably, what we need is to be able to inject syscalls into the virtual machine.  If we could inject the following sequence of syscalls, we&#8217;d be able to read /proc in a completely portable manner without needing to chase kernel structs:</p>
<pre>
open ("/proc", O_RDONLY);
getdents (fd, ...);
read (fd, ...);
</pre>
<p>Here is my half-baked idea for how to do it.</p>
<ol>
<li> Wait for a userspace program to be running.  Then pause the VM.
<li> Fork qemu, so we have a complete copy of the VM, its state, memory and so on.  The original (parent) process can now be resumed, and hence the VM resumes.  The rest of this discussion concerns only the child process.
<li> Disconnect qemu from any outside influence.  This means disconnecting any block devices, network devices, and perhaps other devices.  This ensures our private copy of the VM can&#8217;t accidentally overwrite any state from the real, running VM.
<li> At this point we have a &#8220;captured&#8221; userspace process in the VM.  It doesn&#8217;t particularly matter which process we happened to capture.  We now set up the stack frame and registers for the system call we want to execute.  Any previous contents of the memory and registers can be discarded.
<li> Set the emulation running.  (The captured userspace process now runs and performs the syscall).
<li> Trap back into qemu when the syscall exits.
<li> Capture the return value from the syscall, which might be a status code, error or read buffer.  In any case, we&#8217;ve successfully injected a syscall into the VM and this has allowed us to read something out of /proc.
<li> Discard the qemu child process.
</ol>
<p>We make the modest assumption that the syscall we chose will run without scheduling.  Even if it does schedule, the fact that we have disconnected qemu from any block devices (writes effectively go to /dev/null) should mean at least it won&#8217;t damage anything.</p>
<p>Notice that we&#8217;re using the public syscall interface to the Linux kernel, not depending on the details of changing internal structures.</p>
<p>As ideas go this seems tractable, although the implementation is both technically difficult and probably hard to get upstream.  We need a way to trap-and-pause when a VM switches to userspace.  We need to be able to fork the VM and do all sorts of modifications on our copy.  Then we would need some nice wrappers around this so the user just has to type &#8220;virt-ifconfig myvm&#8221; (note: previously we implemented virt-ifconfig as part of the virt-mem project by chasing kernel structs).</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Qemu: Montando imagens.]]></title>
<link>http://cabelovivaolinux.wordpress.com/2009/08/11/qemu-montando-imagens/</link>
<pubDate>Tue, 11 Aug 2009 00:50:12 +0000</pubDate>
<dc:creator>cabelovivaolinux</dc:creator>
<guid>http://cabelovivaolinux.wordpress.com/2009/08/11/qemu-montando-imagens/</guid>
<description><![CDATA[Para montar  uma image  do QEMU  no filesystem,  devemos calcular  o [offset] da  partição. Ou seja ]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>Para montar  uma image  do QEMU  no filesystem,  devemos calcular  o [offset] da  partição. Ou seja multiplicar o setor inicial por 512 (quantiade de  bytes por setor). Veja o simples exemplo abaixo:</p>
<pre># sfdisk -luS hda1DB91.img
Disco hda1DB91.img: não foi possível obter a geometria

Disco hda1DB91.img: 248 cilindros, 255 cabeças, 63 setores/trilha
Unidades = setores de 512 bytes, contando a partir de 0

 Device Boot    Start       End   #sectors  Id  System
hda1DB91.img1            63    530144     530082  82  Linux swap / Solaris
<span style="color:#3366ff;">hda1DB91.img2   *    <strong><span style="color:#000080;">530145</span></strong>   3984119    3453975  83  Linux</span>
hda1DB91.img3             0         -          0   0  Vazia
hda1DB91.img4             0         -          0   0  Vazia</pre>
<p>Efetue  o seguinte cálculo (setor inicial*512):</p>
<p>530145*512= 271434240</p>
<p>Agora  utilize o comando mount.</p>
<pre><strong># mount -o loop,ro,noexec,offset=271434240 hda1DB91.img /mnt/suse9.1</strong></pre>
<p>Simples não&#8230;</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Ouverture officielle du Blog Pistache`]]></title>
<link>http://kernelcontrol.wordpress.com/2009/08/06/ouverture-officielle-du-blog-pistache/</link>
<pubDate>Thu, 06 Aug 2009 15:45:49 +0000</pubDate>
<dc:creator>Pistache`</dc:creator>
<guid>http://kernelcontrol.wordpress.com/2009/08/06/ouverture-officielle-du-blog-pistache/</guid>
<description><![CDATA[Depuis le temps que je voulais mettre en ligne un petit blog sur lequel je pourrais poster de temps ]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p style="text-align:justify;">Depuis le temps que je voulais mettre en ligne un petit blog sur lequel je pourrais poster de temps à autres quelques news et articles en rapport avec l&#8217;informatique, aujourd&#8217;hui je me lance enfin.  J&#8217;essaierai d&#8217;écrire sur Blog Pistache` deux à quatre fois par semaines pour parler le plus souvent de PHP et d&#8217;Ubuntu, plus généralement de développement web et de Linux. D&#8217;autres sujets seront sûrement abordés:  <a title="Le site de WordPress" href="http://www.wordpress.com">WordPress</a>, puisque c&#8217;est la plateforme de gestion de blogs que je suis amené à découvrir, quelques news personnelles ou informatiques, certainement des coups de gueule (je ne sais pas encore sur quoi mais je trouverai bien)&#8230; Le but de ce blog étant principalement de communiquer le peu de savoir et d&#8217;expérience que je possède, j&#8217;essaierai de remplir cette tâche du mieux que je pourrai. Blog Pistache` est aussi un bon moyen pour moi de garder un œil sur la blogosphère, puisque dans le domaine des nouvelles technologies en général, être en veille est primordial si on ne veut pas se retrouver, dans moins de temps qu&#8217;il n&#8217;en faut pour l&#8217;écrire, aussi dépassé qu&#8217;un Hello World en Fortran.</p>
<p style="text-align:justify;"><!--more--></p>
<p style="text-align:justify;">Je profite aussi de ce premier post pour annoncer que le lancement de mon blog coïncide avec l&#8217;installation toute fraîche sur mon laptop de la dernière Ubuntu stable en date à savoir <a title="Télécharger Ubuntu 9.04" href="http://www.ubuntu-fr.org/telechargement" target="_blank">Ubuntu 9.04</a> aka <em>Jaunty Jackalope</em>. Avant de tout reformater j&#8217;avais en dual boot Windows XP et une précédente version d&#8217;Ubuntu, mais ça faisait longtemps je n&#8217;utilisais plus les partitions de Windows que comme support de stockage et ce grâce à un magnifique écran bleu qui ne manquait jamais de s&#8217;afficher à chaque tentative d&#8217;accès au système d&#8217;exploitation de Microsoft. Cette fois j&#8217;ai bien pris garde de n&#8217;installer que Linux et si un jour des envies masochistes me reprennent il y aura toujours <a title="QEMU sous Ubuntu" href="http://doc.ubuntu-fr.org/qemu" target="_blank">QEMU</a> ou même <a title="VirtualBox sous Ubuntu" href="http://doc.ubuntu-fr.org/virtualbox">VirtualBox</a>. Donc après avoir personnalisé ma nouvelle Ubuntu voici ce que ça a donné :</p>
<div id="attachment_16" class="wp-caption aligncenter" style="width: 511px"><a href="http://kernelcontrol.wordpress.com/files/2009/08/capture2.png"><img class="size-full wp-image-16 " title="Mon bureau sous Ubuntu 9.04" src="http://kernelcontrol.wordpress.com/files/2009/08/capture2.png" alt="Mon bureau sous Ubuntu 9.04" width="501" height="312" /></a><p class="wp-caption-text">Mon bureau sous Ubuntu 9.04</p></div>
<p style="text-align:center;">
<p style="text-align:justify;">Rien de bien extraordinaire, un fond d&#8217;écran vectoriel de chez <a title="Le site devianArt" href="http://wallpapers.deviantart.com/">devianArt</a>, quelques <a title="Screenlets" href="http://www.screenlets.org/">screenlets</a> et le tour est joué. Quand on voit aujourd&#8217;hui les possibilités de configuration qu&#8217;offrent les environnement de bureaux tels que <a title="Le gestionnaire de bureau GNOME" href="http://www.gnomefr.org/" target="_blank">GNOME</a> et <a title="Le gestionnaire de bureau KDE" href="http://fr.kde.org">KDE</a>, on se demande ce que peut bien encore envier Linux à Windows. Sur ce, amis geeks, bienvenue sur Blog Pistache` et à bientôt !</p>
<p style="text-align:justify;">
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Maquinas virtuais com Qemu]]></title>
<link>http://snnangola.wordpress.com/2009/08/01/maquinas-virtuais-com-qemu/</link>
<pubDate>Sat, 01 Aug 2009 20:14:13 +0000</pubDate>
<dc:creator>snnangola</dc:creator>
<guid>http://snnangola.wordpress.com/2009/08/01/maquinas-virtuais-com-qemu/</guid>
<description><![CDATA[Bom, definitivamente estamos na época da virtualização. Existem diversas ferramentas para diferentes]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>Bom, definitivamente estamos na época da virtualização. Existem diversas ferramentas para diferentes sistemas, geralmente funcionam tanto em Linux como em Windows. O VMWare, o VirtualBox sao as opções mais conhecidas. No Windows costumo usar o VirtualBox, no Linux o Qemu. Escolhi o Qemu por ser uma opção que dá maior poder de manejamento a quem cria as maquinas virtuais. Ferramentas como VirtualBox e VMWare encapsulam muita coisa.</p>
<p><strong>A instalação</strong></p>
<p>O Qemu pode ser encontrado <a href="http://download.savannah.gnu.org/releases/qemu/qemu-0.10.5.tar.gz">aqui</a>. Baixei os pacotes de fonte por serem independentes da plataforma.</p>
<p>Descompacte e instale como em:</p>
<blockquote><p>$ tar xzfv qemu-0.10.5.tar.gz<br />
$ cd qemu-0.10.5</p></blockquote>
<p>Lá dentro a shell de configuração:</p>
<blockquote><p>$ ./configure<br />
$su</p></blockquote>
<p>Como root:</p>
<blockquote><p>[root@localhost alunoeng]# make<br />
[root@localhost alunoeng]# make install</p></blockquote>
<p>Em seguida, <a href="http://www.qemu.org/kqemu-1.4.0pre1.tar.gz">baixar</a> e instalar os fontes do modulo do kernel Qemu Accelerator (Kqemu):</p>
<blockquote><p>[root@localhost alunoeng]# tar xzfv kqemu-1.4.0pre1.tar.gz<br />
[root@localhost alunoeng]# cd kqemu-1.4.0pre1<br />
[root@localhost alunoeng]# ./configure<br />
[root@localhost alunoeng]# make<br />
[root@localhost alunoeng]# make install</p></blockquote>
<p>Adicionar o modulo KQemu ao Kernel e editar o file rc.local adicionando uma linha identica a abaixo para executar a cada inicio do sistema:</p>
<blockquote><p>[root@localhost alunoeng]# modprobe kqemu<br />
[root@localhost alunoeng]# vi /etc/rc.d/rc.local</p></blockquote>
<p>Adicionar em rc.local a linha modprobe kqemu</p>
<p>Uma vez tudo isso, podemos criar a nossa primeira maquina virtual e seu disco:</p>
<p>Antes criar o dir /home/alunoeng/ubuntuimg/</p>
<blockquote><p>[root@localhost alunoeng]#mkdir /home/alunoeng/ubuntuimg/</p></blockquote>
<p>Criar o disco ubuntu.qcow com tamanho de 2000M</p>
<blockquote><p>[root@localhost alunoeng]# qemu-img create -f qcow /home/alunoeng/ubuntuimg/ubuntu.qcow 2000M</p></blockquote>
<p>Insira um disco .iso na drive de CD ou DVD ( a minha esta localizada em /dev/sr0)</p>
<p>Se necessitar saber o path onde está o seu disco e sabendo o nome de pelo menos um file do seu disco você pode fazer:</p>
<blockquote><p>[root@localhost /]# cat /etc/mtab &#124; grep -i eag<br />
/dev/sr0 /media/Eagle40Server-2.0 iso9660 ro,nosuid,nodev,uhelper=devkit,uid=500,gid=500,iocharset=utf8,mode=0400,dmode=0500 0 0</p></blockquote>
<p>Como vimos o path da minha drive de CD é /dev/sr0, logo criemos a maquina virtual e diagamos que ela dá o boot pelo cdrom com 12m mb de memoria RAM usando o arquivo ubuntu.qcow:</p>
<blockquote><p>[root@localhost alunoeng]# qemu -cdrom /dev/sr0 -boot d -m 128 /home/alunoeng/ubuntuimg/ubuntu.qcow</p></blockquote>
<p style="text-align:left;">Uma janela de instalação do sistema deverá aparecer.</p>
<p style="text-align:center;"><img class="aligncenter size-medium wp-image-1307" title="qemu" src="http://snnangola.wordpress.com/files/2009/08/qemu1.png?w=300" alt="qemu" width="376" height="309" /></p>
<p style="text-align:center;">
<p style="text-align:left;">Para dar boot:</p>
<blockquote><p>[root@localhost alunoeng]#qemu -cdrom /dev/sr0 -boot c -m 128 ubuntu.qcow</p></blockquote>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Compile Android Cupcake from source on Ubuntu 9.04 Jaunty Jackalope]]></title>
<link>http://soundmonster.wordpress.com/2009/07/15/compile-android-cupcake-from-source-on-ubuntu-9-04-jaunty-jackalope/</link>
<pubDate>Wed, 15 Jul 2009 11:35:04 +0000</pubDate>
<dc:creator>soundmonster</dc:creator>
<guid>http://soundmonster.wordpress.com/2009/07/15/compile-android-cupcake-from-source-on-ubuntu-9-04-jaunty-jackalope/</guid>
<description><![CDATA[I have checked out the recent sources for Android 1.5 Cupcake on my Jaunty box and have not been abl]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>I have checked out the recent sources for Android 1.5 Cupcake on my Jaunty box and have not been able to compile it. After some research, I have found a <a href="http://blog.ednchina.com/AlexanderLee/236700/message.aspx">solution</a>, which <a href="http://groups.google.com/group/android-porting/browse_thread/thread/8432b5f2accb718a/8bbec3737be7fc28?lnk=gst&#38;q=external%2Fqemu%2Fsockets.c+%E2%80%98">originates</a> from the <tt>android-porting</tt> mailing list. The problem is buried in the customized Qemu Makefile. You should apply the following pach and hope everything works fine for you, too:</p>
<pre>project external/qemu/
diff --git a/Makefile.android b/Makefile.android
index 4c697fb..98d2084 100644
--- a/Makefile.android
+++ b/Makefile.android
@@ -18,7 +18,7 @@ MY_CFLAGS := $(CONFIG_INCLUDES) -O2 -g &#92;

 # this is needed to build the emulator on 64-bit Linux systems
 ifeq ($(HOST_OS)-$(HOST_ARCH),linux-x86)
-  MY_CFLAGS += -Wa,--32
+  MY_CFLAGS += -Wa,--32 -D_GNU_SOURCE
 endif

 ifeq ($(HOST_OS),freebsd)
</pre>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[VirtualBox 3.0.0-BETA_1 is really fast, no comparison to qemu]]></title>
<link>http://zdavatz.wordpress.com/2009/06/27/virtualbox-3-0-0-beta_1-is-really-fast-no-comparison-to-qemu/</link>
<pubDate>Sat, 27 Jun 2009 11:27:47 +0000</pubDate>
<dc:creator>zdavatz</dc:creator>
<guid>http://zdavatz.wordpress.com/2009/06/27/virtualbox-3-0-0-beta_1-is-really-fast-no-comparison-to-qemu/</guid>
<description><![CDATA[Because I had such great experience in the past with VirtualBox I downloaded and installed VirtualBo]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>Because I had such great experience in the past with VirtualBox I downloaded and installed VirtualBox 3.0 Beta 1 recently. And I must say that it just works flawlessly! 1. The Installation after downloading the Files was really fast, then 2. My Windows XP is as fast as anything I could imagine. I can actually have my Linux and my Windows XP running at the same time with no performance problems whatsoever with 2 GB of RAM. Ok I got one of those Intel SSDs (160GB) that might make a difference but I really give VirtualBox my thumbs-up and Qemu my Thumbs-Down, including my toes! I tried to use Qemu for a long time but (between the VirtualBox versions 1.5 and 3.0) and for the mean time I am back to VirtualBox because it is such a real pleasure to use it! Thank you VirtualBox! Thank you to <a href="http://www.downloadsquad.com/2009/06/17/virtualbox-3-0-beta-1-released-cross-platform-virtualization-ap/">DownloadSquad</a> for pointing this out to me.</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Use a snapshot to test libguestfs changes]]></title>
<link>http://rwmj.wordpress.com/2009/06/24/use-a-snapshot-to-test-libguestfs-changes/</link>
<pubDate>Wed, 24 Jun 2009 15:23:51 +0000</pubDate>
<dc:creator>rich</dc:creator>
<guid>http://rwmj.wordpress.com/2009/06/24/use-a-snapshot-to-test-libguestfs-changes/</guid>
<description><![CDATA[If you want to test out some experimental libguestfs changes to a virtual machine, you can use a qem]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>If you want to test out some experimental libguestfs changes to a virtual machine, you can use a <a href="http://www.nongnu.org/qemu/qemu-doc.html#SEC19">qemu snapshot</a> to test changes before committing them.  Here&#8217;s how.</p>
<p>First, use qemu-img to create a snapshot.  In this case I have a base file called &#8220;RHEL52PV32-20090213.img&#8221; and my temporary snapshot will just be called &#8220;snapshot&#8221;.  The file &#8220;snapshot&#8221; is linked to the base file.</p>
<pre style="background-color:#fcfcfc;border-left:6px solid #f0f0f0;margin-left:1em;font-size:120%;padding:5px;">
<b>$ qemu-img create -b RHEL52PV32-20090213.img -f qcow2 snapshot</b>
Formatting 'snapshot', fmt=qcow2, backing_file=RHEL52PV32-20090213.img, size=8388608 kB
</pre>
<p>Now we start guestfish on the snapshot.  Notice <a href="http://git.et.redhat.com/?p=libguestfs.git;a=commit;h=e1c62f6332ae07cb6f95130dcc9852701d085e2b">a new feature of guestfish</a> &#8211; just use &#8220;guestfish -i image&#8221; or &#8220;guestfish -i libvirt_domain&#8221; to automatically mount all the partitions within the image in the correct places.  In this case I wanted to remove the root password from the image:</p>
<pre style="background-color:#fcfcfc;border-left:6px solid #f0f0f0;margin-left:1em;font-size:120%;padding:5px;">
$ <b>guestfish -i snapshot</b>

Welcome to guestfish, the libguestfs filesystem interactive shell for
editing virtual machine filesystems.

Type: 'help' for help with commands
      'quit' to quit the shell

&#62;&#60;fs&#62; mounts
/dev/mapper/VolGroup00-LogVol00
/dev/sda1
&#62;&#60;fs&#62; vi /etc/shadow
&#62;&#60;fs&#62; sync
</pre>
<p>At this point, only the <i>snapshot</i> has changed.  The base image is left alone.  I test-booted the snapshot to check that my change was correct.  If the change was bad, I could have just deleted the snapshot file, but since everything was OK, I committed the change back into the base image:</p>
<pre style="background-color:#fcfcfc;border-left:6px solid #f0f0f0;margin-left:1em;font-size:120%;padding:5px;">
$ <b>qemu-img commit snapshot</b>
Image committed.
</pre>
<p>The &#8220;snapshot&#8221; file is no longer needed, unless you want to test further changes.</p>
<p>(Thanks to Dan Berrange for working out the details)</p>
</div>]]></content:encoded>
</item>

</channel>
</rss>
