logo Debian Debian Debian-France Debian-Facile Debian-fr.org Forum-Debian.fr Debian ? Communautés logo inclusivité

Debian-facile

Bienvenue sur Debian-Facile, site d'aide pour les nouveaux utilisateurs de Debian.

Vous n'êtes pas identifié(e).

#1 28-05-2019 16:19:43

Dennix
Membre
Inscription : 27-05-2019

Création d'un réseau QEMU (TAP) machine virtuelle raspberry/raspbian

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)

Hors ligne

#2 28-05-2019 19:47:36

Beta-Pictoris
Membre
Lieu : Angers
Distrib. : Buster
Inscription : 11-08-2015

Re : Création d'un réseau QEMU (TAP) machine virtuelle raspberry/raspbian

Pour ponter une interface wifi :
Il y a une méthode avec ebtable : https://wiki.debian.org/BridgeNetworkCo … reless_NIC
Et une autre avec hostapd: https://askubuntu.com/questions/1006277 … ame-subnet Voir si on peut faire la même chose avec wpa_supplicant.

Après, il y a la solution routeur nat. Voici un exemple avec network-manager : https://debian-facile.org/doc:reseau:ne … n-internet

A noter, tu peux gérer tes vm qemu, graphiquement, avec virt-manager/libvirt.
Et en plus, grâce à cette méthode, tu auras des vm qui tourneront en tant que service (indépendantes de ta session utilisateur).
Tu pouras, même, gérer tes vm en réseau avec un autre client virt-manager installé sur un autre poste.

Dernière modification par Beta-Pictoris (28-05-2019 20:12:48)

Hors ligne

#3 30-05-2019 13:16:24

Dennix
Membre
Inscription : 27-05-2019

Re : Création d'un réseau QEMU (TAP) machine virtuelle raspberry/raspbian

Certes, les solutions ne manquent pas, mais laquelle est vraiment la plus simple à mettre en oeuvre ?
J'explore ces différentes possibilités, mais je ne sais pas encore comment les intégrer dans le script afin de créer la virtualisation du réseau sur l'hôte ou "host" (portable).
Beta-Pictoris, avant d'ouvrir ce post je me suis déjà penché sur cette question de virtualisation avec KVM pour gérer les vm avec virt-manager/libvirt. Mais à ma connaissance, il n'est pas possible de virtualiser des images de raspbian (armhf) directement avec KVM installé sur une architecture AMD/X64 et par conséquent d'utiliser 'virt-manager' ou 'virsh' pour gérer ces mv raspberry. En effet, le problème est au niveau de l'architecture matériel. On peut virtualiser des OS qui correspondent au même type de machine/matériel. En  clair, on ne peut que virtualiser des OS qui sont seulement compatibles avec des architectures semblables (amd64/X64). Dans le cas de la raspberrypi qui dépend d'une autre architecture (ARM) on ne pourra pas la virtualiser (sauf erreur) sur du matériel AMD64/X64. D'où la nécessité d'utiliser QEMU pour émuler l'architecture ARM sur une plateforme X64/AMD64. Cependant, il y aurait la possibilité de virtualiser des OS (Debian 9 par exemple) grâce à KVM et sur lesquels il faut installer QEMU afin de pouvoir émuler une raspbian. Cela dit, je n'ai jamais utilisé l'émulation QEMU pour Raspbian (armhf) sur des OS compatibles X64/AMD64 virtualisés avec KVM. En conclusion, pour virtualiser plusieurs Raspbian (armhf) grâce à KVM, il faut utiliser une plateforme Raspberry (ARM), donc possèdant la même architecture. Au quel cas si on peut démontrer le contraire ou éventuellement proposer une astuce (si possible) qu'on le fasse savoir sur ce fil.

Dernière modification par Dennix (30-05-2019 17:25:08)

Hors ligne

#4 31-05-2019 01:19:31

Beta-Pictoris
Membre
Lieu : Angers
Distrib. : Buster
Inscription : 11-08-2015

Re : Création d'un réseau QEMU (TAP) machine virtuelle raspberry/raspbian

En tout cas, sous buster, quand on créé une nouvelle VM dans virt-manager, on peut choisir, en cpu, l'architecture arm, arvm6 ou aarch64 et le type de machine émulé.
Entre autres, on a des 'raspi2' et des 'raspi3'.

Hors ligne

#5 03-06-2019 14:39:07

Dennix
Membre
Inscription : 27-05-2019

Re : Création d'un réseau QEMU (TAP) machine virtuelle raspberry/raspbian

Always further ....

En effet ça confirme mes doutes et cela me taquinait de ne pas pouvoir virtualiser avec KVM une architecture ARM sur une platforme AMD86/X86. Si la version KVM de Debian "buster" prend en compte plusieurs nouvelles architectures telle que ARM, alors cela devrait faciliter la virtualisation des OS embarqués notamment raspberry/Raspbian. Pour le moment, j'utilise "stretch" mais j'envisage sérieusement d'upgrader ma version Debian vers "buster".

Pour en revenir à mon problème de virtualisation réseau QEMU, j'ai analysé les différentes solutions et cela ma finalement amené de fils en aiguilles à solutionner partiellement ce problème d'interfaces (wifi) grâce aux liens suivants : 
https://www.reddit.com/r/linux/comments … for_wlan0/
https://ubuntuforums.org/showthread.php?t=1681045
http://serveur.ipgirl.com/bridging-wlan0-eth0.html

J'ai ajouté du code dans le script qemu-pi.sh afin de relier l'interface WIFI (au bridge) qui était détectée :

.............. extrait du code du script qemu-pi.sh, lignes 88 à 93 ..............
  echo "Linking $IFACE interface" #  Pour relier l'interface wifi 
  iw dev $IFACE set 4addr on  # utilisez l'outil 'iw' pour activer '4addr'
  echo "Adding $IFACE interface to bridge $BRIDGE"
  brctl addif $BRIDGE $IFACE
  echo "Displaying bridge: $BRIDGE" # Maintenant, cela devrait fonctionner.
  brctl show # Pour afficher des ponts
..................................................................................


Résumons. Après un démarrage de la machine virtuelle le pont 'br0' est bien créé.
Ce qui permet logiquement à "guest" d'être ponté sur l'interface 'wlp10s0' côté "host"


dennix@trix:~$ sudo ifconfig
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::6267:20ff:fe79:3e3c  prefixlen 64  scopeid 0x20<link>
        ether 60:67:20:79:3e:3c  txqueuelen 1000  (Ethernet)
        RX packets 57  bytes 4892 (4.7 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 147  bytes 9152 (8.9 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 0  bytes 0 (0.0 B)
        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 886  bytes 107257 (104.7 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 886  bytes 107257 (104.7 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

tap0: flags=4419<UP,BROADCAST,RUNNING,PROMISC,MULTICAST>  mtu 1500
        inet6 fe80::acda:79ff:fe4b:ae0c  prefixlen 64  scopeid 0x20<link>
        ether ae:da:79:4b:ae:0c  txqueuelen 1000  (Ethernet)
        RX packets 57  bytes 5690 (5.5 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 163  bytes 11310 (11.0 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.101.251.255
        inet6 fe80::18b2:db29:15bc:97f6  prefixlen 64  scopeid 0x20<link>
        ether 60:67:20:79:3e:3c  txqueuelen 1000  (Ethernet)
        RX packets 2330  bytes 2254511 (2.1 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 2158  bytes 291382 (284.5 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
 



Malheureusementl, il se trouve que la connexion au réseau interne/externe depuis "host" et/ou "guest" (Machine Virtuelle en marche) est impossible dans ce cas. 
Cependant un 'ping' sur l'interface 'wlp10s0' avec l'adresse '10.:P.:P.61' depuis l'invite (pi@raspberrypi:~$) "guest" fonctionne.


pi@raspberrypi:~$ ping 10.:P.:P.61
PING 10.:P.:P.61 (10.:P.:P.61) 56(84) bytes of data.
64 bytes from 10.:P.:P.61: icmp_seq=1 ttl=64 time=0.696 ms
64 bytes from 10.:P.:P.61: icmp_seq=2 ttl=64 time=0.922 ms
^C
--- 10.:P.:P.61 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1006ms
rtt min/avg/max/mdev = 0.696/0.809/0.922/0.113 ms
 



Dans mon cas "network-manager" fonctionne sur "host" mais avec des affichages parfois différents voir "Affichage 1/2/3/4/5 avec/sans Machine Virtuelle".
Affichage 1 sans MV :


$ sudo systemctl status NetworkManager
● NetworkManager.service - Network Manager
   Loaded: loaded (/lib/systemd/system/NetworkManager.service; enabled; vendor preset: enabled)
   Active: active (running) since Mon 2019-06-03 13:43:36 CEST; 3min 34s ago
     Docs: man:NetworkManager(8)
 Main PID: 509 (NetworkManager)
    Tasks: 4 (limit: 4915)
   CGroup: /system.slice/NetworkManager.service
           ├─509 /usr/sbin/NetworkManager --no-daemon
           └─998 /sbin/dhclient -d -q -sf /usr/lib/NetworkManager/nm-dhcp-helper -pf /var/run/dhclient-wlp10s0.pid -lf /var/lib/NetworkManager/dhclient-17aad55d-01b0-47a9-8bfd-b57

juin 03 13:43:42 trix NetworkManager[509]: <info>  [1559562222.6179] dhcp4 (wlp10s0): state changed unknown -> bound
juin 03 13:43:42 trix NetworkManager[509]: <info>  [1559562222.6197] device (wlp10s0): state change: ip-config -> ip-check (reason 'none') [70 80 0]
juin 03 13:43:42 trix NetworkManager[509]: <info>  [1559562222.6204] device (wlp10s0): state change: ip-check -> secondaries (reason 'none') [80 90 0]
juin 03 13:43:42 trix NetworkManager[509]: <info>  [1559562222.6209] device (wlp10s0): state change: secondaries -> activated (reason 'none') [90 100 0]
juin 03 13:43:42 trix NetworkManager[509]: <info>  [1559562222.6211] manager: NetworkManager state is now CONNECTED_LOCAL
juin 03 13:43:42 trix NetworkManager[509]: <info>  [1559562222.6301] manager: NetworkManager state is now CONNECTED_GLOBAL
juin 03 13:43:42 trix NetworkManager[509]: <info>  [1559562222.6305] policy: set 'spark' (wlp10s0) as default for IPv4 routing and DNS
juin 03 13:43:42 trix NetworkManager[509]: <info>  [1559562222.6325] device (wlp10s0): Activation: successful, device activated.
juin 03 13:43:42 trix NetworkManager[509]: <info>  [1559562222.6334] manager: startup complete
juin 03 13:43:42 trix dhclient[998]: bound to 10.101.250.64 -- renewal in 38870 seconds.
 


Affichage 2 avec MV :


$ sudo systemctl status NetworkManager
● NetworkManager.service - Network Manager
   Loaded: loaded (/lib/systemd/system/NetworkManager.service; enabled; vendor preset: enabled)
   Active: active (running) since Mon 2019-06-03 10:57:26 CEST; 28min ago
     Docs: man:NetworkManager(8)
 Main PID: 498 (NetworkManager)
    Tasks: 4 (limit: 4915)
   CGroup: /system.slice/NetworkManager.service
           ├─ 498 /usr/sbin/NetworkManager --no-daemon
           └─1002 /sbin/dhclient -d -q -sf /usr/lib/NetworkManager/nm-dhcp-helper -pf /var/run/dhclient-wlp10s0.pid -lf /var/lib/NetworkManager/dhclient-17aad55d-01b0-47a9-8bfd-b572efa9b9

juin 03 11:20:13 trix NetworkManager[498]: <info>  [1559553613.7823] device (tap0): state change: unavailable -> disconnected (reason 'connection-assumed') [20 30 41]
juin 03 11:20:13 trix NetworkManager[498]: <info>  [1559553613.7835] device (tap0): Activation: starting connection 'tap0' (bae73c63-4ac6-4933-9201-5dea0bb3e8ac)
juin 03 11:20:13 trix NetworkManager[498]: <info>  [1559553613.7845] device (tap0): state change: disconnected -> prepare (reason 'none') [30 40 0]
juin 03 11:20:13 trix NetworkManager[498]: <info>  [1559553613.7852] device (tap0): state change: prepare -> config (reason 'none') [40 50 0]
juin 03 11:20:13 trix NetworkManager[498]: <info>  [1559553613.7897] device (tap0): state change: config -> ip-config (reason 'none') [50 70 0]
juin 03 11:20:13 trix NetworkManager[498]: <info>  [1559553613.7899] device (br0): bridge port tap0 was attached
juin 03 11:20:13 trix NetworkManager[498]: <info>  [1559553613.7899] device (tap0): Activation: connection 'tap0' enslaved, continuing activation
juin 03 11:20:13 trix NetworkManager[498]: <info>  [1559553613.7903] device (tap0): state change: ip-config -> secondaries (reason 'none') [70 90 0]
juin 03 11:20:13 trix NetworkManager[498]: <info>  [1559553613.7906] device (tap0): state change: secondaries -> activated (reason 'none') [90 100 0]
juin 03 11:20:13 trix NetworkManager[498]: <info>  [1559553613.7943] device (tap0): Activation: successful, device activated.
 


Affichage 3 avec MV :


$ sudo systemctl status NetworkManager
[sudo] Password of denix : 
● NetworkManager.service - Network Manager
   Loaded: loaded (/lib/systemd/system/NetworkManager.service; enabled; vendor preset: enabled)
   Active: active (running) since Mon 2019-06-03 09:23:07 CEST; 56min ago
     Docs: man:NetworkManager(8)
 Main PID: 497 (NetworkManager)
    Tasks: 3 (limit: 4915)
   CGroup: /system.slice/NetworkManager.service
           └─497 /usr/sbin/NetworkManager --no-daemon

> juin 03 09:47:14 trix NetworkManager[497]: <warn>  [1559548034.8612] sup-iface[0x56225fbba700,wlp10s0]: connection disconnected (reason -3)
> juin 03 09:47:14 trix NetworkManager[497]: <info>  [1559548034.8616] device (wlp10s0): supplicant interface state: associated -> disconnected
juin 03 09:52:59 trix NetworkManager[497]: <info>  [1559548379.5094] device (wlp10s0): set-hw-addr: set MAC address to 3A:B4:8F:5E:73:FA (scanning)
..
...
> juin 03 10:19:19 trix NetworkManager[497]: <info>  [1559549959.8629] device (wlp10s0): supplicant interface state: disconnected -> disabled
> juin 03 10:19:19 trix NetworkManager[497]: <info>  [1559549959.9084] device (wlp10s0): supplicant interface state: disabled -> disconnected
 



Affichage 4 avec ou sans MV :


$ sudo systemctl stop NetworkManager
$ sudo systemctl start NetworkManager
$ sudo systemctl status NetworkManager
● NetworkManager.service - Network Manager
   Loaded: loaded (/lib/systemd/system/NetworkManager.service; enabled; vendor preset: enabled)
   Active: active (running) since Mon 2019-06-03 11:53:49 CEST; 2s ago
     Docs: man:NetworkManager(8)
 Main PID: 2872 (NetworkManager)
    Tasks: 4 (limit: 4915)
   CGroup: /system.slice/NetworkManager.service
           └─2872 /usr/sbin/NetworkManager --no-daemon

juin 03 11:53:49 trix NetworkManager[2872]: <info>  [1559555629.9139] manager: (wlp10s0): new 802.11 WiFi device (/org/freedesktop/NetworkManager/Devices/3)
> juin 03 11:53:49 trix NetworkManager[2872]: <info>  [1559555629.9156] device (wlp10s0): state change: unmanaged -> unavailable (reason 'managed') [10 20 2]
juin 03 11:53:49 trix NetworkManager[2872]: <info>  [1559555629.9216] device (wlp10s0): set-hw-addr: set MAC address to 22:6B:2B:EE:FE:D1 (scanning)
juin 03 11:53:50 trix NetworkManager[2872]: <info>  [1559555630.3139] bluez: use BlueZ version 5
juin 03 11:53:50 trix NetworkManager[2872]: <info>  [1559555630.3170] ModemManager available in the bus
juin 03 11:53:50 trix NetworkManager[2872]: <info>  [1559555630.3185] supplicant: wpa_supplicant running
juin 03 11:53:50 trix NetworkManager[2872]: <info>  [1559555630.3186] device (wlp10s0): supplicant interface state: init -> starting
juin 03 11:53:50 trix NetworkManager[2872]: <info>  [1559555630.3884] sup-iface[0x5635cad636e0,wlp10s0]: supports 5 scan SSIDs
juin 03 11:53:50 trix NetworkManager[2872]: <info>  [1559555630.3899] device (wlp10s0): supplicant interface state: starting -> ready
> juin 03 11:53:50 trix NetworkManager[2872]: <info>  [1559555630.3900] device (wlp10s0): state change: unavailable -> disconnected (reason 'supplicant-available') [20 30 42]
 


Affichage 5 après arrêt MV :


$ sudo systemctl status NetworkManager
● NetworkManager.service - Network Manager
   Loaded: loaded (/lib/systemd/system/NetworkManager.service; enabled; vendor preset: enabled)
   Active: active (running) since Mon 2019-06-03 14:46:23 CEST; 7min ago
     Docs: man:NetworkManager(8)
 Main PID: 2491 (NetworkManager)
    Tasks: 4 (limit: 4915)
   CGroup: /system.slice/NetworkManager.service
           └─2491 /usr/sbin/NetworkManager --no-daemon

juin 03 14:53:57 trix NetworkManager[2491]: <info>  [1559566437.3430] devices removed (path: /sys/devices/virtual/net/tap0, iface: tap0)
juin 03 14:53:57 trix NetworkManager[2491]: <info>  [1559566437.4253] device (br0): state change: activated -> unmanaged (reason 'connection-assumed') [100
juin 03 14:53:57 trix NetworkManager[2491]: <info>  [1559566437.4269] manager: NetworkManager state is now CONNECTING
juin 03 14:53:57 trix NetworkManager[2491]: <info>  [1559566437.4975] devices added (path: /sys/devices/virtual/net/tap0, iface: tap0)
juin 03 14:53:57 trix NetworkManager[2491]: <info>  [1559566437.4976] device added (path: /sys/devices/virtual/net/tap0, iface: tap0): no ifupdown configura
juin 03 14:53:57 trix NetworkManager[2491]: <info>  [1559566437.5117] devices removed (path: /sys/devices/virtual/net/tap0, iface: tap0)
juin 03 14:53:57 trix NetworkManager[2491]: <info>  [1559566437.5118] devices removed (path: /sys/devices/virtual/net/br0, iface: br0)
> juin 03 14:54:05 trix NetworkManager[2491]: <info>  [1559566445.3309] device (wlp10s0): supplicant interface state: disconnected -> scanning
> juin 03 14:54:05 trix NetworkManager[2491]: <info>  [1559566445.4941] device (wlp10s0): supplicant interface state: scanning -> authenticating
> juin 03 14:54:10 trix NetworkManager[2491]: <info>  [1559566450.5064] device (wlp10s0): supplicant interface state: authenticating -> disconnected
 



Selon les lignes marquées et indiquées par un '>' il y aurait un problème de connection et/ou d'interface avec supplicant.
Question : est-ce un problème d'authentification WPA/WPA2 sur "host" ou sur "guest", d'interface etc ...?

La commande suivante 'wpa_cli reconfigure' est-elle à compléter (par exemple) et/ou à effectuer sur "host" ou "guest" (je pense à plutôt à "host")?


$ sudo wpa_cli reconfigure
[sudo] Mot de passe de dennix : 
Selected interface 'wlp10s0'
FAIL
 



Pour information, j'ai exécuté la commande 'dhclient' avant (voir ci-dessous, Displaying 1:) et après (Displaying 2:) le lancement de le Machine Virtuelle   
Displaying 1 avant MV :


$ sudo dhclient -v wlp10s0
[sudo] Mot de passe de dennix : 
Internet Systems Consortium DHCP Client 4.3.5
Copyright 2004-2016 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/

Listening on LPF/wlp10s0/60:67:20:79:3e:3c
Sending on   LPF/wlp10s0/60:67:20:79:3e:3c
Sending on   Socket/fallback
DHCPDISCOVER on wlp10s0 to 255.255.255.255 port 67 interval 6
DHCPDISCOVER on wlp10s0 to 255.255.255.255 port 67 interval 13
DHCPREQUEST of 10.:P.:P.61 on wlp10s0 to 255.255.255.255 port 67
DHCPOFFER of 10.:P.:P.61 from 10.:P.:P.1
DHCPACK of 10.:P.:P.61 from 10.:P.:P.1
bound to 10.:P.:P.61 -- renewal in 42343 seconds.
 



Displaying 2 après MV :


$ sudo dhclient -v wlp10s0
Internet Systems Consortium DHCP Client 4.3.5
Copyright 2004-2016 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/

Listening on LPF/wlp10s0/60:67:20:79:3e:3c
Sending on   LPF/wlp10s0/60:67:20:79:3e:3c
Sending on   Socket/fallback
DHCPREQUEST of 10.:P.:P.61 on wlp10s0 to 255.255.255.255 port 67
DHCPREQUEST of 10.:P.:P.61 on wlp10s0 to 255.255.255.255 port 67
DHCPDISCOVER on wlp10s0 to 255.255.255.255 port 67 interval 5
DHCPDISCOVER on wlp10s0 to 255.255.255.255 port 67 interval 6
DHCPDISCOVER on wlp10s0 to 255.255.255.255 port 67 interval 8
DHCPDISCOVER on wlp10s0 to 255.255.255.255 port 67 interval 11
DHCPDISCOVER on wlp10s0 to 255.255.255.255 port 67 interval 20
^C
 



Bien entendu, une fois la Machine Virtuelle stoppée sur "guest" le réseau reste inactif/sans connexion intranet/internet sur "host".
Même après ces commandes (ci-dessous) le réseau intranet/internet (sauf erreur) reste inaccessible ou  sans connexion intranet/internet:
$ sudo systemctl start/stop NetworkManager
$ sudo dhclient -r
$ sudo dhclient

Autre question, quel est donc le moyen le plus simple pour réinitiliaser le réseau dhclient, les interfaces wlp10s0 et supplicant (?),  etc ... sans redémarrer le portable (host) et tant qu'à faire que le réseau soit également fonctionnel autant sur "host" (sans MV) ou sur "guest" (avec MV) ?

Petite précision mon authentication wpa_supplicant utilise D-bus.

Dernière modification par Dennix (03-06-2019 14:56:02)

Hors ligne

Pied de page des forums