diff options
| author | Silvino Silva <silvino@bk.ru> | 2016-10-15 01:31:34 +0100 |
|---|---|---|
| committer | Silvino Silva <silvino@bk.ru> | 2016-10-15 01:57:43 +0100 |
| commit | 3d29ecb8767d923f79b82566fd57b08db76b8fc5 (patch) | |
| tree | ac92517562ecf2025320b3487c76e2ed02eed6ee /tools/qemu.html | |
| parent | da52c4b286dc1d3def59f20dbe25f033793c92cc (diff) | |
| download | doc-3d29ecb8767d923f79b82566fd57b08db76b8fc5.tar.gz | |
tools revision
Diffstat (limited to 'tools/qemu.html')
| -rw-r--r-- | tools/qemu.html | 29 |
1 files changed, 15 insertions, 14 deletions
diff --git a/tools/qemu.html b/tools/qemu.html index 272a26b..0079dfc 100644 --- a/tools/qemu.html +++ b/tools/qemu.html @@ -123,7 +123,7 @@ <pre> # DEV="br0" - # TAP="tap5" + # TAP="tap1" </pre> <pre> @@ -135,12 +135,26 @@ # ip link set ${TAP} master ${DEV} </pre> + <h3>2.2. Routing</h3> + + <p>Create interface with correct permissions set for kvm group.</p> + + <pre> + # sysctl -w net.ipv4.ip_forward=1 + # iptables -t nat -A POSTROUTING -s 10.0.0.0/24 -o eth0 -j MASQUERADE + </pre> + + <h2 id="guest">Guest System</h2> + + <p>Start qemu with 512 of ram, mydisk.img as disk and boot from iso</p> + <p>See <a href="scripts/system-qemu.sh">scripts/system-qemu.sh</a>, as template. Run virtual machine that uses above tap device;</p> <pre> $ ISO=~/crux-3.2.iso $ IMG=~/crux-img.qcow2 + $ TAP="tap1" $ qemu-system-x86_64 \ -enable-kvm \ @@ -151,19 +165,6 @@ -net nic,model=virtio -net tap,ifname=${TAP},script=no,downscript=no </pre> - <h3>2.2. Routing</h3> - - <p>Create interface with correct permissions set for kvm group.</p> - - <pre> - # sysctl -w net.ipv4.ip_forward=1 - # iptables -t nat -A POSTROUTING -s 10.0.0.0/24 -o eth0 -j MASQUERADE - </pre> - - <h2 id="guest">Guest System</h2> - - <p>Start qemu with 512 of ram, mydisk.img as disk and boot from iso</p> - <pre> $ ISO=~/crux-3.2.iso $ IMG=~/crux-img.qcow2 |