[1] Start Virtual Machine.
# Start Virtual Machine [future-1-x64]
[root@localhost ~]# virsh --connect qemu:///system start future-1-x64
Domain future-1-x64 started
# start and connect to console of [future-1-x64]
[root@localhost ~]# virsh --connect qemu:///system start future-1-x64 --console
Domain future-1-x64 started
Connected to domain future-1-x64
Escape character is ^]
Future OS 1 (Tesla)
Kernel 5.10.39-300.fx1.x86_64 on an x86_64 (hvc0)
futurelinux login:
[2] Stop Virtual Machine.
# Stop Virtual Machine [future-1-x64]
[root@localhost ~]# virsh --connect qemu:///system shutdown future-1-x64
Domain future-1-x64 is being shutdown
# Stop Virtual Machine [future-1-x64] forcely
[root@localhost ~]# virsh --connect qemu:///system destroy future-1-x64
Domain future-1-x64 destroyed
[3] Set auto-start for Virtual Machines.
# Enable auto-start for [future-1-x64]
[root@localhost ~]# virsh autostart future-1-x64
Domain future-1-x64 marked as autostarted
# Disable auto-start for [future-1-x64]
[root@localhost ~]# virsh autostart --disable future-1-x64
Domain future-1-x64 unmarked as autostarted
[4] List all Virtual Machines.
# List all active Virtual Machines
[root@localhost ~]# virsh --connect qemu:///system list
Id Name State
------------------------------
5 future-1-x64 running
# List all Virtual Machines included inactives
[root@localhost ~]# virsh --connect qemu:///system list --all
Id Name State
---------------------------------------
5 future-1-x64 running
- template shut off
[5] Try the help parameter for other options.
[root@localhost ~]# virsh --help