mount


Description:

[ Version ( since = "0.3" ) ]
public bool mount (string mountable, string mountpoint) throws Error

mount a guest disk at a position in the filesystem

Mount a guest disk at a position in the filesystem. Block devices are named /dev/sda, /dev/sdb and so on, as they were added to the guest. If those block devices contain partitions, they will have the usual names (eg. /dev/sda1). Also LVM /dev/VG/LV-style names can be used, or ‘mountable’ strings returned by list_filesystems or inspect_get_mountpoints.

The rules are the same as for mount(2): A filesystem must first be mounted on / before others can be mounted. Other filesystems can only be mounted on directories which already exist.

The mounted filesystem is writable, if we have sufficient permissions on the underlying device.

Before libguestfs 1.13.16, this call implicitly added the options sync and noatime. The sync option greatly slowed writes and caused many problems for users. If your program might need to work with older versions of libguestfs, use mount_options instead (using an empty string for the first parameter if you don't want any options).

Parameters:

this

A GuestfsSession object

Returns:

true on success, false on error