Rechercher une page de manuel
Sys::VirtV2V::GuestOS.3pm
Langue: en
Version: 2010-07-01 (fedora - 01/12/10)
Section: 3 (Bibliothèques de fonctions)
NAME
Sys::VirtV2V::GuestOS - Manipulate and query a Guest OSSYNOPSIS
use Sys::VirtV2V::GuestOS; $guestos = Sys::VirtV2V::GuestOS->new($g, $desc, $dom, $config);
DESCRIPTION
Sys::VirtV2V::GuestOS provides a mechanism for querying and manipulating a specific guest operating system.Sys::VirtV2V::GuestOS is a virtual superclass to various backends, each of which implement a consistent API. The new method will actually instantiate an appropriate subclass.
Sys::VirtV2V::GuestOS uses Module::Pluggable to automatically discover backends under Sys::VirtV2V::GuestOS.
METHODS
- new(g, desc, dom, config)
- Instantiate a GuestOS object capable of manipulating the target OS.
-
- g
- A Sys::Guestfs handle.
- desc
- An OS description created by Sys::Guestfs::Lib.
- dom
- An XML::DOM object containing the guest's libvirt domain XML prior to conversion.
- config
- An XML::DOM object containing the virt-v2v configuration.
Returns a capable Sys::VirtV2V::GuestOS if one is found.
Returns undef otherwise.
-
- get_ncpus
- Return the number of CPUS which are available to this guest
- get_memory_kb
- Return the amount of memory, in KB, which is available to this guest
BACKEND INTERFACE
All GuestOS backends are required to implement the following methods:- CLASS->can_handle(desc)
-
-
- desc
- An OS description as returned by Sys::Guestfs::Lib.
Returns true if the backend can handle the guest described by desc.
can_handle is only intended to be called by Sys::VirtV2V::GuestOS.
-
- CLASS->new(g, desc, files, deps, aliases)
-
-
- g
- A Sys::Guestfs handle.
- desc
- An OS description created by Sys::Guestfs::Lib.
- dom
- A parsed XML::DOM containing the libvirt domain XML for this guest prior to any conversion.
- config
- A parsed XML::DOM containing the virt-v2v configuration, or undef if there is no config.
Construct a new backend object. Assumes can_handle has previously returned true.
new is only intended to be called by Sys::VirtV2V::GuestOS.
-
- enable_kernel_module(device, module)
-
-
- device
- The name of the device as it is known to modprobe. Examples are eth0 or scsi_hostadapter.
- module
- The name of the kernel module which should be loaded for this device. An example is virtio_blk.
enable_kernel_module adds a new kernel module to the modprobe configuration.
-
- update_kernel_module(device, module)
- See enable_kernel_module for argument descriptions.
update_kernel_module changes an existing modprobe configuration in place.
- disable_kernel_module(device)
- See enable_kernel_module for argument description.
disable_kernel_module removes the modprobe configuration for the given device.
- update_display_driver(driver)
-
-
- driver
- The name of the new disply driver. An example is cirrus.
Update the display driver, if defined, to the given driver.
-
- remove_kernel(version)
-
-
- version
- The version number of the kernel to be removed.
remove_kernel uninstalls a kernel from the guest.
-
- get_application_owner(file)
-
-
- file
- The absolute path to a file or directory on the guest.
Return the name of the application which owns the given file.
get_application_owner() will throw an exception if the file is not owned by any application.
-
- remap_block_devices(map)
-
-
- map
- A map of old names to new names specified as (old1 => new1, old2 => new2...).
Update the guest to reflect the renaming of block devices.
-
- prepare_bootable(version [, module, module, ...])
-
-
- version
- The version number of the kernel which we want to boot.
- module
- A module which must be available at boot time.
Ensure that the guest will boot the given kernel version by default, and it will make available the given modules
-
- supports_virtio(kernel)
-
-
- kernel
- The version number of the kernel to be inspected
Returns 1 if the target kernel supports virtio, 0 otherwise.
-
COPYRIGHT
Copyright (C) 2009 Red Hat Inc.LICENSE
Please see the file COPYING.LIB for the full license.SEE ALSO
virt-v2v(1), Sys::VirtV2V::GuestOS::RedHat(3pm), Sys::Guestfs(3pm), Sys::Guestfs::Lib(3pm), <http://libguestfs.org/>.Contenus ©2006-2024 Benjamin Poulain
Design ©2006-2024 Maxime Vantorre