# VMware ESXi Update

Connectez-vous sur l’ESXi Host Client avec un user "root"

[![image.png](https://know.app.slaunay.com/uploads/images/gallery/2023-11/scaled-1680-/gWwvb50hAcEC32fS-image.png)](https://know.app.slaunay.com/uploads/images/gallery/2023-11/gWwvb50hAcEC32fS-image.png)

Allez dans le menu "Actions" &gt; "Services et activer le "SSH" et la "Console"

[![image.png](https://know.app.slaunay.com/uploads/images/gallery/2023-11/scaled-1680-/NQae9Rpfo4tXl1UG-image.png)](https://know.app.slaunay.com/uploads/images/gallery/2023-11/NQae9Rpfo4tXl1UG-image.png)

Une fois activé ça donne ceci:

[![image.png](https://know.app.slaunay.com/uploads/images/gallery/2023-11/scaled-1680-/2jSiaqZnlecTm6cw-image.png)](https://know.app.slaunay.com/uploads/images/gallery/2023-11/2jSiaqZnlecTm6cw-image.png)

Connectez-vous en SSH sur l’ESXi (avec l'utilisateur "root")

[![image.png](https://know.app.slaunay.com/uploads/images/gallery/2023-11/scaled-1680-/NLuPFVzf8SkULEjq-image.png)](https://know.app.slaunay.com/uploads/images/gallery/2023-11/NLuPFVzf8SkULEjq-image.png)

Contrôlez la version de l'ESXi actuel

```bash
esxcli software profile get
```

[![image.png](https://know.app.slaunay.com/uploads/images/gallery/2023-11/scaled-1680-/Moyknab0Q2Go8HLf-image.png)](https://know.app.slaunay.com/uploads/images/gallery/2023-11/Moyknab0Q2Go8HLf-image.png)

Lancer le mode maintenance

```bash
esxcli system maintenanceMode set --enable true
```

[![image.png](https://know.app.slaunay.com/uploads/images/gallery/2023-11/scaled-1680-/I6tgJbX4Nd2HBwrP-image.png)](https://know.app.slaunay.com/uploads/images/gallery/2023-11/I6tgJbX4Nd2HBwrP-image.png)

Pour contrôler que le mode maintenance est bien activé allez sur l’ESXi Host Client et le logo du serveur devrait s'afficher comme ceci:

[![image.png](https://know.app.slaunay.com/uploads/images/gallery/2023-11/scaled-1680-/QMkIuRKtdZbSrGOA-image.png)](https://know.app.slaunay.com/uploads/images/gallery/2023-11/QMkIuRKtdZbSrGOA-image.png)

Autorisez le trafic http en modifiant les paramètres du pare-feu intégré de l'hôte ESXi

```bash
esxcli network firewall ruleset set -e true -r httpClient
```

[![image.png](https://know.app.slaunay.com/uploads/images/gallery/2023-11/scaled-1680-/L432ShG8VJYAgxgq-image.png)](https://know.app.slaunay.com/uploads/images/gallery/2023-11/L432ShG8VJYAgxgq-image.png)

Répertorier les profils fournis par VMware pour ESXi dans les référentiels VMware

```bash
esxcli software sources profile list -d https://hostupdate.vmware.com/software/VUM/PRODUCTION/main/vmw-depot-index.xml
```

Filtrez avec la commande "grep"

```bash
esxcli software sources profile list -d https://hostupdate.vmware.com/software/VUM/PRODUCTION/main/vmw-depot-index.xml | grep ESXi-X.Y.Z
```

Ceux qui nous donnent ceci:

[![image.png](https://know.app.slaunay.com/uploads/images/gallery/2023-11/scaled-1680-/aHeyzSCA3siI1RRd-image.png)](https://know.app.slaunay.com/uploads/images/gallery/2023-11/aHeyzSCA3siI1RRd-image.png)

Vérifiez les paquets qui seront installés avant d'exécuter la mise à jour

```bash
esxcli software profile update -d https://hostupdate.vmware.com/software/VUM/PRODUCTION/main/vmw-depot-index.xml -p [PROFILE] --dry-run
```

[![image.png](https://know.app.slaunay.com/uploads/images/gallery/2023-11/scaled-1680-/1e2uOFG63ltFDExa-image.png)](https://know.app.slaunay.com/uploads/images/gallery/2023-11/1e2uOFG63ltFDExa-image.png)

Exécutez l'installation de la mise à jour

```bash
esxcli software profile update -d https://hostupdate.vmware.com/software/VUM/PRODUCTION/main/vmw-depot-index.xml -p [PROFILE]
```

En cas d'avertissement de hardware bientôt plus supporté ajouter "--no-hardware-warning"

```bash
esxcli software profile update -d https://hostupdate.vmware.com/software/VUM/PRODUCTION/main/vmw-depot-index.xml -p [PROFILE] --no-hardware-warning
```

Si tout est correct redémarrez l’ESXi pour que les modifications soient prises en compte

```bash
reboot
```

Une fois redémarré connectez-vous sur l’ESXi Host Client avec un user "root" et-vous constaterez la nouvelle mise à jour installée

[![image.png](https://know.app.slaunay.com/uploads/images/gallery/2023-11/scaled-1680-/U08e71Qux73laSA6-image.png)](https://know.app.slaunay.com/uploads/images/gallery/2023-11/U08e71Qux73laSA6-image.png)

Quitter le mode maintenance

```bash
esxcli system maintenanceMode set --enable false
```