[fix] README's numbering

This commit is contained in:
alban 2020-09-24 15:03:11 +02:00
parent fbf86f5aa8
commit 1ac13b27f3

View File

@ -119,12 +119,10 @@ ssh root@localhost -p10022
You will access the VM services through "virtual" localhost ports of your machine. You will access the VM services through "virtual" localhost ports of your machine.
But the VM will not be able to exchange data on LAN. But the VM will not be able to exchange data on LAN.
### kvm:bridge 1. Network configuration
Here is the documentation on how to setup a bridge interface on your machine. Here is the documentation on how to setup a bridge interface on your machine.
It is a bit complex, but follow the instructions and it should be fine... It is a bit complex, but follow the instructions and it should be fine...
#### kvm:bridge 1.0. First some variables / names we will use #### kvm:bridge 0. First some variables / names we will use
``` ```
# 0. Names / concepts # 0. Names / concepts
HOST The name used to define your laptop (or any other machine running qemu) HOST The name used to define your laptop (or any other machine running qemu)
@ -146,7 +144,7 @@ export IP_RANGE=/24
export SU='sudo ' export SU='sudo '
``` ```
#### kvm:bridge 1.1. Configuring HOST network interfaces #### kvm:bridge 1. Configuring HOST network interfaces
``` ```
# 1. Configure HOST: set up bridge over HOST_IF # 1. Configure HOST: set up bridge over HOST_IF
@ -167,7 +165,7 @@ $SU sysctl net.ipv4.ip_forward=1
$SU ip address show dev ${HOST_IF} | grep global || echo -e "\n\e[31mOops.... Remove all IP addresses from ${HOST_IF}! Use:\e[0m\n\n$SU ip address del (address/range shown above) dev ${HOST_IF}" $SU ip address show dev ${HOST_IF} | grep global || echo -e "\n\e[31mOops.... Remove all IP addresses from ${HOST_IF}! Use:\e[0m\n\n$SU ip address del (address/range shown above) dev ${HOST_IF}"
``` ```
#### kvm:bridge 1.2. Booting the VM #### kvm:bridge 2. Booting the VM
Notice how the `net` model changed: we have a MAC address and use the `tap` interface to exchange network packets. Notice how the `net` model changed: we have a MAC address and use the `tap` interface to exchange network packets.
``` ```
@ -181,11 +179,11 @@ sudo /usr/bin/qemu-system-x86_64\
-net tap,ifname=tap0\ -net tap,ifname=tap0\
``` ```
### kvm:bridge 1.3. Configuring GUEST's network ### kvm:bridge 3. Configuring GUEST's network
This part may be more or less complex, as a DHCP server might automatically assign an IP address to your VM. This part may be more or less complex, as a DHCP server might automatically assign an IP address to your VM.
Use the connection via login described below (1.4.2) : **a script will check the network connectivity on login.** Use the connection via login described below (4.2) : **a script will check the network connectivity on login.**
According to its output, According to its output,
* *you might be fine*: it will show an IP address which you can use to connect using standard protocols, i.e. SSH, HTTPS, etc. * *you might be fine*: it will show an IP address which you can use to connect using standard protocols, i.e. SSH, HTTPS, etc.
@ -203,9 +201,9 @@ According to its output,
ip route add default via ${HOST_IP} ip route add default via ${HOST_IP}
``` ```
### kvm:bridge 1.4 Connecting ### kvm:bridge 4. Connecting
#### kvm:bridge 1.4.1 Connecting via login #### kvm:bridge 4.1 Connecting via login
If you started the QEMU with a display, you can connect to it as root. If you started the QEMU with a display, you can connect to it as root.
CAUTION for french users, it as QWERTY keyboard mapping, type`lqser` CAUTION for french users, it as QWERTY keyboard mapping, type`lqser`
@ -214,7 +212,7 @@ CAUTION for french users, it as QWERTY keyboard mapping, type`lqser`
USER "root" USER "root"
PASS "laser" # i.e. "lqser" on AZERTY keyboards PASS "laser" # i.e. "lqser" on AZERTY keyboards
``` ```
#### kvm:bridge 1.4.2 Connecting via SSH #### kvm:bridge 4.2 Connecting via SSH
``` ```
# Wait until ssh/login is available in the VM # Wait until ssh/login is available in the VM