VMware ESXi

From Dave-Wiki
Revision as of 19:54, 21 January 2025 by Dave (talk | contribs)

Summary

ESXi (Elastic Sky X Integrated) is a hypervisor developed by VMware that is used to create and manage virtual machines (VMs) in a virtualized environment. It is part of VMware's vSphere suite of products and is a foundational component for running virtualized workloads in both small and large-scale enterprise data centers.

General

VMDK Commands

Shrink a Thin VMDK

ls –lh *.vmdk
du -h *.vmdk
vmkfstools --punchzero vm.vmdk
du -h *.vmdk

ovftool

You can install this tool on your local machine (e.g., Windows) and use it to remotely move powered-down VMs from one ESXi to another or to your local machine as an .ovf file, etc.

Get Info About A VM

.\ovftool vi://10.144.30.134/plex

Export VM from ESXi to a Local Windows PC

.\ovftool.exe vi://<src-esxi-ip>/<src-vm-name> "C:\Downloads\<ovffile>.ovf"

Import VM from a Local Windows PC to ESXi

.\ovftool.exe -ds=<dest-datastore> -dm=thin -n=<dest-vm-name> --net:"<src-network1>"="<dest-network1>" --net:"<src-network2>"="<dest-network2>" "C:\Downloads\<ovffile>.ovf" vi://<dest-esxi-ip>

Export Directly From ESXi to ESXi

ovftool -ds=<dest-datastore> -dm=thin -n=<dest-vm-name> --net:"<src-network>"="<dest-network>" vi://<src-esxi-ip>/<src-vm-name> vi://<dest-esxi-ip>