« Modèle:GenericCmd » et « Modèle:NewVM » : différence entre les pages
(Différence entre les pages)
import>Fleon Aucun résumé des modifications |
import>Fleon Aucun résumé des modifications |
||
Ligne 1 : | Ligne 1 : | ||
<includeonly> | <includeonly> | ||
{{InfoBox stack | |||
|{{InfoBox homepage|{{{vmname}}} @ {{{machine_phys}}} }} | |||
|{{InfoBox line| MEMORY : {{{memory}}} }} | |||
|{{InfoBox line| CPU : {{{cpu}}} }} | |||
|{{InfoBox line| LVM : /dev/vg0/{{{vmname}}}_sys }} | |||
|{{InfoBox line| LVM : /dev/vg0/{{{vmname}}}_swap }} | |||
|{{InfoBox line| MAC : {{{mac}}} }} | |||
|{{InfoBox line| NET : {{{iface}}} }} | |||
|{{InfoBox line| VNC : {{{vnc}}} }} | |||
}} | }} | ||
La machine physique '''{{{machine_phys}}}''' héberge la VM, création du fichier de config : | |||
</includeonly><noinclude> | |||
{{RootCmd | hostname={{{machine_phys}}} | |||
| cd /etc/kvm/machines_virtuelles | |||
| cp template.xml {{{vmname}}}.xml | |||
| nano {{{vmname}}}.xml | |||
}} | |||
Création des volumes LVM : | |||
{{RootCmd | hostname={{{machine_phys}}} | |||
| lvcreate -L {{{sys_size}}} -n {{{vmname}}}_sys vg0 | |||
| lvcreate -L {{{swap_size}}} -n {{{vmname}}}_swap vg0 | |||
}} | |||
Démarrage de la vm : | |||
{{RootCmd | hostname={{{machine_phys}}} | |||
| virsh create {{{vmname}}}.xml | |||
}} | |||
Connexion VNC : | |||
{{RootCmd | hostname=remote | |||
| ssh -p443 user@mx1.infini.fr -L5901:{{{ip_phys}}}:{{{vnc}}} | |||
| vncviewer localhost:1 | |||
}} | |||
On termine en ajoutant la machine au fichier '''/etc/rc.local''' pour garantir qu'elle sera relancée au démarrage de {{{machine_phys}}} : | |||
{{RootCmd | hostname={{{machine_phys}}} | |||
| nano /etc/rc.local | |||
}} | |||
{{FileBox|filename=/etc/rc.local | 1= | |||
sleep 2 | |||
virsh create /etc/kvm/machines_virtuelles/{{{vmname}}}.xml | |||
}} | |||
* {{{install_summary}}} | |||
* {{{signature}}} | |||
</includeonly><noinclude>[[Category:Template]]</noinclude> |