inspect_os


Description:

[ CCode ( array_length = false , array_null_terminated = true ) ]
[ Version ( since = "1.5.3" ) ]
public string[] inspect_os () throws Error

inspect disk and return list of operating systems found

This function uses other libguestfs functions and certain heuristics to inspect the disk(s) (usually disks belonging to a virtual machine ), looking for operating systems.

The list returned is empty if no operating systems were found.

If one operating system was found, then this returns a list with a single element, which is the name of the root filesystem of this operating system. It is also possible for this function to return a list containing more than one element, indicating a dual-boot or multi-boot virtual machine, with each element being the root filesystem of one of the operating systems.

You can pass the root string(s) returned to other "guestfs_inspect_get_*" functions in order to query further information about each operating system, such as the name and version.

This function uses other libguestfs features such as mount_ro and umount_all in order to mount and unmount filesystems and look at the contents. This should be called with no disks currently mounted. The function may also use Augeas, so any existing Augeas handle will be closed.

This function cannot decrypt encrypted disks. The caller must do that first (supplying the necessary keys) if the disk is encrypted.

Please read "INSPECTION" in guestfs(3) for more details.

See also list_filesystems.

Parameters:

this

A GuestfsSession object

Returns:

an array of returned strings, or NULL on error




2022 vala-language.org