LIBVIRT: How to start, shutdown and reboot libvirt Guest machine from Host machine through Linux terminal
Some time we need to start our libvirt virtualized Guest machines through Linux terminal. For this we can use libvirt tools. Let’s see example for same.
We have Linux Guest machine named Guest_image_1 on host machine srv3, which is shutdown right now, we want to start this machine. Here we can use virsh command with its different options. We can do same through graphical as well, but sometime we don’t have any Linux graphical environment. So we should complete terminal options as well for this activity.
We can see in this screen that with virsh list –all, all Guest machines will get display and in case we want to start any Guest machine. We can use virsh start <Guest-machine-name>. same command can used for shutdown and reboot as well.like virsh shutdown <Guest-machine-name> and virsh reboot <Guest-machine-name>. we can also connect this Guest machines through same command with different switch option virsh console <Guest-machine-name>. Here we also need to disconnect that Guest machine, for this we can use ctl+].