Bonjour à tous,
Je suis entrain d'installer une machine virtuelle pour émuler une "raspbian-stretch-lite" grâce à QEMU (émulation Raspberry en tant que "guest") sur un portable équipé de Debian 9 (en tant que "host"). La difficulté avec QEMU réside dans le réseau et la configuration d'adresses IP afin de faire passer le flux (dans les deux sens émission/réception) sur l'interface Wireless Ethernet/Wifi et/ou RJ45 Ethernet du portable "host".
Actuellement, j'utilise une connexion sans fils Wifi.
Je peux me connecter à internet grâce à QEMU qui créé automatiquement un réseau SLiRP depuis le "guest" (machine virtuelle) sur le système "host" (portable) grâce à l'interface "wlp10s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 inet 10.:P.:P.61 netmask 255.255.254.0 broadcast 10.:P.:P.255". L'inconvénient avec cette topologie c'est que la machine virtuelle n'est pas accessible de manière directe depuis l'hôte ou le réseau externe.
Par conséquent, je souhaiterais donc créer un réseau QEMU de type TAP (en principe plus flexible et moins lent que le réseau SLiRP créé par défault) afin d'utiliser/configurer virtuellement n'importe quel type de topologie réseau. Cela nécessite de réaliser la configuration de cette topologie sur la machine hôte (portable). Voir le lien ci-contre pour la création d'un réseau virtuel QEMU :
https://www.eslot.fr/infrastructure/le-reseau-sous-qemu.
Petit rappel sur TAP qui est un système d'émission et de réception de paquet pour les programmes de l'espace utilisateur. Il peut être vu comme un simple périphérique Point-to-Point ou Ethernet, lequel, au lieu de :
- recevoir des paquets en provenance d'un média physique les reçoit d'un programme de l'espace utilisateur,
- d'envoyer des paquets via un média physique les écrit dans le programme de l'espace utilisateur.
Pour plus de détails, voir le lien ci-contre :
https://www.eslot.fr/etude/utilisation- … -gnu-linux.
En l'occurence le paquet Debian 'bridge-utils' permet de créer, d'utiliser et de configurer un 'bridge' sous linux.
Cela dit, j'ai pu éxécuter la machine virtuelle "raspbian-stretch-lite" grâce au script suivant
https://ownyourbits.com/2017/02/06/rasp … rk-access/ (script que j'ai dû adapter pour les besoins de Debian 9) sur l'hôte.
La création du bridge (br0, IP 10.:P.:P.61) s'effectue, mais il "semble que cela ne peut pas fonctionner", car il y a un problème de connexion et le message suivant s'affiche "Adding wlp10s0 interface to bridge br0 can't add wlp10s0 to bridge br0: Operation not supported" dans le mode graphique émulé par QEMU.
Si quelqu'un peut m'apporter une solution pour interfacer correctement mon réseau virtuel (créé par QEMU) avec wlp10s0 (wireless), vous êtes les bienvenus.
Je suppose que je pourrais utiliser une connexion physique Ethernet (RJ45 + câble) du portable ("host" adresse IP 10.:P.:P.61) afin de contourner ce problème d'interface réseau, mais pour l'instant je ne dispose que d'un accès Wifi.
Voici un aperçu de la configuration des interfaces sur l'hôte ou "host" (portable):
dennix@trix:~$ sudo ifconfig
[sudo] Mot de passe de dennix :
br0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 10.:P.:P.61 netmask 255.255.255.255 broadcast 0.0.0.0
inet6 fe80::f81a:f4ff:fecc:8b7 prefixlen 64 scopeid 0x20<link>
ether ce:4f:c5:42:15:1b txqueuelen 1000 (Ethernet)
RX packets 171 bytes 11554 (11.2 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 249 bytes 15938 (15.5 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
enp0s25: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
ether 2c:d4:44:af:32:1b txqueuelen 1000 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 99 bytes 17396 (16.9 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
device interrupt 17 memory 0xd2d00000-d2d20000
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 1 (Boucle locale)
RX packets 1606 bytes 156262 (152.5 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 1606 bytes 156262 (152.5 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
tap0: flags=4419<UP,BROADCAST,RUNNING,PROMISC,MULTICAST> mtu 1500
inet6 fe80::cc4f:c5ff:fe42:151b prefixlen 64 scopeid 0x20<link>
ether ce:4f:c5:42:15:1b txqueuelen 1000 (Ethernet)
RX packets 171 bytes 13948 (13.6 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 264 bytes 18660 (18.2 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
wlp10s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 10.:P.:P.61 netmask 255.255.254.0 broadcast 10.:P.:P.255
inet6 fe80::18b2:db29:15bc:97f6 prefixlen 64 scopeid 0x20<link>
ether 60:67:20:79:3e:3c txqueuelen 1000 (Ethernet)
RX packets 14409 bytes 12258263 (11.6 MiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 8973 bytes 1546509 (1.4 MiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
Et voici un autre aperçu au démarrage de "raspbian-stretch-lite" :
dennix@trix:~/emulation/qemu-raspbian-network$ sudo ./qemu-pi.sh 2019-04-08-raspbian-stretch-lite.img
[sudo] Mot de passe de dennix :
net.ipv4.ip_forward = 1
Getting routes for interface: wlp10s0
Changing those routes to bridge interface: br0
Creating new bridge: br0
Adding wlp10s0 interface to bridge br0
can't add wlp10s0 to bridge br0: Operation not supported
Setting link up for: br0
Flusing routes to interface: wlp10s0
Adding IP address to bridge: br0
Adding routes to bridge: br0
Routes to bridge br0 added
umount: /home/dennix/emulation/qemu-raspbian-network/tmpmnt : cible occupée
(Dans certains cas, des renseignements sur les processus utilisant
le périphérique sont accessibles avec lsof(8) ou fuser(1).)
mount: /home/dennix/emulation/qemu-raspbian-network/2019-04-08-raspbian-stretch-lite.img: overlapping loop device exists
./qemu-pi.sh: ligne 124: tmpmnt/etc/udev/rules.d/90-qemu.rules: Aucun fichier ou dossier de ce type
Executing /etc/qemu-ifup
Bringing up tap0 for bridged mode...
Adding tap0 to br0...
pulseaudio: pa_context_connect() failed
pulseaudio: Reason: Connection refused
pulseaudio: Failed to initialize PA contextaudio: Could not init `pa' audio driver
Uncompressing Linux... done, booting the kernel.
Booting Linux on physical CPU 0x0
Initializing cgroup subsys cpuset
Initializing cgroup subsys cpu
Initializing cgroup subsys cpuacct
Linux version 4.4.34+ (amit@penguin) (gcc version 6.2.1 20161119 (Debian 6.2.1-4) ) #3 Thu Dec 1 14:44:23 IST 2016
CPU: ARMv6-compatible processor [410fb767] revision 7 (ARMv7), cr=00c5387d
CPU: VIPT aliasing data cache, unknown instruction cache
Machine: ARM-Versatile PB
Memory policy: Data cache writeback
sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 89478484971ns
Built 1 zonelists in Zone order, mobility grouping on. Total pages: 64960
Kernel command line: root=/dev/sda2 panic=1 vga=normal console=ttyAMA0
PID hash table entries: 1024 (order: 0, 4096 bytes)
Dentry cache hash table entries: 32768 (order: 5, 131072 bytes)
Inode-cache hash table entries: 16384 (order: 4, 65536 bytes)
Memory: 253716K/262144K available (4270K kernel code, 56K rwdata, 1008K rodata, 176K init, 139K bss, 8428K reserved, 0K cma-reserved)
Virtual kernel memory layout:
vector : 0xffff0000 - 0xffff1000 ( 4 kB)
fixmap : 0xffc00000 - 0xfff00000 (3072 kB)
vmalloc : 0xd0800000 - 0xff800000 ( 752 MB)
lowmem : 0xc0000000 - 0xd0000000 ( 256 MB)
modules : 0xbf000000 - 0xc0000000 ( 16 MB)
.text : 0xc0008000 - 0xc052fd68 (5280 kB)
.init : 0xc0530000 - 0xc055c000 ( 176 kB)
.data : 0xc055c000 - 0xc056a120 ( 57 kB)
.bss : 0xc059ae50 - 0xc05bdb58 ( 140 kB)
NR_IRQS:224
VIC @f1140000: id 0x00041190, vendor 0x41
FPGA IRQ chip 0 "SIC" @ f1003000, 13 irqs, parent IRQ: 63
clocksource: timer3: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 1911260446275 ns
Console: colour dummy device 80x30
Calibrating delay loop... 395.67 BogoMIPS (lpj=1978368)
pid_max: default: 32768 minimum: 301
Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
Disabling cpuset control group subsystem
Initializing cgroup subsys memory
Initializing cgroup subsys devices
Initializing cgroup subsys freezer
CPU: Testing write buffer coherency: ok
Setting up static identity map for 0x8220 - 0x827c
devtmpfs: initialized
VFP support v0.3: implementor 41 architecture 1 part 20 variant b rev 5
clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
NET: Registered protocol family 16
DMA: preallocated 256 KiB pool for atomic coherent allocations
Serial: AMBA PL011 UART driver
dev:f1: ttyAMA0 at MMIO 0x101f1000 (irq = 44, base_baud = 0) is a PL011 rev1
console [ttyAMA0] enabled
dev:f2: ttyAMA1 at MMIO 0x101f2000 (irq = 45, base_baud = 0) is a PL011 rev1
dev:f3: ttyAMA2 at MMIO 0x101f3000 (irq = 46, base_baud = 0) is a PL011 rev1
fpga:09: ttyAMA3 at MMIO 0x10009000 (irq = 70, base_baud = 0) is a PL011 rev1
PCI core found (slot 11)
PCI host bridge to bus 0000:00
pci_bus 0000:00: root bus resource [mem 0x50000000-0x5fffffff]
pci_bus 0000:00: root bus resource [mem 0x60000000-0x6fffffff pref]
pci_bus 0000:00: root bus resource [io 0x1000-0xffff]
pci_bus 0000:00: No busn resource found for root bus, will use [bus 00-ff]
PCI: bus0: Fast back to back transfers disabled
pci 0000:00:0c.0: BAR 2: assigned [mem 0x50000000-0x50001fff]
pci 0000:00:0c.0: BAR 1: assigned [mem 0x50002000-0x500023ff]
pci 0000:00:0c.0: BAR 0: assigned [io 0x1000-0x10ff]
vgaarb: loaded
SCSI subsystem initialized
clocksource: Switched to clocksource timer3
NET: Registered protocol family 2
TCP established hash table entries: 2048 (order: 1, 8192 bytes)
TCP bind hash table entries: 2048 (order: 1, 8192 bytes)
TCP: Hash tables configured (established 2048 bind 2048)
UDP hash table entries: 256 (order: 0, 4096 bytes)
UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
NET: Registered protocol family 1
RPC: Registered named UNIX socket transport module.
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
RPC: Registered tcp NFSv4.1 backchannel transport module.
NetWinder Floating Point Emulator V0.97 (double precision)
futex hash table entries: 256 (order: -1, 3072 bytes)
Installing knfsd (copyright (C) 1996 okir@monad.swb.de).
jffs2: version 2.2. (NAND) © 2001-2006 Red Hat, Inc.
romfs: ROMFS MTD (C) 2007 Red Hat, Inc.
Block layer SCSI generic (bsg) driver version 0.4 loaded (major 254)
io scheduler noop registered
io scheduler deadline registered
io scheduler cfq registered (default)
pl061_gpio dev:e4: PL061 GPIO chip @0x101e4000 registered
pl061_gpio dev:e5: PL061 GPIO chip @0x101e5000 registered
pl061_gpio dev:e6: PL061 GPIO chip @0x101e6000 registered
pl061_gpio dev:e7: PL061 GPIO chip @0x101e7000 registered
clcd-pl11x dev:20: PL110 rev0 at 0x10120000
clcd-pl11x dev:20: Versatile hardware, VGA display
Console: switching to colour frame buffer device 80x30
brd: module loaded
sym53c8xx 0000:00:0c.0: enabling device (0100 -> 0103)
sym0: <895a> rev 0x0 at pci 0000:00:0c.0 irq 93
sym0: No NVRAM, ID 7, Fast-40, LVD, parity checking
sym0: SCSI BUS has been reset.
scsi host0: sym-2.2.3
scsi 0:0:0:0: Direct-Access QEMU QEMU HARDDISK 2.5+ PQ: 0 ANSI: 5
scsi target0:0:0: tagged command queuing enabled, command queue depth 16.
scsi target0:0:0: Beginning Domain Validation
scsi target0:0:0: Domain Validation skipping write tests
scsi target0:0:0: Ending Domain Validation
scsi 0:0:2:0: CD-ROM QEMU QEMU CD-ROM 2.5+ PQ: 0 ANSI: 5
scsi target0:0:2: tagged command queuing enabled, command queue depth 16.
scsi target0:0:2: Beginning Domain Validation
scsi target0:0:2: Domain Validation skipping write tests
scsi target0:0:2: Ending Domain Validation
sr 0:0:2:0: [sr0] scsi3-mmc drive: 16x/50x cd/rw xa/form2 cdda tray
cdrom: Uniform CD-ROM driver Revision: 3.20
sd 0:0:0:0: [sda] 3522560 512-byte logical blocks: (1.80 GB/1.68 GiB)
sd 0:0:0:0: [sda] Write Protect is off
sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
physmap platform flash device: 04000000 at 34000000
physmap-flash.0: Found 1 x32 devices at 0x0 in 32-bit bank. Manufacturer ID 0x000000 Chip ID 0x000000
Intel/Sharp Extended Query Table at 0x0031
Using buffer write method
sda: sda1 sda2
sd 0:0:0:0: [sda] Attached SCSI disk
smc91x.c: v1.1, sep 22 2004 by Nicolas Pitre <nico@fluxnic.net>
smc91x smc91x.0 eth0: SMC91C11xFD (rev 1) at d0a68000 IRQ 57
[nowait]
smc91x smc91x.0 eth0: Ethernet addr: 52:54:8b:33:eb:b8
mousedev: PS/2 mouse device common for all mice
ledtrig-cpu: registered to indicate activity on CPUs
Netfilter messages via NETLINK v0.30.
nf_conntrack version 0.5.0 (3964 buckets, 15856 max)
ip_tables: (C) 2000-2006 Netfilter Core Team
NET: Registered protocol family 17
bridge: automatic filtering via arp/ip/ip6tables has been deprecated. Update your scripts to load br_netfilter if you need this.
Bridge firewalling registered
input: AT Raw Set 2 keyboard as /devices/fpga:06/serio0/input/input0
input: ImExPS/2 Generic Explorer Mouse as /devices/fpga:07/serio1/input/input2
EXT4-fs (sda2): couldn't mount as ext3 due to feature incompatibilities
EXT4-fs (sda2): mounted filesystem with ordered data mode. Opts: (null)
VFS: Mounted root (ext4 filesystem) readonly on device 8:2.
devtmpfs: mounted
Freeing unused kernel memory: 176K (c0530000 - c055c000)
systemd[1]: System time before build time, advancing clock.
systemd[1]: Failed to insert module 'autofs4': No such file or directory
random: systemd: uninitialized urandom read (16 bytes read, 46 bits of entropy available)
systemd[1]: systemd 232 running in system mode. (+PAM +AUDIT +SELINUX +IMA +APPARMOR +SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ +LZ4 +SECCOMP +BLKID +ELFUTILS +KMOD +IDN)
systemd[1]: Detected architecture arm.
Welcome to Raspbian GNU/Linux 9 (stretch)!
systemd[1]: Set hostname to <raspberrypi>.
random: systemd: uninitialized urandom read (16 bytes read, 55 bits of entropy available)
random: systemd-sysv-ge: uninitialized urandom read (16 bytes read, 67 bits of entropy available)
random: systemd-cryptse: uninitialized urandom read (16 bytes read, 71 bits of entropy available)
random: systemd-gpt-aut: uninitialized urandom read (16 bytes read, 73 bits of entropy available)
random: systemd-gpt-aut: uninitialized urandom read (16 bytes read, 73 bits of entropy available)
random: systemd: uninitialized urandom read (16 bytes read, 78 bits of entropy available)
random: systemd: uninitialized urandom read (16 bytes read, 78 bits of entropy available)
random: systemd: uninitialized urandom read (16 bytes read, 78 bits of entropy available)
random: systemd: uninitialized urandom read (16 bytes read, 78 bits of entropy available)
systemd[1]: Listening on Journal Socket (/dev/log).
[ OK ] Listening on Journal Socket (/dev/log).
systemd[1]: Started Forward Password Requests to Wall Directory Watch.
[ OK ] Started Forward Password Requests to Wall Directory Watch.
systemd[1]: Listening on /dev/initctl Compatibility Named Pipe.
[ OK ] Listening on /dev/initctl Compatibility Named Pipe.
systemd[1]: Created slice User and Session Slice.
[ OK ] Created slice User and Session Slice.
systemd[1]: Created slice System Slice.
[ OK ] Created slice System Slice.
systemd[1]: Created slice system-serial\x2dgetty.slice.
[ OK ] Created slice system-serial\x2dgetty.slice.
systemd[1]: dev-hugepages.mount: Couldn't determine result for ConditionVirtualization=!private-users, assuming failed: No such file or directory
systemd[1]: Mounting RPC Pipe File System...
Mounting RPC Pipe File System...
systemd[1]: Created slice system-systemd\x2dfsck.slice.
[ OK ] Created slice system-systemd\x2dfsck.slice.
systemd[1]: Created slice system-getty.slice.
[ OK ] Created slice system-getty.slice.
systemd[1]: Listening on Journal Socket.
[ OK ] Listening on Journal Socket.
systemd[1]: Starting Load Kernel Modules...
Starting Load Kernel Modules...
systemd[1]: Starting Set the console keyboard layout...
Starting Set the console keyboard layout...
systemd[1]: Starting Restore / save the current clock...
Starting Restore / save the current clock...
systemd[1]: Listening on udev Control Socket.
[ OK ] Listening on udev Control Socket.
systemd[1]: Reached target Swap.
[ OK ] Reached target Swap.
systemd[1]: Mounting POSIX Message Queue File System...
Mounting POSIX Message Queue File System...
systemd[1]: Starting Create Static Device Nodes in /dev...
Starting Create Static Device Nodes in /dev...
systemd[1]: Listening on udev Kernel Socket.
[ OK ] Listening on udev Kernel Socket.
systemd[1]: Reached target Slices.
[ OK ] Reached target Slices.
systemd[1]: Listening on fsck to fsckd communication Socket.
[ OK ] Listening on fsck to fsckd communication Socket.
random: nonblocking pool is initialized
systemd[1]: Listening on Syslog Socket.
[ OK ] Listening on Syslog Socket.
systemd[1]: Starting Journal Service...
Starting Journal Service...
systemd[1]: Mounted RPC Pipe File System.
[ OK ] Mounted RPC Pipe File System.
systemd[1]: Mounted POSIX Message Queue File System.
[ OK ] Mounted POSIX Message Queue File System.
systemd[1]: Started Load Kernel Modules.
[ OK ] Started Load Kernel Modules.
systemd[1]: Started Restore / save the current clock.
[ OK ] Started Restore / save the current clock.
systemd[1]: Started Create Static Device Nodes in /dev.
[ OK ] Started Create Static Device Nodes in /dev.
systemd[1]: Time has been changed
systemd[1]: Starting udev Kernel Device Manager...
Starting udev Kernel Device Manager...
systemd[1]: Starting File System Check on Root Device...
Starting File System Check on Root Device...
systemd[1]: Starting Apply Kernel Variables...
Starting Apply Kernel Variables...
systemd[1]: Started File System Check Daemon to report status.
[ OK ] Started File System Check Daemon to report status.
[ OK ] Started Apply Kernel Variables.
[ OK ] Started File System Check on Root Device.
[ OK ] Started Journal Service.
Starting Remount Root and Kernel File Systems...
[ OK ] Started udev Kernel Device Manager.
[ OK ] Started Remount Root and Kernel File Systems.
Starting Flush Journal to Persistent Storage...
Starting udev Coldplug all Devices...
Starting Load/Save Random Seed...
[ OK ] Started Load/Save Random Seed.
[ OK ] Started Flush Journal to Persistent Storage.
[ OK ] Started Set the console keyboard layout.
[ OK ] Reached target Local File Systems (Pre).
[ OK ] Started udev Coldplug all Devices.
Starting Show Plymouth Boot Screen...
[ OK ] Found device /dev/ttyAMA0.
[ OK ] Started Show Plymouth Boot Screen.
[ OK ] Found device QEMU_HARDDISK boot.
Starting File System Check on /dev/disk/by-partuuid/c1dc39e5-01...
[ OK ] Reached target Paths.
[ OK ] Reached target Encrypted Volumes.
[ OK ] Started Forward Password Requests to Plymouth Directory Watch.
[ OK ] Started File System Check on /dev/disk/by-partuuid/c1dc39e5-01.
Mounting /boot...
[ OK ] Mounted /boot.
[ OK ] Reached target Local File Systems.
Starting Raise network interfaces...
Starting Tell Plymouth To Write Out Runtime Data...
Starting Preprocess NFS configuration...
Starting Set console font and keymap...
Starting Create Volatile Files and Directories...
[ OK ] Started Tell Plymouth To Write Out Runtime Data.
[ OK ] Started Preprocess NFS configuration.
[ OK ] Reached target NFS client services.
[ OK ] Reached target Remote File Systems (Pre).
[ OK ] Reached target Remote File Systems.
[ OK ] Started Set console font and keymap.
[ OK ] Started Create Volatile Files and Directories.
Starting Network Time Synchronization...
Starting Update UTMP about System Boot/Shutdown...
[ OK ] Started Update UTMP about System Boot/Shutdown.
[ OK ] Started Network Time Synchronization.
[ OK ] Reached target System Initialization.
[ OK ] Started Daily Cleanup of Temporary Directories.
[ OK ] Listening on D-Bus System Message Bus Socket.
[ OK ] Listening on Avahi mDNS/DNS-SD Stack Activation Socket.
[ OK ] Listening on triggerhappy.socket.
[ OK ] Reached target Sockets.
[ OK ] Reached target Basic System.
Starting Login Service...
[ OK ] Started D-Bus System Message Bus.
Starting WPA supplicant...
Starting LSB: Autogenerate and use a swap file...
Starting Turn on SSH if /boot/ssh is present...
Starting LSB: Switch to ondemand cp…r (unless shift key is pressed)...
Starting Avahi mDNS/DNS-SD Stack...
[ OK ] Started Regular background program processing daemon.
Starting triggerhappy global hotkey daemon...
Starting System Logging Service...
Starting dhcpcd on all interfaces...
Starting Disable WiFi if country not set...
Starting rng-tools.service...
[ OK ] Reached target System Time Synchronized.
[ OK ] Started Daily apt download activities.
[ OK ] Started Daily apt upgrade and clean activities.
[ OK ] Reached target Timers.
[ OK ] Started triggerhappy global hotkey daemon.
[ OK ] Started Disable WiFi if country not set.
[FAILED] Failed to start rng-tools.service.
See 'systemctl status rng-tools.service' for details.
[ OK ] Started System Logging Service.
[ OK ] Started WPA supplicant.
[ OK ] Started Avahi mDNS/DNS-SD Stack.
[ OK ] Started LSB: Autogenerate and use a swap file.
[ OK ] Started LSB: Switch to ondemand cpu…nor (unless shift key is pressed).
[ OK ] Started Login Service.
[ OK ] Started Raise network interfaces.
[ OK ] Started dhcpcd on all interfaces.
[ OK ] Reached target Network.
Starting OpenBSD Secure Shell server...
Starting /etc/rc.local Compatibility...
Starting Permit User Sessions...
My IP address is 169.254.11.7
[ OK ] Started /etc/rc.local Compatibility.
[ OK ] Started Permit User Sessions.
Starting Hold until boot process finishes up...
Starting Terminate Plymouth Boot Screen...
Raspbian GNU/Linux 9 raspberrypi ttyAMA0
raspberrypi login: pi
Password:
Last login: Mon May 27 15:17:19 BST 2019 on tty1
Linux raspberrypi 4.4.34+ #3 Thu Dec 1 14:44:23 IST 2016 armv6l
The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.
Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
SSH is enabled and the default password for the 'pi' user has not been changed.
This is a security risk - please login as the 'pi' user and type 'passwd' to set a new password.
pi@raspberrypi:~$
Affichage des interfaces sur l'invité ou "guest" (machine virtuelle)
pi@raspberrypi:~$ ifconfig
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 169.254.11.7 netmask 255.255.0.0 broadcast 169.254.255.255
ether 52:54:8b:33:eb:b8 txqueuelen 1000 (Ethernet)
RX packets 44 bytes 3156 (3.0 KiB)
RX errors 0 dropped 4 overruns 0 frame 0
TX packets 48 bytes 4334 (4.2 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
device interrupt 57 base 0x8000 dma 0xff
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
loop txqueuelen 1 (Local Loopback)
RX packets 9 bytes 855 (855.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 9 bytes 855 (855.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
pi@raspberrypi:~$
Une fois la machine virtuelle en marche, je n'ai plus aucun accès réseau. Je peux juste effectuer un "ping" sur "guest" !
pi@raspberrypi:~$ ping 169.254.11.7
PING 169.254.11.7 (169.254.11.7) 56(84) bytes of data.
64 bytes from 169.254.11.7: icmp_seq=1 ttl=64 time=2.38 ms
64 bytes from 169.254.11.7: icmp_seq=2 ttl=64 time=0.937 ms
64 bytes from 169.254.11.7: icmp_seq=3 ttl=64 time=0.836 ms
64 bytes from 169.254.11.7: icmp_seq=4 ttl=64 time=0.639 ms
^C
--- 169.254.11.7 ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3017ms
rtt min/avg/max/mdev = 0.639/1.200/2.389/0.695 ms
La virtualisation de mon réseau sur "host" (Debian 9 portable), devrait en théorie être "bridgée" avec le "guest" (machine virtuelle "raspbian-stretch-lite" émulé par QEMU).
J'aimerais donc pouvoir utiliser ce réseau virtuel créé grâce au script ci-dessus afin de communiquer sur le réseau privé (intranet) et vers le réseau public (internet) et si je parviens à configurer mon bridge avec une interface physique du portable (Wireless Ethernet/Wifi et RJ45 Ethernet). Par la même occasion, j'essaierai de faire tourner plusieurs machines virtuelles raspberry "raspbian-stretch-lite" sur mon portable avec des adresses IP différentes.
Je fait appel à vos lumières afin d'éclairer ma lanterne en vous remerciant d'avance.
Dernière modification par Dennix (29-05-2019 21:46:17)