Talk:Qemu
From Gentoo Linux Wiki
Contents |
[edit] Requests
Can someone add some notations to the resize section? i.e. which values to edit to make such and such a change? I assume that the seek=4300 means the image will be resized to 4.3 GB, although dd documentation suggests that this represents the original file which is not to be edited?
[edit] GCC4 Support
There seem to be some patch here for gcc 4 support from 7.2 to 8.1.
HOW TO patch? Make a custom ebuild, dude :)
[edit] GCC3 Version
I vas unable to emerge qemu with 3.4.6 branch - it gave me the same error as 4.x (I tried to compile it manually with 4.x). But with 3.3.x all was fine. Please correct this in HOWTO.
[edit] Networking
Section about networking is obsolete now and could be counfusing. Today you don't have to configurate anything. Just run qemu and dhcp client in guest OS. - I find this confusing as I have now used qemu with FreeBSD and gentoo and both have needed to use virtual interfaces and tunneling/bridging
For the actual tun/tap bridging interface to work - I created a bash script with the following:-
#! /bin/bash tunctl -u root -t tap0 ifconfig tap0 up brctl addif br0 tap0 echo 1 > /proc/sys/net/ipv4/ip_forward echo 1 > /proc/sys/net/ipv6/conf/all/forwarding
This script can be saved as bridgeup and then by doing
chmod a+x bridgeup
can be run from the command line(I haven't mastered the technique of doing it at start-up yet!) and then executing
./bridgeup
in a terminal
I must say this is the first time I have edited a wiki - and if this is any help - I think it should be paced into the main page.jk
[edit] Networking Part 2
More interesting, this HOWTO leaves a really obvious, easy-to-setup networking option out - the QEMU user mode network stack. For people not needing inbound connections (eg, the vast majority of users mostly likely, who simply need a virtual host to tinker and test with) this is by far the easiest option.
To make it work, all you do is add the options:
-net user,vlan=1 -net nic,vlan=1
to qemu when you invoke it. Qemu provides a DHCP server, and things "just work" for regular outbound connections, assuming the host has a working network connection.
[edit] Unmasking
At least as of 2006-10-13, kqemu-0.7.2 and qemu-0.8.0 and qemu-softmmu-0.8.0 are marked as stable in Portage; so unless this HOWTO specifically wants to install qemu-0.8.1 I'm not sure why unmasking would be necessary.
[edit] Gentoo inside Qemu?
Any suggestions for CFlags? List of useful drivers?
It would be a good idea to install all the realtek drivers when installing gentoo.
After installation, start the qemu machine and add the option
-net nic,model=rtl8139
that should allow the machine to start a network interface. jk
[edit] Bugs on page
In one of the start-up commands in the networking section is an incorrect definition of the -hda command, it should read '-hda /path/to/hdafile', not '-hda img=/path/to/hdafile'. This causes the error "qemu: Could not open hard disk image 'img=/path/to/hdafile'"
[edit] GCC4 (amd64?)
Could whoever wrote this note, clarify? Is that with/without custom ebuilds? x86 or amd64?
Here, under AMD64, when I try to emerge 0.9 versions of qemu it just tells me to use GCC3.
