5

Year after year, I keep wondering (to put it lightly), who did name the restart function of virsh "destroy", and why.

It seems to me to be a complete -head thing to do; but it must have made sense to somebody, and I would like to understand the rationale.

The VM instance is forcefully shutdown, its memory freed. The VM configuration is not destroyed. The images/virtual disks/filesystems are not destroyed (except for possible corruption, as @DavidPostill pointed out).

So what is destroyed?

The KVM API itself uses restart/*"_RESTART", as one would expect, so the naming is not derived from the next layer.

Any insights to this?

Also, it is kept this way. Is there a conceptual idea behind that, or is this just kept for historical reasons?

foo
  • 198

1 Answers1

1

Who did name the restart function of virsh "destroy", and why?

They didn't. To restart a VM the reboot command is used:

To restart a vm named test, the command used is:

sudo virsh reboot test

So what is destroy used for?

You can do a forceful shutdown of active domain using the command:

$ sudo virsh destroy test

Source: Virsh commands cheatsheet to manage KVM guest virtual machines | ComputingForGeeks

DavidPostill
  • 162,382