Esxi
De BlaxWiki
Révision datée du 29 août 2012 à 15:45 par 217.174.199.129 (discussion)
Doc de configuration Esxi 4.1 / Doc officielle
Il faut que l'option VT (Intel Virtualization Tech) soit mise en enable dans le bios. Il faut éteindre & rallumer electriquement le serveur pour que cette option soit prise en compte. Si cette option n'est pas activée, il ne sera pas possible de créer des VM.
Activer snmp & ssh
vi /etc/vmware/snmp.xml modifier : <enabled>false</enabled> en : <enabled>true</enabled> Puis modifier : <communities></communities> en : <communities>public</communities> Il ne reste plus qu'à relancer le service : /sbin/services.sh restart Pour ssh : vi /etc/inetd.conf & décommentez la ligne qui commence par #ssh (puis relancer inetd)
Backup de la configuration
http://slymsoft.com/esxi-conf-backup/
Perte d'un datastore
Il peut arrive après un reboot que l'on ait "perdu" un datastore car ce dernier n'a pas été créé de facon permanente, ou aussi lorsque l'on change de carte raid. Pour le remonter de facon permanente, il faut alors récuperer l'uid du vmfs en question.
On peut procéder de plusieurs facon pour récuperer l'uid : - esxcfg-volume -l : parfois ne remonte rien bizarement - esxcfg-scsidevs -m naa.600605b000a41a10ff000037038357e3:3 /vmfs/devices/disks/naa.600605b000a41a10ff000037038357e3:3 4f3a6e5e-138f8954-8a9c-001d926dd313 0 datastore1 L'uid est ici 4f3a6e5e-138f8954-8a9c-001d926dd313 On peut alors faire : esxcfg-volume -M 4f3a6e5e-138f8954-8a9c-001d926dd313 Le datastore sera à nouveau visible dans la console vsphere et les vm accessibles. Autre exemple : ~ # esxcfg-volume -l VMFS UUID/label: 4fc8ce84-60b3a6ec-319f-00242102a853/datastore1 Can mount: Yes Can resignature: Yes Extent name: naa.600605b000e6ffe0ff0000360378a60b:3 range: 0 - 566015 (MB) ~ # esxcfg-volume -M 4fc8ce84-60b3a6ec-319f-00242102a853 Persistently mounting volume 4fc8ce84-60b3a6ec-319f-00242102a853
Rentrer en mode console
- At the console of the ESXi host, press ALT-F1 to access the console window. - Enter unsupported in the console and then press Enter. You will not see the text you type in. - If you typed in unsupported correctly, you will see the Tech Support Mode warning and a password prompt. Enter the password for the root login. - Nous pouvons maintenant taper des commandes en ligne.
Vmkernel & Vswitch
Normalement lorsque l'on créé un vmkernel c'est juste pour administrer l'esxi. Il se peut parfois qu'une des vm hébergées soit sur le même subnet que l'esxi, et donc sur le même vlan. On ne peut pas ajouter une vm dans le switch du vmkernel, car celui-ci n'est pas reconnu comme un vswitch. Il faut juste alors créér un nouveau networking en "virtual machine" que l'on tagguera avec le même vlan que celui du vmkernel, cela ne pose pas de problème.
Upgrade
Pris sur le site
01: Make sure you have the vMA 5.0 or the vCLI installed and configured or that you have ESXi Shell access on the ESXi 5 host. 02: Download the patch bundle directly from VMware Support. This download will be .zip file. Do not extract it. 03: Upload the .zip file to a datastore that is accessible on the ESXi host you wish to update. The syntax below will use /vmfs/volumes/datastore1, and you may need to adjust as necessary. Note that the .zip file is uploaded to the ESXi host. Note: In the examples below, the syntax is specific for the vMA. Adjust accordingly, if you are using another approach. 04: Obtain local console access to the vMA and login with the vi-admin account. 05. To determine if the host needs to be placed in maintenance mode, issue the following command: esxcli --server=10.10.10.10 --username=root software sources vib get -d /vmfs/volumes/datastore1/ESXi500-201109001.zip | grep "Maintenance Mode Required: True" 06. If grep returns "Maintenance Mode Required: True" results, then issue the following command to place the host in maintenance mode: vicfg-hostops --server 10.10.10.10 --operation enter 07. Verify that the host is in maintenance mode, by issuing the following command: vicfg-hostops --server=10.10.10.10 --operation info Note: You could also use the vSphere Client to put the ESXi 5 host in maintenance mode. 08. To verify which VIBs are already installed on the ESXi 5 host, issue the following command: esxcli --server=10.10.10.10 --username=root software vib list | more 09. To find out which VIBs are available in the depot (the downloaded .zip file), issue the following command: esxcli --server=10.10.10.10 --username=root software sources vib list --depot=/vmfs/volumes/datastore1/ESXi500-201109001.zip | more 10. To update the ESXi 5 host with the VIBs included in the depot, issue the following command: esxcli --server=10.10.10.10 --username=root software vib update --depot=/vmfs/volumes/datastore1/ESXi500-201109001.zip 11. When the update is complete, verify the information presented. If prompted, reboot the ESXi 5 host by issuing the following command: vicfg-hostops --server 10.10.10.10 --operation reboot 12. Verify the patch bundle was installed, by issuing the following command: esxcli --server=10.10.10.10 --username=root software vib list | more 13. If applicable, take the ESXi 5 host out of maintenance mode using the vSphere Client or with the following command: vicfg-hostops --server 10.10.10.10 --operation exit