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 used to point the partition we want to mount which resides in 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 local directory test2

Mount Readonly

Normally guestmount mounts the disk or partition with read-write options if you want to mount readonly use -r option. We can not write anything to this image which will made 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

We can enable SELinux support on disk image with –selinux option.

LEARN MORE  How To Get Centos, Fedora, Red Hat Release Version?

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

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 *

Enjoy this blog? Please spread the word :)