<?xml version="1.0" encoding="UTF-8"?>
<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/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Felipe Alfaro Solana &#187; QEMU</title>
	<atom:link href="http://www.felipe-alfaro.org/blog/category/qemu/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.felipe-alfaro.org/blog</link>
	<description>A little bit of technology, security and networking with Linux, FreeBSD and Mac OS X, plus some personal opinions.</description>
	<lastBuildDate>Sun, 23 Oct 2011 16:46:32 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>QEMU and TUN/TAP networking</title>
		<link>http://www.felipe-alfaro.org/blog/2006/07/05/qemu-and-tuntap-networking/</link>
		<comments>http://www.felipe-alfaro.org/blog/2006/07/05/qemu-and-tuntap-networking/#comments</comments>
		<pubDate>Wed, 05 Jul 2006 12:11:50 +0000</pubDate>
		<dc:creator>Felipe Alfaro Solana</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Networking]]></category>
		<category><![CDATA[QEMU]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://felipe-alfaro.org/blog/2006/07/05/qemu-and-tuntap-networking/</guid>
		<description><![CDATA[Using TUN/TAP networking with QEMU grant guest machines access to some or all networks reachable by the host machine. This also allows accessing services offered by guests machines from any other host. To be able to use TUN/TAP network, instead of directly configuring the physical Ethernet network device &#8212; my Realtek 8169 Gigabit Ethernet, which [...]]]></description>
			<content:encoded><![CDATA[<p>Using TUN/TAP networking with QEMU grant guest machines access to some or all networks reachable by the host machine. This also allows accessing services offered by guests machines from any other host.</p>
<p>To be able to use TUN/TAP network, instead of directly configuring the physical Ethernet network device &#8212; my Realtek 8169 Gigabit Ethernet, which in my computer it&#8217;s named <code>eth1</code> &#8211;, we need to reconfigure the network in order to get a bridge device, named <code>br0</code>, with the physical Ethernet <code>eth1</code> device attached to it. We can achieve this by editing <code>/etc/network/interfaces</code> to look like this:</p>
<div>
<pre>
# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
#auto eth1
#iface eth1 inet static

auto br0
iface br0 inet static
        address a.b.c.d
        netmask 255.255.255.128
        gateway v.w.x.y
        bridge_ports eth1
        bridge_fd 1
        bridge_hello 1
        bridge_stp off
</pre>
</div>
<p>The helper script <code>/etc/qemu-ifup</code>, which QEMU uses to bring up a TAP network interface used by the guest and bind it to the existing bridge <code>br0</code>, should look like this:</p>
<div>
<pre>
#!/bin/sh
echo "Executing /etc/qemu-ifup"
echo "Bringing up $1 for bridged mode..."
sudo /sbin/ifconfig $1 0.0.0.0 promisc up
echo "Adding $1 to br0..."
sudo /usr/sbin/brctl addif br0 $1
sleep 2
</pre>
</div>
<p>To allow running QEMU as an unprivileged user, we need to edit <code>/etc/sudoers</code> in order to grant access for running <code>/sbin/ifconfig</code> and <code>/usr/sbin/brctl</code>. It&#8217;s recommended to edit that file using <code>visudo</code>. The file should could look like this:</p>
<div>
<pre>
# Cmnd alias specification
Cmnd_Alias      QEMU=/sbin/ifconfig, \\
                     /sbin/modprobe, \\
                     /usr/sbin/brctl

# Defaults
Defaults        !lecture,tty_tickets,!fqdn,rootpw

# User privilege specification
root    ALL=(ALL) ALL

# Members of the admin group may gain root privileges
%admin ALL=(ALL) ALL

# Grant access to Cmnd_Alias to user jdoe
jdoe ALL=NOPASSWD:QEMU
</pre>
</div>
<p>Now, we can launch <code>qemu</code> from the command line:</p>
<pre>
XLIB_SKIP_ARGB_VISUALS=1 \\
qemu -hda hda -cdrom *iso -boot d \\
-m 512 -localtime -net nic,vlan=0 \\
-net tap,ifname=tap0,script=/etc/qemu-ifup \\
-kernel-kqemu
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.felipe-alfaro.org/blog/2006/07/05/qemu-and-tuntap-networking/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>QEMU and transparency problems when using Xgl</title>
		<link>http://www.felipe-alfaro.org/blog/2006/07/05/qemu-and-transparency-problems-when-using-xgl/</link>
		<comments>http://www.felipe-alfaro.org/blog/2006/07/05/qemu-and-transparency-problems-when-using-xgl/#comments</comments>
		<pubDate>Wed, 05 Jul 2006 11:04:59 +0000</pubDate>
		<dc:creator>Felipe Alfaro Solana</dc:creator>
				<category><![CDATA[QEMU]]></category>
		<category><![CDATA[UI]]></category>
		<category><![CDATA[Xgl]]></category>

		<guid isPermaLink="false">http://felipe-alfaro.org/blog/2006/07/05/qemu-and-transparency-problems-when-using-xgl/</guid>
		<description><![CDATA[When running QEMU 0.8.1 under Novell&#8217;s Xgl Xserver, the QEMU window black background turns transparent, which makes extremely difficult to read anything on it. Searching on the Internet, I found a workaround which consists on launching QEMU with the XLIB_SKIP_ARGB_VISUALS variable set to 1. For example: XLIB_SKIP_ARGB_VISUALS=1 qemu -hda ... I hope this will be [...]]]></description>
			<content:encoded><![CDATA[<p>When running QEMU 0.8.1 under Novell&#8217;s Xgl Xserver, the QEMU window black background turns transparent, which makes extremely difficult to read anything on it.</p>
<p>Searching on the Internet, I found a workaround which consists on launching QEMU with the <code>XLIB_SKIP_ARGB_VISUALS</code> variable set to 1. For example:</p>
<p><code>XLIB_SKIP_ARGB_VISUALS=1 qemu -hda ...</code></p>
<p>I hope this will be fixed in a later release of either QEMU or Novell&#8217;s Xgl Xserver.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.felipe-alfaro.org/blog/2006/07/05/qemu-and-transparency-problems-when-using-xgl/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

