• Bare Metal Server

  1. Help Center
  2. Bare Metal Server
  3. Private Image Creation Guide (BMS)
  4. Stopping the VM and Obtaining the Image

Stopping the VM and Obtaining the Image

Stop the VM

You can run the sudo poweroff command in the OS to stop the VM. If it does not work, on virt-manager, click Virtual Machine Manager, select the running VM shown in the red box in the following figure, right-click it, and click shutdown (if the VM cannot be stopped, you are advised to click Force Off).

Obtain the Image

If you select automatic creation of the image disk, the QCOW2 or IMG image file is in the /var/lib/libvirt/images directory.

Figure 1 Image file (Linux OS)

If you select manual creation of the image disk, obtain the image file from the directory where it was created.

Compress the Image

If the created image file is too large, run the following command to compress it:

qemu-img convert -f raw -O qcow2 SourceFile FinallyFile.qcow2

SourceFile format can be .img or qcow2.