Virtualization

From LinuxizeNet
Revision as of 21:43, 9 August 2026 by Datanasov (talk | contribs) (Convert to card grids, matching Useful howtos)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Running and managing virtual machines from the command line — VMware ESXi via esxcli and vim-cmd, KVM and QEMU via virsh.

VMware and ESXi

List VM processes
Find a VM's process World ID.
esxcli vm process list
Manage VM processes
Kill an unresponsive VM — soft, then hard, then force.
esxcli vm process kill
Power on, off or reboot a VM
Look up the vmid, check power state, then change it.
vim-cmd vmsvc/power.on
Shut down or reboot the host
From the ESX service console, and what each command does to running VMs.
poweroff

KVM and QEMU

Using virsh
Listing, editing, starting, stopping and undefining guests.
virsh list --all
Share folder between guest and host
Pass a host directory into a guest with virtiofs by editing the VM's XML.
virsh edit
Cloned VM gets the same DHCP address
The clone kept its machine-id. Regenerate it.
systemd-machine-id-setup