Virtualization: Difference between revisions

From LinuxizeNet
No edit summary
(Convert to card grids, matching Useful howtos)
 
(8 intermediate revisions by the same user not shown)
Line 1: Line 1:
== VMWare and ESXi ==
__NOTOC__
Useful commands and howtos
Running and managing virtual machines from the command line — VMware ESXi via
===CLI commands===
<code>esxcli</code> and <code>vim-cmd</code>, KVM and QEMU via <code>virsh</code>.
[[Esxcli vm process list]]
 
[[Manage ESXi VM Processes with CLI]]
== VMware and ESXi ==
[[Power on a virtual machine from ESXi cli]]
<div class="lz-cardgrid">
[[Shutdown ESXi cli]]
{{Card|page=Esxcli vm process list|title=List VM processes|desc=Find a VM's process World ID.|cmd=esxcli vm process list}}
{{Card|page=Manage ESXi VM Processes with CLI|title=Manage VM processes|desc=Kill an unresponsive VM — soft, then hard, then force.|cmd=esxcli vm process kill}}
{{Card|page=Power on a virtual machine from ESXi cli|title=Power on, off or reboot a VM|desc=Look up the vmid, check power state, then change it.|cmd=vim-cmd vmsvc/power.on}}
{{Card|page=Shutdown ESXi cli|title=Shut down or reboot the host|desc=From the ESX service console, and what each command does to running VMs.|cmd=poweroff}}
</div>
 
== KVM and QEMU ==
== KVM and QEMU ==
Useful commands and howtos
<div class="lz-cardgrid">
===CLI commands===
{{Card|page=Virsh|title=Using virsh|desc=Listing, editing, starting, stopping and undefining guests.|cmd=virsh list --all}}
{{Card|page=Share folder between guest and host|desc=Pass a host directory into a guest with virtiofs by editing the VM's XML.|cmd=virsh edit}}
{{Card|page=Cloned VM has the same dhcp ip address|title=Cloned VM gets the same DHCP address|desc=The clone kept its machine-id. Regenerate it.|cmd=systemd-machine-id-setup}}
</div>
 
[[Category:ESXi]]
[[Category:ESXi]]
[[Category:Virtualization]]
[[Category:QEMU]]
[[Category:Libvirt]]

Latest revision as of 21:43, 9 August 2026

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

VMware and ESXi[edit]

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[edit]

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