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).


L'icône rouge permet de télécharger chaque page du wiki visitée au format PDF et la grise au format ODT → ODT PDF Export

Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

Les deux révisions précédentes Révision précédente
Prochaine révision
Révision précédente
Prochaine révision Les deux révisions suivantes
utilisateurs:lagrenouille:tutos:vm [27/02/2024 09:51]
lagrenouille [Virtualisation avec virt-manager]
utilisateurs:lagrenouille:tutos:vm [27/02/2024 10:14]
lagrenouille [Installation]
Ligne 10: Ligne 10:
   * [https://​debian-facile.org/​utilisateurs:​captnfab:​tutos:​libvirt-grenouille]   * [https://​debian-facile.org/​utilisateurs:​captnfab:​tutos:​libvirt-grenouille]
 ===== Installation ===== ===== Installation =====
 +
 +* le client mon ordinateur de bureau
 +
 +* Le Serveur c’est là que l’on installe la VM
 +
 +* Sur le client on installe :
 +<code root>apt install virt-manager ssh-askpas</​code>​
 +
 +* installation en root sur le serveur
 +<code root>apt install libvirt qemu-kvm libvirt-daemon-system
 +adduser user libvirt ​
 +adduser libvirt-qemu</​code>​
 +
 +<code root>​mkdir /​home/​malignum/​libvirt-pool
 +chmod 755 /​home/​malignum/​libvirt-pool
 +chown root:​libvirt /​home/​malignum/​libvirt
 +chmod 770 /​home/​malignum/​libvirt-pool
 +cd /​home/​malignum/​libvirt-pool
 +qemu-img create -f qcow2 image.qcow2 20G
 +wget https://​cdimage.debian.org/​debian-cd/​current/​amd64/​iso-cd/​debian-10.7.0-amd64-netinst.iso
 +puis
 +
 +$  ls -lha /​home/​malignum/​libvirt-pool/​
 +total 2,6G
 +drwxr-xr-x ​ 2 root         ​libvirt ​     4,0K janv. 22 16:26 .
 +drwxr-xr-x 17 lagrenouille lagrenouille 4,0K janv. 25 18:25 ..
 +-rw-rw---- ​ 1 libvirt-qemu libvirt-qemu ​ 21G févr. ​ 2 19:47 blz.qcow2
 +-rw-r--r-- ​ 1 root         ​root ​        336M déc.   5 13:47 debian-10.7.0-amd64-netinst.iso
 +</​code>​
 +
 +* installation toujours sur le serveur
 +
 +<code user>​sudo systemctl status libvirtd.service
 +[sudo] Mot de passe de lagrenouille :​ 
 +● libvirtd.service - Virtualization daemon
 +   ​Loaded:​ loaded (/​lib/​systemd/​system/​libvirtd.service;​ enabled; vendor preset: enabled)
 +   ​Active:​ active (running) since Tue 2021-01-05 09:22:34 CET; 2 weeks 3 days ago
 +     Docs: man:​libvirtd(8)
 +           ​https://​libvirt.org
 + Main PID: 914 (libvirtd)
 +    Tasks: 37 (limit: 32768)
 +   ​Memory:​ 70.6M
 +   ​CGroup:​ /​system.slice/​libvirtd.service
 +           ​├─ ​ 914 /​usr/​sbin/​libvirtd
 +           ​├─ 1647 /​usr/​sbin/​dnsmasq --conf-file=/​var/​lib/​libvirt/​dnsmasq/​default.conf --leas
 +           ​├─ 1648 /​usr/​sbin/​dnsmasq --conf-file=/​var/​lib/​libvirt/​dnsmasq/​default.conf --leas
 +           ​├─ 1773 /​usr/​bin/​qemu-system-x86_64 -name guest=openbsd,​debug-threads=on -S -objec
 +           ​└─23246 /​usr/​bin/​qemu-system-x86_64 -name guest=blz-debian10,​debug-threads=on -S -
 +
 +janv. 22 22:31:29 lebug dnsmasq-dhcp[1647]:​ DHCPREQUEST(virbr0) 192.168.122.183 52:​54:​00:​7e:​f
 +janv. 22 22:31:29 lebug dnsmasq-dhcp[1647]:​ DHCPACK(virbr0) 192.168.122.183 52:​54:​00:​7e:​fa:​0f
 +janv. 22 22:54:54 lebug dnsmasq-dhcp[1647]:​ DHCPREQUEST(virbr0) 192.168.122.121 52:​54:​00:​5f:​9
 +janv. 22 22:54:54 lebug dnsmasq-dhcp[1647]:​ DHCPACK(virbr0) 192.168.122.121 52:​54:​00:​5f:​95:​d0
 +janv. 22 22:58:32 lebug dnsmasq-dhcp[1647]:​ DHCPREQUEST(virbr0) 192.168.122.183 52:​54:​00:​7e:​f
 +janv. 22 22:58:32 lebug dnsmasq-dhcp[1647]:​ DHCPACK(virbr0) 192.168.122.183 52:​54:​00:​7e:​fa:​0f
 +janv. 22 23:17:19 lebug dnsmasq-dhcp[1647]:​ DHCPREQUEST(virbr0) 192.168.122.121 52:​54:​00:​5f:​9
 +janv. 22 23:17:19 lebug dnsmasq-dhcp[1647]:​ DHCPACK(virbr0) 192.168.122.121 52:​54:​00:​5f:​95:​d0
 +janv. 22 23:25:07 lebug dnsmasq-dhcp[1647]:​ DHCPREQUEST(virbr0) 192.168.122.183 52:​54:​00:​7e:​f
 +janv. 22 23:25:07 lebug dnsmasq-dhcp[1647]:​ DHCPACK(virbr0) 192.168.122.183 52:​54:​00:​7e:​fa:​0f
 +lines 1-25/25 (END)
 +</​code>​
 +
 +* Pour améliorer l’accès à la VM sans taper le password à chaque connexion ssh :
 +
 +* Sur le client donc
 +
 +* installation sur le client
 +
 +<code user>
 +~$ ssh-keygen -f ~/​.ssh/​labiscouille
 +Generating public/​private rsa key pair.
 +Enter passphrase (empty for no passphrase):​ xxxxxxxxx
 +Enter same passphrase again: xxxxxxxxx
 +Your identification has been saved in /​home/​momo/​.ssh/​labiscouille.
 +Your public key has been saved in /​home/​momo/​.ssh/​labiscouille.pub.
 +The key fingerprint is:
 +SHA256:​4mAyYO89jsCPUFKKOzYtL4Bdili+-/​g/​GSTDhfg59987OE momo@harthuro
 +The key's randomart image is:
 ++---[RSA 2048]----+
 +|       oo ..oo   |
 +|      .  . .o .  |
 +|...    .   ​. ​  . |
 +|++.   ​. ​        E|
 +|*.*.o.. S        |
 +|*Oo+oo .         |
 +|XB.o +.          |
 +|=*B.= .          |
 +|o+++o= ​          |
 ++----[SHA256]-----+
 +$ ssh-keygen -f ~/​.ssh/​labiscouille
 +Generating public/​private rsa key pair.
 +Enter passphrase (empty for no passphrase):​ xxxxxxxxx
 +Enter same passphrase again: xxxxxxxxx
 +Your identification has been saved in /​home/​momo/​.ssh/​labiscouille.
 +Your public key has been saved in /​home/​momo/​.ssh/​labiscouille.pub.
 +The key fingerprint is:
 +SHA256:​4mAyYO89jsCPUFKKOzYtL4Bdili+-/​g/​GSTDhfg59987OE momo@harthuro
 +The key's randomart image is:
 ++---[RSA 2048]----+
 +|       oo ..oo   |
 +|      .  . .o .  |
 +|...    .   ​. ​  . |
 +|++.   ​. ​        E|
 +|*.*.o.. S        |
 +|*Oo+oo .         |
 +|XB.o +.          |
 +|=*B.= .          |
 +|o+++o= ​          |
 ++----[SHA256]-----+
 +</​code>​
 +
 +
 +
 +
 +
  
 ===== Utilisation ===== ===== Utilisation =====
  
  
utilisateurs/lagrenouille/tutos/vm.txt · Dernière modification: 27/02/2024 10:38 par lagrenouille

Pied de page des forums

Propulsé par FluxBB