qemunet:index
Differences
This shows you the differences between two versions of the page.
qemunet:index [2016/09/09 07:11] – [Download & Install] orel | qemunet:index [2024/03/18 15:06] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 3: | Line 3: | ||
//QemuNet is a light shell script based on QEMU and VDE to enable easy virtual networking.// | //QemuNet is a light shell script based on QEMU and VDE to enable easy virtual networking.// | ||
- | To go further, go here: [[qemunet: | ||
- | ==== Download & Install ==== | + | * QemuNet: https:// |
+ | * QemuNet images: http:// | ||
- | //QemuNet// is a free software distributed under the terms of the GNU General Public License (GPL) and it is available for download at [[ https:// | + | === How to use my own image in QemuNet?== |
- | + | ||
- | First of all, //QemuNet// requires to fulfill the following dependencies: | + | |
- | + | ||
- | $ sudo apt-get install qemu vde2 libattr1 libvirt0 socat | + | |
- | + | ||
- | Moreover, one requires //Bash// version greater than or equal to 4. | + | |
- | + | ||
- | //QemuNet// requires QEMU (qemu-system-x86_64) with VDE and KVM supports enabled and with a **version greater than or equal to 2.1**. Check it: | + | |
- | + | ||
- | $ qemu-system-x86_64 --version | + | |
- | + | ||
- | Once all your dependencies are satisfied on your system, download it from SVN repository with anonymous access: | + | |
- | + | ||
- | $ svn checkout https:// | + | |
- | + | ||
- | If the runtime commands required by //QemuNet// (qemu-system-x86_64, | + | |
- | + | ||
- | Then you can launch the following __simple tests__ | + | |
- | + | ||
- | $ ./ | + | |
- | $ ./ | + | |
- | + | ||
- | Then, you can start to play... | + | |
- | + | ||
- | ==== Examples ==== | + | |
- | + | ||
- | You will find several examples in the **demo** subdirectory. But, let's start with a basic LAN topology. | + | |
- | + | ||
- | First, you need to prepare a virtual topology file, as for example // | + | |
- | + | ||
- | <code bash lan4.topo> | + | |
- | # SWICTH switchname | + | |
- | SWITCH s1 | + | |
- | # HOST sysname hostname switchname0 switchname1 ... | + | |
- | HOST debian8 host1 s1 | + | |
- | HOST debian8 host2 s1 | + | |
- | HOST debian8 host3 s1 | + | |
- | HOST debian8 host4 s1 | + | |
- | </ | + | |
- | + | ||
- | Here is an example of the QemuNet configuration file // | + | |
- | + | ||
- | <code bash qemunet.cfg> | + | |
- | if [ -z " | + | |
- | # debian8 | + | |
- | SYS[debian8]=" | + | |
- | FS[debian8]=" | + | |
- | QEMUOPT[debian8]=" | + | |
- | KERNEL[debian8]=" | + | |
- | INITRD[debian8]=" | + | |
- | </ | + | |
- | + | ||
- | Following, you can launch your Virtual Network (VN). All the current session files are provided | + | |
- | + | ||
- | < | + | |
- | ./ | + | |
- | </ | + | |
- | + | ||
- | Once you have finish your work, halt all machines properly with " | + | |
- | + | ||
- | If you want to restore your session from the current session directory, you can simply type: | + | |
- | < | + | |
- | ./ | + | |
- | </ | + | |
- | + | ||
- | In order to save your session, you need to save all session files in a tgz archive. | + | |
- | + | ||
- | < | + | |
- | cd session ; tar cvzf lan4.tgz * ; cd .. | + | |
- | </ | + | |
- | + | ||
- | So, you will be able to restore your session later as follow: | + | |
- | + | ||
- | < | + | |
- | ./ | + | |
- | </ | + | |
- | + | ||
- | For instance, if you modify the system files of the VM //host1//, those modifications will not modify directly the raw system image // | + | |
- | + | ||
- | In addition, we use a "/ | + | |
- | + | ||
- | ==== Manual ==== | + | |
- | + | ||
- | QemuNet | + | |
- | + | ||
- | < | + | |
- | Start/ | + | |
- | qemunet.sh -t topology [-a images.tgz] [...] | + | |
- | qemunet.sh -s session.tgz [...] | + | |
- | qemunet.sh -S session/ | + | |
- | Options: | + | |
- | -t < | + | |
- | -s < | + | |
- | -S <session directory>: | + | |
- | -h: print this help message | + | |
- | Advanced Options: | + | |
- | -a < | + | |
- | -c < | + | |
- | -x: launch VM in xterm terminal instead of SDL native window (only for linux system) | + | |
- | -y: launch VDE switch management console in xterm terminal | + | |
- | -i: enable Slirp interface for Internet access (ping not allowed) | + | |
- | -m: mount shared directory in /mnt/host (default for linux system) | + | |
- | -q: ignore and remove qcow2 images for the running session | + | |
- | -M: disable mount | + | |
- | -v: enable VLAN support | + | |
- | -k: enable KVM full virtualization support (default) | + | |
- | -K: disable KVM full virtualization support (not recommanded) | + | |
- | -l < | + | |
- | </ | + | |
- | + | ||
- | + | ||
- | ==== Configuration of QemuNet ==== | + | |
- | + | ||
- | Once you have download QemuNet, you need first to set the runtime commands for QEMU and VDE in // | + | |
- | + | ||
- | < | + | |
- | QEMU="/ | + | |
- | QEMUIMG="/ | + | |
- | VDESWITCH="/ | + | |
- | </ | + | |
- | + | ||
- | Then, you have to provide a configuration file that define several virtual systems and its parameters (name, type, disk image file, ...). The default configuration file is // | + | |
- | + | ||
- | <code bash qemunet.cfg> | + | |
- | # template | + | |
- | # SYS[sysname]=" | + | |
- | # FS[sysname]="/ | + | |
- | # QEMUOPT[sysname]=" | + | |
- | # KERNEL[sysname]="/ | + | |
- | # INITRD[sysname]="/ | + | |
- | + | ||
- | # IMGDIR="/ | + | |
- | if [ -z " | + | |
- | + | ||
- | + | ||
- | # tinycore | + | |
- | SYS[tinycore]=" | + | |
- | FS[tinycore]=" | + | |
- | QEMUOPT[tinycore]=" | + | |
- | + | ||
- | # debian8 | + | |
- | SYS[debian8]=" | + | |
- | FS[debian8]=" | + | |
- | QEMUOPT[debian8]=" | + | |
- | KERNEL[debian8]=" | + | |
- | INITRD[debian8]=" | + | |
- | + | ||
- | # winxp | + | |
- | SYS[winxp]=" | + | |
- | FS[winxp]=" | + | |
- | QEMUOPT[winxp]=" | + | |
- | + | ||
- | # win10 | + | |
- | SYS[win10]=" | + | |
- | FS[win10]=" | + | |
- | QEMUOPT[win10]=" | + | |
- | </ | + | |
- | + | ||
- | The SYS and FS arrays are required for each system. They respectively define the system type (linux, windows, ...) and the QEMU disk image file (in raw format). QEMUOPT can be used to pass additional options to QEMU when launching the VM, as for instance cpu type or max memory. See QEMU documentation for detailed options. Both KERNEL and INITRD are optional for linux system, but required if you want to launch the VMs in xterm (option -x). | + | |
- | + | ||
- | ==== How to Install my Own System for QEMU and QemuNet ==== | + | |
Here are some testing QEMU images: | Here are some testing QEMU images: | ||
Line 174: | Line 13: | ||
* http:// | * http:// | ||
- | Follow the next tutorial to install your own Linux system | + | Follow the next tutorial to install your own image of Linux system |
- | * [[qemunet: | + | * [[qemunet:install:: |
- | * [[qemunet: | + | * [[qemunet:install:: |
+ | * [[qemunet: | ||
+ | * [[qemunet: | ||
- | ==== Documentation ==== | + | === Misc === |
- | * QEMU: http:// | + | * [[qemunet:misc | misc ]] |
- | * QEMU Networking: http:// | + | |
- | * VDE: http:// | + | |
- | * VDE Manual : http:// | + | |
- | * Tutorial VDE : http:// | + | |
- | ==== Other Solutions ==== | + | |
- | * NEmu : http:// | ||
- | * MarionNet : http:// | ||
- | * User Mode Linux: http:// | ||
- | * GNS3: https:// | ||
qemunet/index.1473405119.txt.gz · Last modified: 2024/03/18 15:05 (external edit)