inspect_get_drive_mappings


Description:

[ Version ( since = "1.9.17" ) ]
public HashTable<string,string> inspect_get_drive_mappings (string root) throws Error

get drive letter mappings

This call is useful for Windows which uses a primitive system of assigning drive letters (like C:\) to partitions. This inspection API examines the Windows Registry to find out how disks/partitions are mapped to drive letters, and returns a hash table as in the example below:

<![CDATA[C => /dev/vda2]]>

<![CDATA[E => /dev/vdb1]]>

<![CDATA[F => /dev/vdc1]]>

Note that keys are drive letters. For Windows, the key is case insensitive and just contains the drive letter, without the customary colon separator character.

In future we may support other operating systems that also used drive letters, but the keys for those might not be case insensitive and might be longer than 1 character. For example in OS-9, hard drives were named h0, h1 etc.

For Windows guests, currently only hard drive mappings are returned. Removable disks (eg. DVD-ROMs) are ignored.

For guests that do not use drive mappings, or if the drive mappings could not be determined, this returns an empty hash table.

Please read "INSPECTION" in guestfs(3) for more details. See also inspect_get_mountpoints, inspect_get_filesystems.

Parameters:

this

A GuestfsSession object

Returns:

a GHashTable of results, or NULL on error