« Atelier SysRes SE4 2025/2026 E5 » : différence entre les versions
(→Utiles) |
|||
| (3 versions intermédiaires par le même utilisateur non affichées) | |||
| Ligne 73 : | Ligne 73 : | ||
==== Etape 4 : ==== | ==== Etape 4 : ==== | ||
PHRASE MANQUANTE<syntaxhighlight lang="shell"> | PHRASE MANQUANTE<syntaxhighlight lang="shell"> | ||
xen create /etc/xen/SE4.Manjaro.cfg | xen create /etc/xen/SE4.Manjaro.cfg | ||
| Ligne 98 : | Ligne 90 : | ||
==== Etape 5 : Partition ==== | ==== Etape 5 : Partition ==== | ||
On partionne avec cette commande :<syntaxhighlight lang="shell"> | |||
lvcreate -n SE4.CachyOS.var -L 10G virtual | |||
</syntaxhighlight> | |||
On éteint notre machine : <syntaxhighlight lang="shell"> | On éteint notre machine : <syntaxhighlight lang="shell"> | ||
xen shutdown SE4.CachyOS | xen shutdown SE4.CachyOS | ||
</syntaxhighlight> | </syntaxhighlight> | ||
Et on modifie :<syntaxhighlight lang="shell"> | |||
vim /etc/xen/SE4.CachyOS.cfg | |||
</syntaxhighlight> | |||
Et on ajoute ceci :<syntaxhighlight lang="shell"> | |||
disk = [ | disk = [ | ||
[...], | [...], | ||
'phy:/dev/virtual/SE4.CachyOS.home, | 'phy:/dev/virtual/SE4.CachyOS.home,xvda3,w', | ||
'phy:/dev/virtual/SE4.CachyOS.var, | 'phy:/dev/virtual/SE4.CachyOS.var,xvdb1,w' | ||
] | ] | ||
</syntaxhighlight> | </syntaxhighlight> | ||
| Ligne 113 : | Ligne 112 : | ||
</syntaxhighlight> | </syntaxhighlight> | ||
Ensuite on se connecte à notre VM via :<syntaxhighlight lang="shell"> | |||
xen console SE4.CachyOS | |||
</syntaxhighlight> | |||
===== Machines de Service - CachyOS & Manjaro ===== | |||
On modifie :<syntaxhighlight lang="shell"> | |||
vim /etc/network/interfaces | |||
</syntaxhighlight> | |||
Et on ajoute ceci :<syntaxhighlight lang="shell"> | |||
auto eth0 | |||
iface eth0 inet static | |||
address 172.60.0.3/24 | |||
gateway 172.60.0.1 | |||
</syntaxhighlight> | |||
* 172.60.0.3 est l'adresse IP de la VM CachyOS | |||
===== Machine Mandataire - LinusTorvalds ===== | |||
La machine mandataire agit comme passerelle IPv4 pour les machines de services. Voici sa configuration réseau :<syntaxhighlight lang="shell"> | |||
auto eth0 | |||
iface eth0 inet static | |||
address 172.60.0.1/24 | |||
auto eth1 | |||
iface eth1 inet static | |||
address 193.48.57.177/24 | |||
gateway 193.48.57.161 | |||
iface eth1 inet6 auto | |||
</syntaxhighlight> | |||
=== Utiles === | === Utiles === | ||
| Ligne 125 : | Ligne 154 : | ||
xen console <nomMachine> | xen console <nomMachine> | ||
</syntaxhighlight>nomMachine : dans notre cas soit SE4.Manjaro | SE4.CachyOS | SE4.LinusTorvalds | </syntaxhighlight>nomMachine : dans notre cas soit SE4.Manjaro | SE4.CachyOS | SE4.LinusTorvalds | ||
''<u>Sortir de la console xen :</u>''<syntaxhighlight lang="shell"> | ''<u>Sortir de la console xen :</u>''<syntaxhighlight lang="shell"> | ||
Ctrl + Shift + 5 | Ctrl + Shift + 5 | ||
</syntaxhighlight> | </syntaxhighlight>''<u>Eteindre une VM :</u>'' <syntaxhighlight lang="shell"> | ||
xen shutdown <nomMachine> | |||
</syntaxhighlight>nomMachine : dans notre cas soit SE4.Manjaro | SE4.CachyOS | SE4.LinusTorvalds | |||
Version actuelle datée du 20 janvier 2026 à 17:30
Compte rendu des commandes effectués
Etape 1 : Connexion SSH
ssh root@capbreton
Mot de passe : g0llum_fr0d0
Etape 2 : Créer un fichier dans le répertoire /etc/network/interfaces.d du Dom0 aux noms du binôme concerné
On se déplace à ce répertoire :
cd /etc/network/interfaces.d/
On créer ensuite ensuite un fichier aux noms de notre binôme et on l'édite :
touch SE42026_cpayet_tdelobel
vim SE42026_cpayet_tdelobel
Puis on donne un nom au bridge, ici c'est `pont_pacman`et on met dans le fichier ceci :
auto pont_pacman
iface pont_pacman inet manual
bridge_ports none
up ip link set $IFACE up
down ip link set $IFACE down
Une fois le pont créer, il faut le démarrer :
ifup pont_pacman
Etape 3 : Création des VMs
xen-create-image --hostname=SE4.CachyOS --dhcp --bridge=pont_pacman --dir=/usr/local/xen --size=10G --dist=daedalus --memory=2048M --force
xen-create-image --hostname=SE4.Manjaro --dhcp --bridge=pont_pacman --dir=/usr/local/xen --size=10G --dist=daedalus --memory=2048M --force
xen-create-image --hostname=SE4.LinusTorvalds --dhcp --bridge=pont_pacman --dir=/usr/local/xen --size=10G --dist=daedalus --memory=2048M --force
On adapte les hostnames en fonction des nom de nos machines.
IMPORTANT : Les résultats des commandes sont à noter car ellles contiennent les mots de passe et autres informations importantes.
Nos résultats :
CachyOS :
Installation Summary
---------------------
Hostname : SE4.CachyOS
Distribution : daedalus
MAC Address : 00:16:3E:8B:45:EC
IP Address(es) : dynamic
SSH Fingerprint : SHA256:B0Jej6oBYnqo6BNAkuT73+1FRTAu7w+ynwLcL9MUw84 (DSA)
SSH Fingerprint : SHA256:Ko3kxxNtx498I5wyPFzNF2StKYL4tOvV0vHbRyggX6g (ECDSA)
SSH Fingerprint : SHA256:QPTYZy5CwrYDXRgiQsx/suQfg6af4dqxzA5ySj35/k4 (ED25519)
SSH Fingerprint : SHA256:Z3zPgtowyJ1xXzc4MS2Iugy2rsO/7Gsmwm93OLV3yUE (RSA)
Root Password : FDigbGcTyh86QnvLWyT8wh3
Manjaro :
Installation Summary
---------------------
Hostname : SE4.Manjaro
Distribution : daedalus
MAC Address : 00:16:3E:36:79:D8
IP Address(es) : dynamic
SSH Fingerprint : SHA256:n+ojtWyKBODRtEppjCvAp6nd2cjL/Ily54j0cM03lMc (DSA)
SSH Fingerprint : SHA256:K+Qa9NAU3JIGsMy3LEYCgFbfL3ozuiRKG+U3XsbV5ow (ECDSA)
SSH Fingerprint : SHA256:AJLfxk4Zz8BZflWYOS8mifapH+uAFgGKA3WSj6rN0NA (ED25519)
SSH Fingerprint : SHA256:/6iWOWoii0nJsbScwVYIGQAbuTI1/YIpaRyRdBl8mwE (RSA)
Root Password : PgvMbhYvgtksg8tmiJnVZnQ
LinusTorvalds :
Installation Summary
---------------------
Hostname : SE4.LinusTorvalds
Distribution : daedalus
MAC Address : 00:16:3E:AA:BF:EF
IP Address(es) : dynamic
SSH Fingerprint : SHA256:ouY/2dce0YI/mJD9Qw68oKU0xdw6Cs9ybgJxRm/FKiI (DSA)
SSH Fingerprint : SHA256:p5lZznE0q8j6c68YTF5toYgBugOkc0IopTO+Ce9SiZ8 (ECDSA)
SSH Fingerprint : SHA256:FbqBOG+0bBjuQBOlAytAlbMV/9VoJ8BAlFadG/VaGD4 (ED25519)
SSH Fingerprint : SHA256:FCEtQGUhMhN9DDtTmt5zts/9PeC7ahnmJA7UOhMnGeg (RSA)
Root Password : ekrmCSKb3ZAxXSYvNpjbiSK
Etape 4 :
PHRASE MANQUANTE
xen create /etc/xen/SE4.Manjaro.cfg
xen create /etc/xen/SE4.CachyOS.cfg
xen create /etc/xen/SE4.LinusTorvalds.cfg
On vérifie la liste des machines lancées via :
xen list
Nos résultats :
Name ID Mem VCPUs State Time(s)
SE4.CachyOS 83 2048 1 -b---- 5.6
SE4.Manjaro 85 2048 1 -b---- 5.8
SE4.LinusTorvalds 87 2048 1 -b---- 5.3
Etape 5 : Partition
On partionne avec cette commande :
lvcreate -n SE4.CachyOS.var -L 10G virtual
On éteint notre machine :
xen shutdown SE4.CachyOS
Et on modifie :
vim /etc/xen/SE4.CachyOS.cfg
Et on ajoute ceci :
disk = [
[...],
'phy:/dev/virtual/SE4.CachyOS.home,xvda3,w',
'phy:/dev/virtual/SE4.CachyOS.var,xvdb1,w'
]
Puis on redémarre notre machine :
xen create /etc/xen/SE4.CachyOS.cfg
Ensuite on se connecte à notre VM via :
xen console SE4.CachyOS
Machines de Service - CachyOS & Manjaro
On modifie :
vim /etc/network/interfaces
Et on ajoute ceci :
auto eth0
iface eth0 inet static
address 172.60.0.3/24
gateway 172.60.0.1
- 172.60.0.3 est l'adresse IP de la VM CachyOS
Machine Mandataire - LinusTorvalds
La machine mandataire agit comme passerelle IPv4 pour les machines de services. Voici sa configuration réseau :
auto eth0
iface eth0 inet static
address 172.60.0.1/24
auto eth1
iface eth1 inet static
address 193.48.57.177/24
gateway 193.48.57.161
iface eth1 inet6 auto
Utiles
XEN
Liste des VMs allumées :
xen list
Se connecter à la VM :
xen console <nomMachine>
nomMachine : dans notre cas soit SE4.Manjaro | SE4.CachyOS | SE4.LinusTorvalds
Sortir de la console xen :
Ctrl + Shift + 5
Eteindre une VM :
xen shutdown <nomMachine>
nomMachine : dans notre cas soit SE4.Manjaro | SE4.CachyOS | SE4.LinusTorvalds