Ambos lados, revisión anteriorRevisión previaPróxima revisión | Revisión previaPróxima revisiónAmbos lados, revisión siguiente |
es:howtos:hardware:arm:qemu_support_in_slackware_arm [2019/11/10 12:23 (UTC)] – [Modo de red NAT para QEMU] rramp | es:howtos:hardware:arm:qemu_support_in_slackware_arm [2020/01/05 19:14 (UTC)] – [Modo de red puente para QEMU] rramp |
---|
Existen muchas formas diferentes para configurar la red de invitados para QEMU. Este documento solo cubrirá las funcionalidades de QEMU para que Slackware ARM arranque. Refiérase a las paginas del manual o [[https://www.qemu.org/documentation/ | a la documentación de QEMU]] si necesitas una explicación más detallada. | Existen muchas formas diferentes para configurar la red de invitados para QEMU. Este documento solo cubrirá las funcionalidades de QEMU para que Slackware ARM arranque. Refiérase a las paginas del manual o [[https://www.qemu.org/documentation/ | a la documentación de QEMU]] si necesitas una explicación más detallada. |
| |
<note warning>Later on when you boot the Slackware ARM installer in QEMU you may need to modify the **txqueuelen** for your network interfaces. This is because large Slackware packages time out while being downloaded from the NFS share on the host. This happens because QEMU emulation is very slow. The NFS daemon on your host machine occasionally shuts down the network socket before large packages (rust, kernel-firmware, etc) finish being copied to the SD Card. Setting the txqueuelen to **10000** for all network interfaces should be sufficient to prevent this anomaly. The following command seems to resolve this issue: | <note warning> |
| Más tarde, cuando arranque el instalador de Slackware ARM en QEMU, puede que tenga que modificar el **txqueuelen** para sus interfaces de red. |
| Estos es debido a que |
| Later on when you boot the Slackware ARM installer in QEMU you may need to modify the **txqueuelen** for your network interfaces. This is because large Slackware packages time out while being downloaded from the NFS share on the host. This happens because QEMU emulation is very slow. The NFS daemon on your host machine occasionally shuts down the network socket before large packages (rust, kernel-firmware, etc) finish being copied to the SD Card. Setting the txqueuelen to **10000** for all network interfaces should be sufficient to prevent this anomaly. The following command seems to resolve this issue: |
| |
| |
</code> | </code> |
| |
Run this command for each network interface actively used by QEMU. | Ejecute este comando para cada interfaz de red utilizada activamente por QEMU. |
</note> | </note> |
==== Modo de red NAT para QEMU ==== | ==== Modo de red NAT para QEMU ==== |
==== Modo de red puente para QEMU ==== | ==== Modo de red puente para QEMU ==== |
| |
The best way to set up a bridged network interface for QEMU is with the provided helper script, rc.local-additions. If you choose to take this route, you need to disable the NetworkManager service. NetworkManager comes with Slackware, but it is not developed by Slackware. As a result, the process of configuring a bridge with NetworkManager is not supported in this guide. | La mejor manera de configurar una interfaz de red en puente para QEMU es con el script de ayuda proporcionado, rc.local-additions. Si decide tomar esta ruta, debe desactivar el servicio NetworkManager. NetworkManager viene con Slackware, pero no está desarrollado por Slackware. Como resultado, el proceso de configuración de un puente con NetworkManager no es soportado en esta guía. |
| |
You can find the helper script with comments online here: [[http://slackware.uk/slackwarearm/boardsupport/qemu/slackwarearm-current/helper-scripts/rc.local-additions | rc.local-additions]] | Puede encontrar el script de ayuda con comentarios en línea aquí: |
| [[http://slackware.uk/slackwarearm/boardsupport/qemu/slackwarearm-current/helper-scripts/rc.local-additions | rc.local-additions]] |
| |
The following commands must be executed as root to disable NetworkManager: | Los siguientes comandos deben ejecutarse como root para desactivar NetworkManager: |
<code> | <code> |
# /etc/rc.d/rc.networkmanager stop | # /etc/rc.d/rc.networkmanager stop |
</code> | </code> |
| |
The following network settings are assumed for the **Slackware x86 host machine**. Adjust these values throughout the remainder of this guide if you use different network settings. | Las siguientes configuraciones de red son asumidas para la **máquina host Slackware x86**. Ajuste estos valores a lo largo del resto de esta guía si utiliza diferentes configuraciones de red. |
<code> | <code> |
Default Gateway: 192.168.1.1 | Default Gateway: 192.168.1.1 |
</code> | </code> |
| |
You need to edit the //qemu-network-tun.sh// helper script for QEMU. It is required to bring up the QEMU guest network interface. It should exist in /export/armhost. Change the IP address listed in $BRIDGEIP to match your network settings. | Necesitas editar el archivo script de ayuda //qemu-network-tun.sh// para QEMU. Se requiere que se muestre la interfaz de red de invitados de QEMU. debería existir en /export/armhost. Cambiar la dirección IP listada en $BRIDGEIP para que coincida con tu configuración de red. |
| |
File: /export/armhost/qemu-network-tun.sh | Archivo: /export/armhost/qemu-network-tun.sh |
<code> | <code> |
#!/bin/sh | #!/bin/sh |
</code> | </code> |
| |
Here is the relevant portion of the rc.local-addtions script that requires modification. This script is meant to replace on the host machine /etc/rc.d/rc.local. Changes depend on your network settings: | Aquí está la parte relevante del script rc.local-addtions que requiere modificación. Este script está pensado para reemplazar en la máquina anfitriona /etc/rc.d/rc.local. Los cambios dependen de la configuración de su red: |
<code> | <code> |
.. snip .. | .. snip .. |
</code> | </code> |
| |
These network settings assume static IP addressing. The br0 interface is the bridged network interface. The eth0 interface is the host machine network interface that allows the host machine to retain network connectivity. The default gateway, 192.168.1.1, typically points to the network gateway on the physical network. | Estos ajustes de red asumen direcciones IP estáticas. La interfaz br0 es la interfaz de red en modo puente. La interfaz eth0 es la interfaz de red de la máquina anfitriona que permite que la máquina anfitriona conserve la conectividad de red. La puerta de enlace predeterminada, 192.168.1.1, suele apuntar a la puerta de enlace de la red física. |
| |
Copy rc.local-addtions to /etc/rc.d/rc.local once you finish editing it. Then mark it executable. | Copiar rc.local-addtions a /etc/rc.d/rc.local una vez que termine de editarla. A continuación, márquela como ejecutable. |
<code> | <code> |
# cp /path/to/rc.local-additions /etc/rc.d/rc.local | # cp /path/to/rc.local-additions /etc/rc.d/rc.local |
</code> | </code> |
| |
At this point it is recommended reboot your Slackware x86 host to assure the settings in rc.local are in use and that NetworkManager is completely disabled. | En este punto es recomendable rebootear tu Slackware x86 host para asegurar que las configuraciones en rc.local están siendo usados y el NetworkManager es completamente deshabilitado. |
| |
<note important>You may need to edit the /etc/resolv.conf file on the host. Add in the IP addresses of your preferred primary and secondary name server(s) since you are not receiving these IP addresses by other means. The name server is 192.168.1.1 (or the default gateway) in this tutorial</note> | <note important>Necesitas editar el archivo /etc/resolv.conf sobre el host. Agregar en la dirección IP de tu DNS primario y secundario Add in the IP addresses of your preferred primary and secondary name server(s) since you are not receiving these IP addresses by other means. The name server is 192.168.1.1 (or the default gateway) in this tutorial</note> |
| |
Modify the launcher helper scripts once you are certain your host has the appropriate network settings. Pay close attention to the **$NETTYPE** variable. Details about how to use this variable are documented in both the **installer_launch** and **disk_launch** helper scripts. Edit the **$MACADDR** variable for each QEMU instance if you are running more than one Slackware ARM guest at once. | Modify the launcher helper scripts once you are certain your host has the appropriate network settings. Pay close attention to the **$NETTYPE** variable. Details about how to use this variable are documented in both the **installer_launch** and **disk_launch** helper scripts. Edit the **$MACADDR** variable for each QEMU instance if you are running more than one Slackware ARM guest at once. |