Cahier 2016 groupe n°1

De Wiki de Projets IMA
Révision datée du 7 novembre 2016 à 10:58 par Cduval (discussion | contributions) (Séance5)

Séance 1

Pour la première séance nous avons installé ifenslave 2.6 sur le serveur et ajout d'un alias pour que le module bond soit activé avec les bonnes options :

alias bond0 bonding
options bonding mode=1 miimon=100 downdelay=200 updelay=200

Nous avons aussi configuré le fichier /etc/network/interfaces en y incluant la configuration des différentes interfaces : eth100, eth101 ainsi que la configuration du bridge: br0 et du bonding: bond0.

#Bonding IMA5sc
#auto eth100
#iface eth0 inet manual
#	bond-master bond0
#	bond-primary eth100 eth101
#	bond-mode 5

#auto eth101
#iface eth1 inet manual	
#	bond-master bond0
#	bond-primary eth100 eth101
#	bond-mode 5

#auto bond0
#iface bond0 inet dhcp
#	pre-up modprobe bonding
#	pre-up ifconfig bond0 up
#	pre-up /sbin/ifenslave  bond0 eth100 eth101
#	down sbin/ifenslave -d bond0 eth100 eth101
#	bonds-slaves none
#
#auto br0
#iface br0 inet dhcp
#	bridge-ports bond0

Séance 2

Installation de la machine virtuelle sur le serveur cordouan:

root@cordouan:/usr/local/xen/domains# xen-create-image --hostname=Frotteman --ip=193.48.57.161 --netmask=255.255.255.240 --gateway=193.48.57.171  --dir=/usr/local/xen --mirror=http://debian.polytech-lille.fr/debian/ --dist=jessie --password=glopglop
WARNING
-------

 You appear to have a missing vif-script, or network-script, in the
 Xen configuration file /etc/xen/xend-config.sxp.

 Please fix this and restart Xend, or your guests will not be able
to use any networking!


General Information
--------------------
Hostname       :  Frotteman
Distribution   :  jessie
Mirror         :  http://debian.polytech-lille.fr/debian/
Partitions     :  swap            128M  (swap)
                  /               4G    (ext3)
Image type     :  sparse
Memory size    :  128M
Kernel path    :  /boot/vmlinuz-3.14-2-amd64
Initrd path    :  /boot/initrd.img-3.14-2-amd64

Networking Information
----------------------
IP Address 1   : 193.48.57.161 [MAC: 00:16:3E:F4:F8:CE]
Netmask        : 255.255.255.240
Gateway        : 193.48.57.171


Creating partition image: /usr/local/xen/domains/Frotteman/swap.img
Done

Creating swap on /usr/local/xen/domains/Frotteman/swap.img
Done

Creating partition image: /usr/local/xen/domains/Frotteman/disk.img
Done

Creating ext3 filesystem on /usr/local/xen/domains/Frotteman/disk.img
Done
Installation method: debootstrap
Done

Running hooks
Done

No role scripts were specified.  Skipping 

Creating Xen configuration file
Done 

No role scripts were specified.  Skipping
Setting up root password
Generating a password for the new guest.
All done


Logfile produced at:
	 /var/log/xen-tools/Frotteman.log

Installation Summary
---------------------
Hostname        :  Frotteman
Distribution    :  jessie
MAC Address     :  00:16:3E:F4:F8:CE
IP Address(es)  :  193.48.57.161 
RSA Fingerprint :  37:3f:a5:4a:6d:05:15:3d:55:44:e3:0b:7f:81:91:a2
Root Password   :  fsBsiSE4


Séance3

Création des partitions logiques pour la machine virtuelle.

lvcreate -L 10G -n /dev/virtual/ima5-Frotteman-home -v
lvcreate -L 10G -n /dev/virtual/ima5-Frotteman-var -v

Ajouts des partitions à la configuration de la machine virtuelle.

'phy:/dev/virtual/ima5-Frotteman-home,xvdb,w',
'phy:/dev/virtual/ima5-Frotteman-var,xvdc, w',

Séance4

Commande pour démarrer la VM lorsqu'elle est totalement éteinte :

xl create -c /etc/xen/Frotteman.cfg

Nom de domaine réservé sur gandi.net

faispastomberlasavo.net

Séance5

Installation de bind9 sur la VM xen.

Modification du fichier /etc/bind/named.conf.local

zone "faispastomberlasavo.net" {
          type master;
          file "/etc/bind/db.faispastomberlasavo.net";
          allow-transfer { 217.70.177.40; };
     };

zone "57.48.193.in-addr.arpa" {
       type master;
       notify no;
       file "/etc/bind/db.193";
};

Créez le fichier de zone /etc/bind/db.faispastomberlasavo.net

$TTL    10800
@       IN      SOA     ns1.faispastomberlasavo.net. root.faispastomberlasavo.net. (
                             1         ; Serial
                         10800         ; Refresh
                         86400         ; Retry
                       2419200         ; Expire
                        604800 )       ; Negative Cache TTL
;
@       IN      NS      ns1.faispastomberlasavo.net.
ns1     IN      A       193.48.57.161

Créez le fichier de zone /etc/bind/db.193

;
; BIND reverse data file for local loopback interface
;
$TTL    604800
@       IN      SOA     ns1.faispastomberlasavo.net root.faispastomberlasavo.net (
                             2         ; Serial
                        604800         ; Refresh
                         86400         ; Retry
                       2419200         ; Expire
                        604800 )       ; Negative Cache TTL
;
@       IN      NS      ns1.faispastomberlasavo.net.
10      IN      PTR     ns1.faispastomberlasavo.net.

Redémarrer bind

/etc/init.d/bind9 restart

Changez la configuration des serveurs du domaine Gandi

DNS1: ns1.faispastomberlasavo.net
DNS2: ns6.gandi.net

Commande:

nslookup faispastomberlasavo.net

Résultat:

Server:		193.48.57.48
Address:	193.48.57.48#53
Non-authoritative answer:
Name:	faispastomberlasavo.net
Address: 217.70.184.38

(ne marche plus ???)