How To Mount VM Images with Guestmount? – POFTUT

How To Mount VM Images with Guestmount?

guestmount is a tool used to mount VM images. This VM images can be different formats like qcow, vmdk, vdi, etc. In this tutorial, we will examine different use cases about guestmount.

Mount Disk Image

We will start by mounting given image partition to the specified directory. We will provide the image with the -a option. -m option will be used to point the partition we want to mount which resides in the image. The last parameter to the guestmount is the local directory we want to mount. In this example we will mount image cirros.. partition sda1 into the local directory test2

Mount Readonly

Normally guestmount mounts the disk or partition with read-write options if you want to mount read-only use -r option. We can not write anything to this image which will make safe for modifications.

Automatically Mount

Specifying partition is not a must. We can use -i option to automatically look for partition with guestmount.

Enable SELinux

Normally SELinux will not be enabled while using guestmount. We can enable SELinux support on-disk image with --selinux option.

LEARN MORE  What Is a Web Browser?

Provide Mount Options

We can specify mount options about image partitions with the -o option. In this example, we will enable to read this partition directory by other users with allow_user

echo '

1 Response

  1. Matthew Herzog says:

    Thanks for this. I’m adding this syntax to my notes.

Leave a Reply

Your email address will not be published. Required fields are marked *