How to Set Up and Manage VMware ESXi on a Debian 12 Bookworm System
Categories:
4 minute read
VMware ESXi is a bare-metal hypervisor used widely in enterprise environments for server virtualization. While ESXi itself is installed directly on hardware, many system administrators and DevOps professionals prefer managing it remotely from their Linux workstations. If you’re using Debian 12 Bookworm, this article will walk you through how to interact with and manage an ESXi host, covering setup, administration tools, remote management, and automation strategies.
Whether you’re a sysadmin or a tech enthusiast exploring virtualization, this guide will help you integrate ESXi management into your Debian 12 workflow.
What is VMware ESXi?
VMware ESXi is a Type 1 hypervisor that runs directly on server hardware without requiring an underlying operating system. It provides a robust, high-performance environment to create and run virtual machines (VMs). With VMware vSphere, you get a full suite of virtualization tools, and ESXi acts as the foundational layer.
Why Manage from Debian?
Debian 12 Bookworm is a modern, stable Linux distribution that makes an excellent management workstation. Though VMware traditionally leans toward Windows-based GUI tools, there’s strong support for Linux through CLI tools, web interfaces, and APIs.
Requirements
Before you begin, ensure you have:
- A Debian 12 system with
sudo
privileges. - A separate server (bare-metal machine) for installing VMware ESXi 7.x or 8.x.
- Network connectivity between your Debian machine and the ESXi host.
- Optional: VMware credentials for downloading tools (free registration required).
Installing VMware ESXi
Though ESXi runs on dedicated hardware, setting it up is part of the management lifecycle.
1. Download the ESXi ISO
Go to the VMware website and download the free ESXi installer ISO after creating an account.
2. Create a Bootable USB
Use dd
or balenaEtcher
on your Debian system:
sudo dd if=VMware-ESXi-8.0.iso of=/dev/sdX bs=4M status=progress && sync
Replace
/dev/sdX
with your actual USB device. Be careful—it will erase the target device.
3. Install ESXi on the Server
- Plug in the USB to your server and boot from it.
- Follow the installation steps.
- Set up root password, networking, and management IP address.
Once installed, you can access ESXi via the Web UI using its IP address.
Accessing the ESXi Web Interface from Debian 12
- Open your browser.
- Visit
https://<ESXi-IP>/ui
- Accept the certificate warning and log in with the
root
credentials.
This Web UI lets you:
- Create and manage VMs
- Monitor resource usage
- Configure storage and networking
- Apply updates and restart services
For most users, this is sufficient for day-to-day tasks. But command-line tools offer automation and scripting capabilities.
Installing VMware Command-Line Tools on Debian
VMware offers CLI tools such as vSphere CLI (vCLI)
, PowerCLI
, and govc
.
Option 1: VMware vSphere CLI
Though VMware’s vCLI package was traditionally available for Linux, VMware now recommends using vSphere SDKs or govc for modern CLI management. However, you can still run vCLI in a Docker container.
Option 2: Install govc
on Debian
govc
is a CLI built with Go that interacts with vSphere APIs and works smoothly on Linux.
1. Install Go
sudo apt update
sudo apt install golang -y
2. Download and install govc
curl -L https://github.com/vmware/govmomi/releases/latest/download/govc_Linux_x86_64.tar.gz -o govc.tar.gz
tar -xzf govc.tar.gz
sudo install govc /usr/local/bin/
3. Set up environment variables
Create a file ~/.bash_profile
or append to .bashrc
:
export GOVC_URL='https://<ESXi-IP>'
export GOVC_USERNAME='root'
export GOVC_PASSWORD='yourpassword'
export GOVC_INSECURE=true
Source the file:
source ~/.bashrc
Now you can use govc
to manage ESXi.
Using govc
– Go-based vSphere CLI
With govc
, you can do almost everything via command line.
Check host info
govc host.info
List virtual machines
govc ls /ha-datacenter/vm
Power on a VM
govc vm.power -on=true my-vm-name
Create a new VM (simplified)
govc vm.create -m=2048 -c=2 -g=debian10_64Guest -disk=10G -net='VM Network' new-vm
Upload an ISO
govc datastore.upload debian-12.iso iso/debian-12.iso
Attach ISO to VM
govc device.cdrom.insert -vm my-vm iso/debian-12.iso
VM Management Tasks from Debian
With tools like govc
, curl, and SSH, you can:
- Create, power on/off, and delete VMs
- Upload ISO files
- Monitor host health and performance
- Take snapshots
- Configure virtual hardware
Example: Creating a snapshot:
govc snapshot.create -vm my-vm snap1
Revert to snapshot:
govc snapshot.revert -vm my-vm -name snap1
Automating ESXi Tasks with Scripts
You can wrap govc
commands into shell scripts for common tasks.
Example: create_vm.sh
#!/bin/bash
VM_NAME=$1
govc vm.create -m=2048 -c=2 -g=debian10_64Guest -disk=10G -net='VM Network' "$VM_NAME"
govc vm.power -on=true "$VM_NAME"
Make it executable:
chmod +x create_vm.sh
./create_vm.sh test-vm
For more advanced automation, consider integrating with Ansible using the community.vmware collection.
Security Considerations
- Avoid storing plain-text passwords. Use secrets management tools like
pass
orgopass
. - Secure your ESXi host with firewall rules and updated firmware.
- Keep Debian and all CLI tools up to date.
- Monitor for unauthorized access using logs and
govc event.ls
.
Conclusion
VMware ESXi is a powerful virtualization platform, and with Debian 12 Bookworm, you can manage your hypervisor effectively using modern CLI tools and web interfaces. While the GUI is great for one-off configurations, the true power lies in automating tasks via govc
and scripts. This approach enables you to manage virtual infrastructure at scale, improve reproducibility, and integrate into DevOps pipelines.
Whether you’re running a homelab or managing enterprise-grade virtualization, leveraging Debian 12 as your control plane provides speed, flexibility, and control—making it a smart combination for any sysadmin.
Feedback
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.