Welcome to the new location of Alien's Wiki, sharing a single dokuwiki install with the SlackDocs Wiki.
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
slackware:qemu [2007/11/16 09:10] – Conform to current udev syntax: change KERNEL="kqemu" to KERNEL=="kqemu" alien | slackware:qemu [2008/09/01 11:04] (current) – Explain user mode networking alien | ||
---|---|---|---|
Line 67: | Line 67: | ||
- download, unpack kqemu archive | - download, unpack kqemu archive | ||
- configure and build kqemu, and install it on your computer using '' | - configure and build kqemu, and install it on your computer using '' | ||
+ | |||
Line 106: | Line 107: | ||
* To make the kqemu module load on boot, you should add the following line to the file ''/ | * To make the kqemu module load on boot, you should add the following line to the file ''/ | ||
/ | / | ||
- | </ | + | </ |
+ | / | ||
+ | </ | ||
- | This concludes the alterations needed for a performance boost of your Virtual Machines inside QEMU. As I said earlier, running qemu is really simple - it is a single binary with a lot of optional commandline parameters that customize the virtual machine it will setup for use. QEMU will use the kqemu accelerator if it finds the kernel module loaded in memory (and if it's built with support for kqemu). | + | This concludes the alterations needed for a performance boost of your Virtual Machines inside QEMU. As I said earlier, running qemu is really simple - it is a single binary with a lot of optional commandline parameters that customize the virtual machine it will setup for use. QEMU will use the kqemu accelerator if it finds the kernel module loaded in memory (and if it's built with support for kqemu). QEMU provides |
qemu -kernel-kqemu <other parameters> | qemu -kernel-kqemu <other parameters> | ||
</ | </ | ||
Line 147: | Line 150: | ||
When you're done with installing from CD, do not forget to at least remove the '' | When you're done with installing from CD, do not forget to at least remove the '' | ||
+ | |||
==== Networking your virtual machine ==== | ==== Networking your virtual machine ==== | ||
- | By default, QEMU uses a feature which is called //user-mode network//. QEMU will run an internal DHCP server that can assign an IP address to the virtual computer in case that is configured to use DHCP. The network range and gateway are hard-coded into QEMU but it allows your virtual machine to call out to your host machine and beyond. For user-mode networking, you don't need to configure anything on your host. I will probably document | + | === User mode networking === |
+ | |||
+ | By default, QEMU uses a feature which is called //user-mode network//. QEMU will run an internal DHCP server that can assign an IP address to the virtual computer in case that is configured to use DHCP. The network range and gateway are hard-coded into QEMU but it allows your virtual machine to call out to your host machine and beyond. For user-mode networking, you don't need to configure anything on your host. \\ QEMU will enable | ||
+ | qemu -net nic -net user <other qemu parameters> | ||
+ | </ | ||
+ | |Gateway/ | ||
+ | |DNS server: | ||
+ | |Samba server: | ||
+ | |Netmask: | ||
+ | |Guest IP: |any address above 10.0.2.15 | | ||
+ | |||
+ | There are limitations to the user mode networking due to the nature of the implementation. | ||
+ | |||
+ | * QEMU will act as a firewall between guest OS and the host computer, so that no network communication is possible from any host program to the guest OS. For instance, you will not be able to setup a ssh session to the guest. \\ To get around this dilemma, QEMU has a "'' | ||
+ | qemu -redir tcp: | ||
+ | </ | ||
+ | ssh -p 22000 localhost | ||
+ | </ | ||
+ | * There is actually no proper network connection between the guest and the world outside the Virtual Machine. QEMU will intercept TCP and UDP packets from the guest, dissect them and pass their data payload on to destination computers as if QEMU itself were sending the data. In reverse, QEMU will grab the return traffic and re-assemble TCP and UDP packets for the guest OS. This private implementation of a network stack in QEMU results in TCP and UDP traffic working transparently for the guest OS, but ICMP packets (ping, traceroute | ||
+ | |||
+ | === Connecting multiple guests to a VLAN === | ||
+ | |||
+ | QEMU knows the concept of VLAN' | ||
+ | qemu -net nic,vlan=0 -net user <other qemu parameters> | ||
+ | qemu <other qemu parameters> | ||
+ | </ | ||
+ | qemu -net nic, | ||
+ | </ | ||
+ | When several guests are connected using the same vlan number, any network packet that is sent by one of the guests, will be distributed over the vlan to all of the other guests. This allows for transparent network communication between the guests.\\ **NOTE** this has nothing to do with the ability of the guests to connect to the world outside QEMU! | ||
+ | |||
+ | === Virtual Distributed Ethernet (VDE) === | ||
+ | |||
+ | To overcome the limitations of //user mode networking//, | ||
==== Advanced topics ==== | ==== Advanced topics ==== |