-= KVM =-

Tuto inspiré des pages suivantes :
Installer les packets :
- kvm
- VDE2
- bridge-utils
- uml-utilities
- ip_tables


Charger les modules :

#sudo modprobe kvm
#sudo modprobe kvm-amd
ou
#sudo modprobe kvm-intel
#sudo modprobe tun

Créer le fichier image où vous installerez le système :
#qemu-img create emplacement/du/fichier_image.img -f qcow 6G

Lancer l'installation :
#kvm -m 256 -cdrom emplacement/de/l/image/d/intallation.iso -boot d emplacement/du/fichier_image.img

Configurer le réseau de la machine hôte comme ceci :
auto lo eth0 br0

# The loopback network interface

iface lo inet loopback

# The bridge interface

iface br0 inet dhcp
bridge_ports eth0
bridge_maxwait 2
up /sbin/ifconfig eth0 inet 0.0.0.0 promisc


# The primary network interface

iface eth0 inet static
address 192.168.0.129
netmask 255.255.255.0
Ajouter les bon droits pour l'utilisation de tun :
Ajouter dans /etc/udev/rules.d/40-permissions.rules :
KERNEL=="tun", MODE="0666"

Créer un script de lancement du kvm :

#!/usr/bin/env bash
# script to manage tap interface allocation
# for linux kernels >= 2.6.18

# set up a tap interface for qemu
# USERID - uid qemu is being run under.
USERID=`whoami`

# generate a random mac address for the qemu nic
# shell script borrowed from user pheldens @ qemu forum

ranmac=$(echo -n DE:AD:BE:EF ; for i in `seq 1 2` ; \
do echo -n `echo ":$RANDOM$RANDOM" | cut -n -c -3` ;done)

# specify which NIC to use - see qemu.org for others
# model=r8169
iface=`sudo tunctl -b -u $USERID`

# start kvm with our parameters
echo "Bringing up interface $iface with mac address $ranmac"
kvm -no-acpi -m 384 -net nic,vlan=0,macaddr=$ranmac -net tap,vlan=0,ifname=$iface -no-reboot $@ /virtual/kvm/winxp.img

# qemu has stopped - no longer using tap interface
sudo tunctl -d $iface &> /dev/null
Youpi ça marche.
Accueil | changements | pages | tags

pages

Créer une page Lister toutes les pages Dernières modifs

Connexion

Code d'accès ou email :

Mot de passe :

mot de passe oublié se créer un compte

KarmaOS : peace and blog

Tags

Anni CAS GPS Informatique PC Phone Pocket SSO Téléphone cadeau debiajn debian films info linux musique musiques ubuntu
MetaWiki : hébergement de wikis, wiki hosting.
diff. hist. edit. admin