Total number of functions: 135. Functions supported are:
libvirt_get_last_error()
libvirt_connect($url, $readonly, $credentials)
libvirt_node_get_info($conn)
libvirt_node_get_cpu_stats($conn, $cpunr)
libvirt_node_get_cpu_stats_for_each_cpu($conn, $time)
libvirt_node_get_mem_stats($conn)
libvirt_connect_get_information($conn)
libvirt_connect_get_uri($conn)
libvirt_connect_get_hostname($conn)
libvirt_image_create($conn, $name, $size, $format)
libvirt_image_remove($conn, $image)
libvirt_connect_get_hypervisor($conn)
libvirt_connect_is_encrypted($conn)
libvirt_connect_is_secure($conn)
libvirt_connect_get_maxvcpus($conn)
libvirt_connect_get_sysinfo($conn)
libvirt_domain_get_counts($conn)
libvirt_domain_get_autostart($res)
libvirt_domain_set_autostart($res, $flags)
libvirt_domain_is_active($res)
libvirt_domain_lookup_by_name($res, $name)
libvirt_domain_lookup_by_uuid($res, $uuid)
libvirt_domain_lookup_by_uuid_string($res, $uuid)
libvirt_domain_lookup_by_id($conn, $id)
libvirt_domain_get_name($res)
libvirt_domain_get_uuid_string($res)
libvirt_domain_get_screenshot_api($res, $screenID)
libvirt_domain_get_screenshot($res, $server, $scancode)
libvirt_domain_get_screen_dimensions($res, $server)
libvirt_domain_send_keys($res, $server, $scancode)
libvirt_domain_send_pointer_event($res, $server, $pos_x, $pos_y, $clicked, $release)
libvirt_domain_get_uuid($res)
libvirt_domain_get_id($res)
libvirt_domain_get_next_dev_ids($res)
libvirt_connect_get_capabilities($conn, $xpath)
libvirt_connect_get_emulator($conn, $arch)
libvirt_domain_new($conn, $name, $arch, $memMB, $maxmemMB, $vcpus, $iso_image, $disks, $networks, $flags)
libvirt_domain_new_get_vnc($one)
libvirt_domain_get_xml_desc($res, $xpath)
libvirt_domain_get_disk_devices($res)
libvirt_domain_get_interface_devices($res)
libvirt_domain_change_vcpus($res, $numCpus)
libvirt_domain_change_memory($res, $allocMem, $allocMax)
libvirt_domain_change_boot_devices($res, $first, $second)
libvirt_domain_disk_add($res, $img, $dev, $typ, $driver, $flags)
libvirt_domain_disk_remove($res, $dev, $flags)
libvirt_domain_nic_add($res, $mac, $network, $model, $flags)
libvirt_domain_nic_remove($res, $dev, $flags)
libvirt_domain_get_info($res)
libvirt_domain_create($res)
libvirt_domain_destroy($res)
libvirt_domain_resume($res)
libvirt_domain_core_dump($res)
libvirt_domain_shutdown($res)
libvirt_domain_managedsave($res)
libvirt_domain_suspend($res)
libvirt_domain_undefine($res)
libvirt_domain_reboot($res)
libvirt_domain_define_xml($conn, $xml)
libvirt_domain_create_xml($conn, $xml)
libvirt_domain_memory_peek($res)
libvirt_domain_memory_stats($res)
libvirt_domain_update_device($res, $xml, $flags)
libvirt_domain_block_stats($res, $path)
libvirt_domain_get_network_info($res, $mac)
libvirt_domain_get_block_info($res, $dev)
libvirt_domain_xml_xpath($res, $xpath)
libvirt_domain_interface_stats($res, $path)
libvirt_domain_get_connect($res)
libvirt_domain_migrate_to_uri($res, $dest_uri, $flags, $dname, $bandwidth)
libvirt_domain_migrate_to_uri2($res, $dconnuri, $miguri, $dxml, $flags, $dname, $bandwidth)
libvirt_domain_migrate($res, $dest_conn, $flags, $dname, $bandwidth)
libvirt_domain_get_job_info($res)
libvirt_domain_has_current_snapshot($res)
libvirt_domain_snapshot_lookup_by_name($res, $name)
libvirt_domain_snapshot_create($res)
libvirt_domain_snapshot_get_xml($res)
libvirt_domain_snapshot_revert($res)
libvirt_domain_snapshot_delete($res, $flags)
libvirt_list_domain_snapshots($res)
libvirt_storagepool_lookup_by_name($res, $name)
libvirt_storagepool_lookup_by_volume($res)
libvirt_storagepool_list_volumes($res)
libvirt_storagepool_get_info($res)
libvirt_storagevolume_lookup_by_name($res, $name)
libvirt_storagevolume_lookup_by_path($res, $path)
libvirt_storagevolume_get_name($res)
libvirt_storagevolume_get_path($res)
libvirt_storagevolume_get_info($res)
libvirt_storagevolume_get_xml_desc($res, $xpath)
libvirt_storagevolume_create_xml($res, $xml)
libvirt_storagevolume_create_xml_from($pool, $xml, $original_volume)
libvirt_storagevolume_delete($res, $flags)
libvirt_storagepool_get_uuid_string($res)
libvirt_storagepool_get_name($res)
libvirt_storagepool_lookup_by_uuid_string($res, $uuid)
libvirt_storagepool_get_xml_desc($res, $xpath)
libvirt_storagepool_define_xml($res, $xml, $flags)
libvirt_storagepool_undefine($res)
libvirt_storagepool_create($res)
libvirt_storagepool_destroy($res)
libvirt_storagepool_is_active($res)
libvirt_storagepool_get_volume_count($res)
libvirt_storagepool_refresh($res, $flags)
libvirt_storagepool_set_autostart($res, $flags)
libvirt_storagepool_get_autostart($res)
libvirt_storagepool_build($res)
libvirt_storagepool_delete($res)
libvirt_list_storagepools($res)
libvirt_list_active_storagepools($res)
libvirt_list_inactive_storagepools($res)
libvirt_list_domains($res)
libvirt_list_domain_resources($res)
libvirt_list_active_domain_ids($res)
libvirt_list_active_domains($res)
libvirt_list_inactive_domains($res)
libvirt_list_networks($res, $flags)
libvirt_list_nodedevs($res, $cap)
libvirt_nodedev_get($res, $name)
libvirt_nodedev_capabilities($res)
libvirt_nodedev_get_xml_desc($res, $xpath)
libvirt_nodedev_get_information($res)
libvirt_network_define_xml($res, $xml)
libvirt_network_undefine($res)
libvirt_network_get($res, $name)
libvirt_network_get_bridge($res)
libvirt_network_get_active($res)
libvirt_network_get_information($res)
libvirt_network_set_active($res)
libvirt_network_get_xml_desc($res, $xpath)
libvirt_version($type)
libvirt_check_version($major, $minor, $micro, $type)
libvirt_has_feature($name)
libvirt_get_iso_images($path)
libvirt_print_binding_resources()
libvirt_logfile_set($filename, $maxsize)
libvirt_get_last_errorlibvirt_get_last_error()
[Since version 0.4.1(-1)]
This function is used to get the last error coming either from libvirt or the PHP extension itself.
| Returns: | last error string |
libvirt_connectlibvirt_connect($url, $readonly, $credentials)
[Since version 0.4.1(-1)]
libvirt_connect() is used to connect to the specified libvirt daemon using the specified URL, user can also set the readonly flag and/or set credentials for connection.
| url [string]: | URI for connection |
| @readonly [bool]: | flag whether to use read-only connection or not |
| @credentials [array]: | array of connection credentials |
| Returns: | libvirt connection resource |
libvirt_node_get_infolibvirt_node_get_info($conn)
[Since version 0.4.1(-1)]
Function is used to get the information about host node, mainly total memory installed, total CPUs installed and model information are useful.
| conn [resource]: | resource for connection |
| Returns: | array of node information or FALSE for error |
libvirt_node_get_cpu_statslibvirt_node_get_cpu_stats($conn, $cpunr)
[Since version 0.4.6]
Function is used to get the CPU stats per nodes.
| conn [resource]: | resource for connection |
| @cpunr [int]: | CPU number to get information about, defaults to VIR_NODE_CPU_STATS_ALL_CPUS to get information about all CPUs |
| Returns: | array of node CPU statistics including time (in seconds since UNIX epoch), cpu number and total number of CPUs on node or FALSE for error |
libvirt_node_get_cpu_stats_for_each_cpulibvirt_node_get_cpu_stats_for_each_cpu($conn, $time)
[Since version 0.4.6]
Function is used to get the CPU stats for each CPU on the host node.
| conn [resource]: | resource for connection |
| @time [int]: | time in seconds to get the information about, without aggregation for further processing |
| Returns: | array of node CPU statistics for each CPU including time (in seconds since UNIX epoch), cpu number and total number of CPUs on node or FALSE for error |
libvirt_node_get_mem_statslibvirt_node_get_mem_stats($conn)
[Since version 0.4.6]
Function is used to get the memory stats per node.
| conn [resource]: | resource for connection |
| Returns: | array of node memory statistics including time (in seconds since UNIX epoch) or FALSE for error |
libvirt_connect_get_informationlibvirt_connect_get_information($conn)
[Since version 0.4.1(-2)]
Function is used to get the information about the connection.
| conn [resource]: | resource for connection |
| Returns: | array of information about the connection |
libvirt_connect_get_urilibvirt_connect_get_uri($conn)
[Since version 0.4.1(-1)]
Function is used to get the connection URI. This is useful to check the hypervisor type of host machine when using "null" uri to libvirt_connect().
| conn [resource]: | resource for connection |
| Returns: | connection URI string or FALSE for error |
libvirt_connect_get_hostnamelibvirt_connect_get_hostname($conn)
[Since version 0.4.1(-1)]
Function is used to get the hostname of the guest associated with the connection.
| conn [resource]: | resource for connection |
| Returns: | hostname of the host node or FALSE for error |
libvirt_image_createlibvirt_image_create($conn, $name, $size, $format)
[Since version 0.4.2]
Function is used to create the image of desired name, size and format. The image will be created in the image path (libvirt.image_path INI variable). Works only o.
| @conn [resource]: | libvirt connection resource |
| @name [string]: | name of the image file that will be created in the libvirt.image_path directory |
| @size [int]: | size of the image in MiBs |
| @format [string]: | format of the image, may be raw, qcow or qcow2 |
| Returns: | hostname of the host node or FALSE for error |
libvirt_image_removelibvirt_image_remove($conn, $image)
[Since version 0.4.2]
Function is used to create the image of desired name, size and format. The image will be created in the image path (libvirt.image_path INI variable). Works only on local systems!.
| conn [resource]: | libvirt connection resource |
| @image [string]: | name of the image file that should be deleted |
| Returns: | hostname of the host node or FALSE for error |
libvirt_connect_get_hypervisorlibvirt_connect_get_hypervisor($conn)
[Since version 0.4.1(-2)]
Function is used to get the information about the hypervisor on the connection identified by the connection pointer.
| conn [resource]: | resource for connection |
| Returns: | array of hypervisor information if available |
libvirt_connect_is_encryptedlibvirt_connect_is_encrypted($conn)
[Since version 0.4.1(-2)]
Function is used to get the information whether the connection is encrypted or not.
| conn [resource]: | resource for connection |
| Returns: | 1 if encrypted, 0 if not encrypted, -1 on error |
libvirt_connect_is_securelibvirt_connect_is_secure($conn)
[Since version 0.4.1(-2)]
Function is used to get the information whether the connection is secure or not.
| conn [resource]: | resource for connection |
| Returns: | 1 if secure, 0 if not secure, -1 on error |
libvirt_connect_get_maxvcpuslibvirt_connect_get_maxvcpus($conn)
[Since version 0.4.1(-2)]
Function is used to get maximum number of VCPUs per VM on the hypervisor connection.
| conn [resource]: | resource for connection |
| Returns: | number of VCPUs available per VM on the connection or FALSE for error |
libvirt_connect_get_sysinfolibvirt_connect_get_sysinfo($conn)
[Since version 0.4.1(-2)]
Function is used to get the system information from connection if available.
| conn [resource]: | resource for connection |
| Returns: | XML description of system information from the connection or FALSE for error |
libvirt_domain_get_countslibvirt_domain_get_counts($conn)
[Since version 0.4.1(-1)]
Function is getting domain counts for all, active and inactive domains.
| conn [resource]: | libvirt connection resource from libvirt_connect() |
| Returns: | array of total, active and inactive (but defined) domain counts |
libvirt_domain_get_autostartlibvirt_domain_get_autostart($res)
[Since version 0.4.1(-1)]
Function is getting the autostart value for the domain.
| res [resource]: | libvirt domain resource |
| Returns: | autostart value or -1 |
libvirt_domain_set_autostartlibvirt_domain_set_autostart($res, $flags)
[Since version 0.4.1(-1)]
Function is setting the autostart value for the domain.
| res [resource]: | libvirt domain resource |
| @flags [int]: | flag to enable/disable autostart |
| Returns: | TRUE on success, FALSE on error |
libvirt_domain_is_activelibvirt_domain_is_active($res)
[Since version 0.4.1(-1)]
Function is getting information whether domain identified by resource is active or not.
| res [resource]: | libvirt domain resource |
| Returns: | virDomainIsActive() result on the domain |
libvirt_domain_lookup_by_namelibvirt_domain_lookup_by_name($res, $name)
[Since version 0.4.1(-1)]
Function is used to lookup for domain by it's name.
| res [resource]: | libvirt connection resource from libvirt_connect() |
| @name [string]: | domain name to look for |
| Returns: | libvirt domain resource |
libvirt_domain_lookup_by_uuidlibvirt_domain_lookup_by_uuid($res, $uuid)
[Since version 0.4.1(-1)]
Function is used to lookup for domain by it's UUID in the binary format.
| res [resource]: | libvirt connection resource from libvirt_connect() |
| @uuid [string]: | binary defined UUID to look for |
| Returns: | libvirt domain resource |
libvirt_domain_lookup_by_uuid_stringlibvirt_domain_lookup_by_uuid_string($res, $uuid)
[Since version 0.4.1(-1)]
Function is used to get the domain by it's UUID that's accepted in string format.
| res [resource]: | libvirt connection resource from libvirt_connect() |
| @uuid [string]: | domain UUID [in string format] to look for |
| Returns: | libvirt domain resource |
libvirt_domain_lookup_by_idlibvirt_domain_lookup_by_id($conn, $id)
[Since version 0.4.1(-1)]
Function is used to get domain by it's ID, applicable only to running guests.
| conn [resource]: | libvirt connection resource from libvirt_connect() |
| @id [string]: | domain id to look for |
| Returns: | libvirt domain resource |
libvirt_domain_get_namelibvirt_domain_get_name($res)
[Since version 0.4.1(-1)]
Function is used to get domain name from it's resource.
| res [resource]: | libvirt domain resource, e.g. from libvirt_domain_lookup_by_*() |
| Returns: | domain name string |
libvirt_domain_get_uuid_stringlibvirt_domain_get_uuid_string($res)
[Since version 0.4.1(-1)]
Function is used to get the domain's UUID in string format.
| res [resource]: | libvirt domain resource, e.g. from libvirt_domain_lookup_by_*() |
| Returns: | domain UUID string |
libvirt_domain_get_screenshot_apilibvirt_domain_get_screenshot_api($res, $screenID)
[Since version 0.4.5]
Function is trying to get domain screenshot using libvirt virGetDomainScreenshot() API if available..
| res [resource]: | libvirt domain resource, e.g. from libvirt_domain_get_by_*() |
| @screenID [int]: | monitor ID from where to take screenshot |
| Returns: | array of filename and mime type as type is hypervisor specific, caller is responsible for temporary file deletion |
libvirt_domain_get_screenshotlibvirt_domain_get_screenshot($res, $server, $scancode)
[Since version 0.4.2]
Function uses gvnccapture (if available) to get the screenshot of the running domain.
| res [resource]: | libvirt domain resource, e.g. from libvirt_domain_lookup_by_*() |
| @server [string]: | server string for the host machine |
| @scancode [int]: | integer value of the scancode to be send to refresh screen |
| Returns: | PNG image binary data |
libvirt_domain_get_screen_dimensionslibvirt_domain_get_screen_dimensions($res, $server)
[Since version 0.4.3]
Function get screen dimensions of the VNC window.
| res [resource]: | libvirt domain resource, e.g. from libvirt_domain_lookup_by_*() |
| @server [string]: | server string of the host machine |
| Returns: | array of height and width on success, FALSE otherwise |
libvirt_domain_send_keyslibvirt_domain_send_keys($res, $server, $scancode)
[Since version 0.4.2]
Function sends keys to the domain's VNC window.
| res [resource]: | libvirt domain resource, e.g. from libvirt_domain_lookup_by_*() |
| @server [string]: | server string of the host machine |
| @scancode [int]: | integer scancode to be sent to VNC window |
| Returns: | TRUE on success, FALSE otherwise |
libvirt_domain_send_pointer_eventlibvirt_domain_send_pointer_event($res, $server, $pos_x, $pos_y, $clicked, $release)
[Since version 0.4.2]
Function sends keys to the domain's VNC window.
| res [resource]: | libvirt domain resource, e.g. from libvirt_domain_lookup_by_*() |
| @server [string]: | server string of the host machine |
| @pos_x [int]: | position on x-axis |
| @pos_y [int]: | position on y-axis |
| @clicked [int]: | mask of clicked buttons (0 for none, bit 1 for button #1, bit 8 for button #8) |
| @release [int]: | boolean value (0 or 1) whether to release the buttons automatically once pressed |
| Returns: | TRUE on success, FALSE otherwise |
libvirt_domain_get_uuidlibvirt_domain_get_uuid($res)
[Since version 0.4.1(-1)]
Function is used to get the domain's UUID in binary format.
| res [resource]: | libvirt domain resource, e.g. from libvirt_domain_lookup_by_*() |
| Returns: | domain UUID in binary format |
libvirt_domain_get_idlibvirt_domain_get_id($res)
[Since version 0.4.1(-1)]
Function is used to get the domain's ID, applicable to running guests only.
| res [resource]: | libvirt domain resource, e.g. from libvirt_domain_lookup_by_*() |
| Returns: | running domain ID or -1 if not running |
libvirt_domain_get_next_dev_idslibvirt_domain_get_next_dev_ids($res)
[Since version 0.4.2]
This functions can be used to get the next free slot if you intend to add a new device identified by slot to the domain, e.g. NIC device.
| res [resource]: | libvirt domain resource, e.g. from libvirt_domain_lookup_by_*() |
| Returns: | next free slot number for the domain |
libvirt_connect_get_capabilitieslibvirt_connect_get_capabilities($conn, $xpath)
[Since version 0.4.1(-2)]
Function is used to get the capabilities information from the connection.
| conn [resource]: | resource for connection |
| @xpath [string]: | optional xPath query to be applied on the result |
| Returns: | capabilities XML from the connection or FALSE for error |
libvirt_connect_get_emulatorlibvirt_connect_get_emulator($conn, $arch)
[Since version 0.4.5]
Function is used to get the emulator for requested connection/architecture.
| conn [resource]: | libvirt connection resource |
| @arch [string]: | optional architecture string, can be NULL to get default |
| Returns: | path to the emulator |
libvirt_domain_newlibvirt_domain_new($conn, $name, $arch, $memMB, $maxmemMB, $vcpus, $iso_image, $disks, $networks, $flags)
[Since version 0.4.5]
Function is used to install a new virtual machine to the machine.
| conn [resource]: | libvirt connection resource |
| @name [string]: | name of the new domain |
| @arch [string]: | optional architecture string, can be NULL to get default (or false) |
| @memMB [int]: | number of megabytes of RAM to be allocated for domain |
| @maxmemMB [int]: | maximum number of megabytes of RAM to be allocated for domain |
| @vcpus [int]: | number of VCPUs to be allocated to domain |
| @iso_image [string]: | installation ISO image for domain |
| @disks [array]: | array of disk devices for domain, consist of keys as 'path' (storage location), 'driver' (image type, e.g. 'raw' or 'qcow2'), 'bus' (e.g. 'ide', 'scsi'), 'dev' (device to be presented to the guest - e.g. 'hda'), 'size' (with 'M' or 'G' suffixes, like '10G' for 10 gigabytes image etc.) and 'flags' (VIR_DOMAIN_DISK_FILE or VIR_DOMAIN_DISK_BLOCK, optionally VIR_DOMAIN_DISK_ACCESS_ALL to allow access to the disk for all users on the host system) |
| @networks [array]: | array of network devices for domain, consists of keys as 'mac' (for MAC address), 'network' (for network name) and optional 'model' for model of NIC device |
| @flags [int]: | bit array of flags |
| Returns: | a new domain resource |
libvirt_domain_new_get_vnclibvirt_domain_new_get_vnc($one)
[Since version 0.4.5]
Function is used to get the VNC server location for the newly created domain (newly started installation).
| one: | one |
| Returns: | a VNC server for a newly created domain resource (if any) |
libvirt_domain_get_xml_desclibvirt_domain_get_xml_desc($res, $xpath)
[Since version 0.4.1(-1), changed 0.4.2]
Function is used to get the domain's XML description.
| res [resource]: | libvirt domain resource, e.g. from libvirt_domain_lookup_by_*() |
| @xpath [string]: | optional xPath expression string to get just this entry, can be NULL |
| Returns: | domain XML description string or result of xPath expression |
libvirt_domain_get_disk_deviceslibvirt_domain_get_disk_devices($res)
[Since version 0.4.4]
Function is used to get disk devices for the domain.
| res [resource]: | libvirt domain resource, e.g. from libvirt_domain_lookup_by_*() |
| Returns: | list of domain disk devices |
libvirt_domain_get_interface_deviceslibvirt_domain_get_interface_devices($res)
[Since version 0.4.4]
Function is used to get network interface devices for the domain.
| res [resource]: | libvirt domain resource, e.g. from libvirt_domain_lookup_by_*() |
| Returns: | list of domain interface devices |
libvirt_domain_change_vcpuslibvirt_domain_change_vcpus($res, $numCpus)
[Since version 0.4.2]
Function is used to change the VCPU count for the domain.
| res [resource]: | libvirt domain resource |
| @numCpus [int]: | number of VCPUs to be set for the guest |
| Returns: | new domain resource |
libvirt_domain_change_memorylibvirt_domain_change_memory($res, $allocMem, $allocMax)
[Since version 0.4.2]
Function is used to change the domain memory allocation.
| res [resource]: | libvirt domain resource |
| @allocMem [int]: | number of MiBs to be set as immediate memory value |
| @allocMax [int]: | number of MiBs to be set as the maximum allocation |
| Returns: | new domain resource |
libvirt_domain_change_boot_deviceslibvirt_domain_change_boot_devices($res, $first, $second)
[Since version 0.4.2]
Function is used to change the domain boot devices.
| res [resource]: | libvirt domain resource |
| @first [string]: | first boot device to be set |
| @second [string]: | second boot device to be set |
| Returns: | new domain resource |
libvirt_domain_disk_addlibvirt_domain_disk_add($res, $img, $dev, $typ, $driver, $flags)
[Since version 0.4.2]
Function is used to add the disk to the virtual machine using set of API functions to make it as simple as possible for the user.
| res [resource]: | libvirt domain resource |
| @img [string]: | string for the image file on the host system |
| @dev [string]: | string for the device to be presented to the guest (e.g. hda) |
| @typ [string]: | bus type for the device in the guest, usually 'ide' or 'scsi' |
| driver [string]: | driver type to be specified, like 'raw' or 'qcow2' |
| @flags [int]: | flags for getting the XML description |
| Returns: | new domain resource |
libvirt_domain_disk_removelibvirt_domain_disk_remove($res, $dev, $flags)
[Since version 0.4.2]
Function is used to remove the disk from the virtual machine using set of API functions to make it as simple as possible.
| res [resource]: | libvirt domain resource |
| @dev [string]: | string for the device to be removed from the guest (e.g. 'hdb') |
| @flags [int]: | flags for getting the XML description |
| Returns: | new domain resource |
libvirt_domain_nic_addlibvirt_domain_nic_add($res, $mac, $network, $model, $flags)
[Since version 0.4.2]
Function is used to add the NIC card to the virtual machine using set of API functions to make it as simple as possible for the user.
| res [resource]: | libvirt domain resource |
| @mac [string]: | MAC string interpretation to be used for the NIC device |
| @network [string]: | network name where to connect this NIC |
| @model [string]: | string of the NIC model |
| @flags [int]: | flags for getting the XML description |
| Returns: | new domain resource |
libvirt_domain_nic_removelibvirt_domain_nic_remove($res, $dev, $flags)
[Since version 0.4.2]
Function is used to remove the NIC from the virtual machine using set of API functions to make it as simple as possible.
| res [resource]: | libvirt domain resource |
| @dev [string]: | string representation of the IP address to be removed (e.g. 54:52:00:xx:yy:zz) |
| @flags [int]: | optional flags for getting the XML description |
| Returns: | new domain resource |
libvirt_domain_get_infolibvirt_domain_get_info($res)
[Since version 0.4.1(-1)]
Function is used to get the domain's information.
| res [resource]: | libvirt domain resource, e.g. from libvirt_domain_lookup_by_*() |
| Returns: | domain information array |
libvirt_domain_createlibvirt_domain_create($res)
[Since version 0.4.1(-1)]
Function is used to create the domain identified by it's resource.
| res [resource]: | libvirt domain resource, e.g. from libvirt_domain_lookup_by_*() |
| Returns: | result of domain creation (startup) |
libvirt_domain_destroylibvirt_domain_destroy($res)
[Since version 0.4.1(-1)]
Function is used to destroy the domain identified by it's resource.
| res [resource]: | libvirt domain resource, e.g. from libvirt_domain_lookup_by_*() |
| Returns: | result of domain destroy |
libvirt_domain_resumelibvirt_domain_resume($res)
[Since version 0.4.1(-1)]
Function is used to resume the domain identified by it's resource.
| res [resource]: | libvirt domain resource, e.g. from libvirt_domain_lookup_by_*() |
| Returns: | result of domain resume |
libvirt_domain_core_dumplibvirt_domain_core_dump($res)
[Since version 0.4.1(-2)]
Function is used to dump core of the domain identified by it's resource.
| res [resource]: | libvirt domain resource, e.g. from libvirt_domain_lookup_by_*() |
| Returns: | TRUE for success, FALSE on error |
libvirt_domain_shutdownlibvirt_domain_shutdown($res)
[Since version 0.4.1(-1)]
Function is used to shutdown the domain identified by it's resource.
| res [resource]: | libvirt domain resource, e.g. from libvirt_domain_lookup_by_*() |
| Returns: | TRUE for success, FALSE on error |
libvirt_domain_managedsavelibvirt_domain_managedsave($res)
[Since version 0.4.1(-1)]
Function is used to managed save the domain (domain was unloaded from memory and it state saved to disk) identified by it's resource.
| res [resource]: | libvirt domain resource, e.g. from libvirt_domain_lookup_by_*() |
| Returns: | TRUE for success, FALSE on error |
libvirt_domain_suspendlibvirt_domain_suspend($res)
[Since version 0.4.1(-1)]
Function is used to suspend the domain identified by it's resource.
| res [resource]: | libvirt domain resource, e.g. from libvirt_domain_lookup_by_*() |
| Returns: | TRUE for success, FALSE on error |
libvirt_domain_undefinelibvirt_domain_undefine($res)
[Since version 0.4.1(-1)]
Function is used to undefine the domain identified by it's resource.
| res [resource]: | libvirt domain resource, e.g. from libvirt_domain_lookup_by_*() |
| Returns: | TRUE for success, FALSE on error |
libvirt_domain_rebootlibvirt_domain_reboot($res)
[Since version 0.4.1(-1)]
Function is used to reboot the domain identified by it's resource.
| res [resource]: | libvirt domain resource, e.g. from libvirt_domain_lookup_by_*() |
| Returns: | TRUE for success, FALSE on error |
libvirt_domain_define_xmllibvirt_domain_define_xml($conn, $xml)
[Since version 0.4.1(-1)]
Function is used to define the domain from XML string.
| conn [resource]: | libvirt connection resource |
| @xml [string]: | XML string to define guest from |
| Returns: | newly defined domain resource |
libvirt_domain_create_xmllibvirt_domain_create_xml($conn, $xml)
[Since version 0.4.1(-1)]
Function is used to create the domain identified by it's resource.
| conn [resource]: | libvirt connection resource |
| @xml [string]: | XML string to create guest from |
| Returns: | newly started/created domain resource |
libvirt_domain_memory_peeklibvirt_domain_memory_peek($res)
[Since version 0.4.1(-1)]
Function is used to get the domain's memory peek value.
| res [resource]: | libvirt domain resource, e.g. from libvirt_domain_lookup_by_*() |
| Returns: | domain memory peek |
libvirt_domain_memory_statslibvirt_domain_memory_stats($res)
[Since version 0.4.1(-1)]
Function is used to get the domain's memory stats.
| res [resource]: | libvirt domain resource, e.g. from libvirt_domain_lookup_by_*() |
| Returns: | domain memory stats array (same fields as virDomainMemoryStats, please see libvirt documentation) |
libvirt_domain_update_devicelibvirt_domain_update_device($res, $xml, $flags)
[Since version 0.4.1(-1)]
Function is used to update the domain's devices from the XML string.
| res [resource]: | libvirt domain resource, e.g. from libvirt_domain_lookup_by_*() |
| @xml [string]: | XML string for the update |
| @flags [int]: | Flags to update the device (VIR_DOMAIN_DEVICE_MODIFY_CURRENT, VIR_DOMAIN_DEVICE_MODIFY_LIVE, VIR_DOMAIN_DEVICE_MODIFY_CONFIG, VIR_DOMAIN_DEVICE_MODIFY_FORCE) |
| Returns: | TRUE for success, FALSE on error |
libvirt_domain_block_statslibvirt_domain_block_stats($res, $path)
[Since version 0.4.1(-1)]
Function is used to get the domain's block stats.
| res [resource]: | libvirt domain resource, e.g. from libvirt_domain_lookup_by_*() |
| @path [string]: | device path to get statistics about |
| Returns: | domain block stats array, fields are rd_req, rd_bytes, wr_req, wr_bytes and errs |
libvirt_domain_get_network_infolibvirt_domain_get_network_info($res, $mac)
[Since version 0.4.1(-1)]
Function is used to get the domain's network information.
| res [resource]: | libvirt domain resource, e.g. from libvirt_domain_lookup_by_*() |
| @mac [string]: | mac address of the network device |
| Returns: | domain network info array of MAC address, network name and type of NIC card |
libvirt_domain_get_block_infolibvirt_domain_get_block_info($res, $dev)
[Since version 0.4.1(-1)]
Function is used to get the domain's block device information.
| res [resource]: | libvirt domain resource, e.g. from libvirt_domain_lookup_by_*() |
| @dev [string]: | device to get block information about |
| Returns: | domain block device information array of device, file or partition, capacity, allocation and physical size |
libvirt_domain_xml_xpathlibvirt_domain_xml_xpath($res, $xpath)
[Since version 0.4.1(-1)]
Function is used to get the result of xPath expression that's run against the domain.
| res [resource]: | libvirt domain resource, e.g. from libvirt_domain_lookup_by_*() |
| @xpath [string]: | xPath expression to parse against the domain |
| Returns: | result of the expression in an array |
libvirt_domain_interface_statslibvirt_domain_interface_stats($res, $path)
[Since version 0.4.1(-1)]
Function is used to get the domain's interface stats.
| res [resource]: | libvirt domain resource, e.g. from libvirt_domain_lookup_by_*() |
| @path [string]: | path to interface device |
| Returns: | interface stats array of {tx|rx}_{bytes|packets|errs|drop} fields |
libvirt_domain_get_connectlibvirt_domain_get_connect($res)
[Since version 0.4.1(-1)]
Function is used to get the domain's connection resource. This function should *not* be used!.
| res [resource]: | libvirt domain resource, e.g. from libvirt_domain_lookup_by_*() |
| Returns: | libvirt connection resource |
libvirt_domain_migrate_to_urilibvirt_domain_migrate_to_uri($res, $dest_uri, $flags, $dname, $bandwidth)
[Since version 0.4.1(-1)]
Function is used migrate domain to another libvirt daemon specified by it's URI.
| res [resource]: | libvirt domain resource, e.g. from libvirt_domain_lookup_by_*() |
| @dest_uri [string]: | destination URI to migrate to |
| @flags [int]: | migration flags |
| @dname [string]: | domain name to rename domain to on destination side |
| @bandwidth [int]: | migration bandwidth in Mbps |
| Returns: | TRUE for success, FALSE on error |
libvirt_domain_migrate_to_uri2libvirt_domain_migrate_to_uri2($res, $dconnuri, $miguri, $dxml, $flags, $dname, $bandwidth)
[Since version 0.4.6(-1)]
Function is used migrate domain to another libvirt daemon specified by it's URI.
| res [resource]: | libvirt domain resource, e.g. from libvirt_domain_lookup_by_*() |
| @dconnuri [string]: | URI for target libvirtd |
| @miguri [string]: | URI for invoking the migration |
| @dxml [string]: | XML config for launching guest on target |
| @flags [int]: | migration flags |
| @dname [string]: | domain name to rename domain to on destination side |
| @bandwidth [int]: | migration bandwidth in Mbps |
| Returns: | TRUE for success, FALSE on error |
libvirt_domain_migratelibvirt_domain_migrate($res, $dest_conn, $flags, $dname, $bandwidth)
[Since version 0.4.1(-1)]
Function is used migrate domain to another domain.
| res [resource]: | libvirt domain resource, e.g. from libvirt_domain_lookup_by_*() |
| @dest_conn [string]: | destination host connection object |
| @flags [int]: | migration flags |
| @dname [string]: | domain name to rename domain to on destination side |
| @bandwidth [int]: | migration bandwidth in Mbps |
| Returns: | libvirt domain resource for migrated domain |
libvirt_domain_get_job_infolibvirt_domain_get_job_info($res)
[Since version 0.4.1(-1)]
Function is used get job information for the domain.
| res [resource]: | libvirt domain resource, e.g. from libvirt_domain_lookup_by_*() |
| Returns: | job information array of type, time, data, mem and file fields |
libvirt_domain_has_current_snapshotlibvirt_domain_has_current_snapshot($res)
[Since version 0.4.1(-2)]
Function is used to get the information whether domain has the current snapshot.
| res [resource]: | libvirt domain resource |
| Returns: | TRUE is domain has the current snapshot, otherwise FALSE (you may need to check for error using libvirt_get_last_error()) |
libvirt_domain_snapshot_lookup_by_namelibvirt_domain_snapshot_lookup_by_name($res, $name)
[Since version 0.4.1(-2)]
This functions is used to lookup for the snapshot by it's name.
| res [resource]: | libvirt domain resource |
| @name [string]: | name of the snapshot to get the resource |
| Returns: | domain snapshot resource |
libvirt_domain_snapshot_createlibvirt_domain_snapshot_create($res)
[Since version 0.4.1(-2)]
This function creates the domain snapshot for the domain identified by it's resource.
| res [resource]: | libvirt domain resource |
| Returns: | domain snapshot resource |
libvirt_domain_snapshot_get_xmllibvirt_domain_snapshot_get_xml($res)
[Since version 0.4.1(-2)]
Function is used to get the XML description of the snapshot identified by it's resource.
| res [resource]: | libvirt snapshot resource |
| Returns: | XML description string for the snapshot |
libvirt_domain_snapshot_revertlibvirt_domain_snapshot_revert($res)
[Since version 0.4.1(-2)]
Function is used to revert the domain state to the state identified by the snapshot.
| res [resource]: | libvirt snapshot resource |
| Returns: | TRUE on success, FALSE on error |
libvirt_domain_snapshot_deletelibvirt_domain_snapshot_delete($res, $flags)
[Since version 0.4.1(-2)]
Function is used to revert the domain state to the state identified by the snapshot.
| res [resource]: | libvirt snapshot resource |
| @flags [int]: | 0 to delete just snapshot, VIR_SNAPSHOT_DELETE_CHILDREN to delete snapshot children as well |
| Returns: | TRUE on success, FALSE on error |
libvirt_list_domain_snapshotslibvirt_list_domain_snapshots($res)
[Since version 0.4.1(-2)]
Function is used to list domain snapshots for the domain specified by it's resource.
| res [resource]: | libvirt domain resource |
| Returns: | libvirt domain snapshot names array |
libvirt_storagepool_lookup_by_namelibvirt_storagepool_lookup_by_name($res, $name)
[Since version 0.4.1(-1)]
Function is used to lookup for storage pool by it's name.
| res [resource]: | libvirt connection resource |
| @name [string]: | storage pool name |
| Returns: | libvirt storagepool resource |
libvirt_storagepool_lookup_by_volumelibvirt_storagepool_lookup_by_volume($res)
[Since version 0.4.1(-1)]
Function is used to lookup for storage pool by a volume.
| res [volume]: | volume resource of storage pool |
| Returns: | libvirt storagepool resource |
libvirt_storagepool_list_volumeslibvirt_storagepool_list_volumes($res)
[Since version 0.4.1(-1)]
Function is used to list volumes in the specified storage pool.
| res [resource]: | libvirt storagepool resource |
| Returns: | list of storage volume names in the storage pool in an array using default keys (indexes) |
libvirt_storagepool_get_infolibvirt_storagepool_get_info($res)
[Since version 0.4.1(-1)]
Function is used to get information about the storage pool.
| res [resource]: | libvirt storagepool resource |
| Returns: | storage pool information array of state, capacity, allocation and available space |
libvirt_storagevolume_lookup_by_namelibvirt_storagevolume_lookup_by_name($res, $name)
[Since version 0.4.1(-1)]
Function is used to lookup for storage volume by it's name.
| res [resource]: | libvirt storagepool resource |
| @name [string]: | name of the storage volume to look for |
| Returns: | libvirt storagevolume resource |
libvirt_storagevolume_lookup_by_pathlibvirt_storagevolume_lookup_by_path($res, $path)
[Since version 0.4.1(-2)]
Function is used to lookup for storage volume by it's path.
| res [resource]: | libvirt connection resource |
| @path [string]: | path of the storage volume to look for |
| Returns: | libvirt storagevolume resource |
libvirt_storagevolume_get_namelibvirt_storagevolume_get_name($res)
[Since version 0.4.1(-2)]
Function is used to get the storage volume name.
| res [resource]: | libvirt storagevolume resource |
| Returns: | storagevolume name |
libvirt_storagevolume_get_pathlibvirt_storagevolume_get_path($res)
[Since version 0.4.1(-2)]
Function is used to get the storage volume path.
| res [resource]: | libvirt storagevolume resource |
| Returns: | storagevolume path |
libvirt_storagevolume_get_infolibvirt_storagevolume_get_info($res)
[Since version 0.4.1(-1)]
Function is used to get the storage volume information.
| res [resource]: | libvirt storagevolume resource |
| Returns: | storage volume information array of type, allocation and capacity |
libvirt_storagevolume_get_xml_desclibvirt_storagevolume_get_xml_desc($res, $xpath)
[Since version 0.4.1(-1), changed 0.4.2]
Function is used to get the storage volume XML description.
| res [resource]: | libvirt storagevolume resource |
| @xpath [string]: | optional xPath expression string to get just this entry, can be NULL |
| Returns: | storagevolume XML description or result of xPath expression |
libvirt_storagevolume_create_xmllibvirt_storagevolume_create_xml($res, $xml)
[Since version 0.4.1(-1)]
Function is used to create the new storage pool and return the handle to new storage pool.
| res [resource]: | libvirt storagepool resource |
| @xml [string]: | XML string to create the storage volume in the storage pool |
| Returns: | libvirt storagevolume resource |
libvirt_storagevolume_create_xml_fromlibvirt_storagevolume_create_xml_from($pool, $xml, $original_volume)
[Since version 0.4.1(-2)]
Function is used to clone the new storage volume into pool from the orignial volume.
| pool [resource]: | libvirt storagepool resource |
| @xml [string]: | XML string to create the storage volume in the storage pool |
| @original_volume [resource]: | libvirt storagevolume resource |
| Returns: | libvirt storagevolume resource |
libvirt_storagevolume_deletelibvirt_storagevolume_delete($res, $flags)
[Since version 0.4.2]
Function is used to delete to volume identified by it's resource.
| res [resource]: | libvirt storagevolume resource |
| @flags [int]: | optional flags for the storage volume deletion for virStorageVolDelete() |
| Returns: | TRUE for success, FALSE on error |
libvirt_storagepool_get_uuid_stringlibvirt_storagepool_get_uuid_string($res)
[Since version 0.4.1(-1)]
Function is used to get storage pool by UUID string.
| res [resource]: | libvirt storagepool resource |
| Returns: | storagepool UUID string |
libvirt_storagepool_get_namelibvirt_storagepool_get_name($res)
[Since version 0.4.1(-1)]
Function is used to get storage pool name from the storage pool resource.
| res [resource]: | libvirt storagepool resource |
| Returns: | storagepool name string |
libvirt_storagepool_lookup_by_uuid_stringlibvirt_storagepool_lookup_by_uuid_string($res, $uuid)
[Since version 0.4.1(-1)]
Function is used to lookup for storage pool identified by UUID string.
| res [resource]: | libvirt connection resource |
| @uuid [string]: | UUID string to look for storagepool |
| Returns: | libvirt storagepool resource |
libvirt_storagepool_get_xml_desclibvirt_storagepool_get_xml_desc($res, $xpath)
[Since version 0.4.1(-1), changed 0.4.2]
Function is used to get the XML description for the storage pool identified by res.
| res [resource]: | libvirt storagepool resource |
| @xpath [string]: | optional xPath expression string to get just this entry, can be NULL |
| Returns: | storagepool XML description string or result of xPath expression |
libvirt_storagepool_define_xmllibvirt_storagepool_define_xml($res, $xml, $flags)
[Since version 0.4.1(-1)]
Function is used to define the storage pool from XML string and return it's resource.
| res [resource]: | libvirt connection resource |
| @xml [string]: | XML string definition of storagepool |
| @flags [int]: | flags to define XML |
| Returns: | libvirt storagepool resource |
libvirt_storagepool_undefinelibvirt_storagepool_undefine($res)
[Since version 0.4.1(-1)]
Function is used to undefine the storage pool identified by it's resource.
| res [resource]: | libvirt storagepool resource |
| Returns: | TRUE if success, FALSE on error |
libvirt_storagepool_createlibvirt_storagepool_create($res)
[Since version 0.4.1(-1)]
Function is used to create/start the storage pool.
| res [resource]: | libvirt storagepool resource |
| Returns: | TRUE if success, FALSE on error |
libvirt_storagepool_destroylibvirt_storagepool_destroy($res)
[Since version 0.4.1(-1)]
Function is used to destory the storage pool.
| res [resource]: | libvirt storagepool resource |
| Returns: | TRUE if success, FALSE on error |
libvirt_storagepool_is_activelibvirt_storagepool_is_active($res)
[Since version 0.4.1(-1)]
Function is used to get information whether storage pool is active or not.
| res [resource]: | libvirt storagepool resource |
| Returns: | result of virStoragePoolIsActive |
libvirt_storagepool_get_volume_countlibvirt_storagepool_get_volume_count($res)
[Since version 0.4.1(-1)]
Function is used to get storage volume count in the storage pool.
| @res [resource]: | libvirt storagepool resource |
| Returns: | number of volumes in the pool |
libvirt_storagepool_refreshlibvirt_storagepool_refresh($res, $flags)
[Since version 0.4.1(-1)]
Function is used to refresh the storage pool information.
| res [resource]: | libvirt storagepool resource |
| @flags [int]: | refresh flags |
| Returns: | TRUE if success, FALSE on error |
libvirt_storagepool_set_autostartlibvirt_storagepool_set_autostart($res, $flags)
[Since version 0.4.1(-1)]
Function is used to set autostart of the storage pool.
| res [resource]: | libvirt storagepool resource |
| @flags [int]: | flags to set autostart |
| Returns: | result on setting storagepool autostart value |
libvirt_storagepool_get_autostartlibvirt_storagepool_get_autostart($res)
[Since version 0.4.1(-1)]
Function is used to get autostart of the storage pool.
| res [resource]: | libvirt storagepool resource |
| Returns: | TRUE for autostart enabled, FALSE for autostart disabled, FALSE with last_error set for error |
libvirt_storagepool_buildlibvirt_storagepool_build($res)
[Since version 0.4.2]
Function is used to Build the underlying storage pool, e.g. create the destination directory for NFS.
| res [resource]: | libvirt storagepool resource |
| Returns: | TRUE if success, FALSE on error |
libvirt_storagepool_deletelibvirt_storagepool_delete($res)
[Since version 0.4.6]
Function is used to Delete the underlying storage pool, e.g. remove the destination directory for NFS.
| res [resource]: | libvirt storagepool resource |
| Returns: | TRUE if success, FALSE on error |
libvirt_list_storagepoolslibvirt_list_storagepools($res)
[Since version 0.4.1(-1)]
Function is used to list storage pools on the connection.
| res [resource]: | libvirt connection resource |
| Returns: | libvirt storagepool names array for the connection |
libvirt_list_active_storagepoolslibvirt_list_active_storagepools($res)
[Since version 0.4.1(-1)]
Function is used to list active storage pools on the connection.
| res [resource]: | libvirt connection resource |
| Returns: | libvirt storagepool names array for the connection |
libvirt_list_inactive_storagepoolslibvirt_list_inactive_storagepools($res)
[Since version 0.4.1(-1)]
Function is used to list inactive storage pools on the connection.
| res [resource]: | libvirt connection resource |
| Returns: | libvirt storagepool names array for the connection |
libvirt_list_domainslibvirt_list_domains($res)
[Since version 0.4.1(-1)]
Function is used to list domains on the connection.
| res [resource]: | libvirt connection resource |
| Returns: | libvirt domain names array for the connection |
libvirt_list_domain_resourceslibvirt_list_domain_resources($res)
[Since version 0.4.1(-1)]
Function is used to list domain resources on the connection.
| res [resource]: | libvirt connection resource |
| Returns: | libvirt domain resources array for the connection |
libvirt_list_active_domain_idslibvirt_list_active_domain_ids($res)
[Since version 0.4.1(-1)]
Function is used to list active domain IDs on the connection.
| res [resource]: | libvirt connection resource |
| Returns: | libvirt active domain ids array for the connection |
libvirt_list_active_domainslibvirt_list_active_domains($res)
[Since version 0.4.1(-1)]
Function is used to list active domain names on the connection.
| res [resource]: | libvirt connection resource |
| Returns: | libvirt active domain names array for the connection |
libvirt_list_inactive_domainslibvirt_list_inactive_domains($res)
[Since version 0.4.1(-1)]
Function is used to list inactive domain names on the connection.
| res [resource]: | libvirt connection resource |
| Returns: | libvirt inactive domain names array for the connection |
libvirt_list_networkslibvirt_list_networks($res, $flags)
[Since version 0.4.1(-1)]
Function is used to list networks on the connection.
| res [resource]: | libvirt connection resource |
| @flags [int]: | flags whether to list active, inactive or all networks (VIR_NETWORKS_{ACTIVE|INACTIVE|ALL} constants) |
| Returns: | libvirt network names array for the connection |
libvirt_list_nodedevslibvirt_list_nodedevs($res, $cap)
[Since version 0.4.1(-1)]
Function is used to list node devices on the connection.
| res [resource]: | libvirt connection resource |
| @cap [string]: | optional capability string |
| Returns: | libvirt nodedev names array for the connection |
libvirt_nodedev_getlibvirt_nodedev_get($res, $name)
[Since version 0.4.1(-1)]
Function is used to get the node device by it's name.
| res [resource]: | libvirt connection resource |
| @name [string]: | name of the nodedev to get resource |
| Returns: | libvirt nodedev resource |
libvirt_nodedev_capabilitieslibvirt_nodedev_capabilities($res)
[Since version 0.4.1(-1)]
Function is used to list node devices by capabilities.
| res [resource]: | libvirt nodedev resource |
| Returns: | nodedev capabilities array |
libvirt_nodedev_get_xml_desclibvirt_nodedev_get_xml_desc($res, $xpath)
[Since version 0.4.1(-1), changed 0.4.2]
Function is used to get the node device's XML description.
| res [resource]: | libvirt nodedev resource |
| @xpath [string]: | optional xPath expression string to get just this entry, can be NULL |
| Returns: | nodedev XML description string or result of xPath expression |
libvirt_nodedev_get_informationlibvirt_nodedev_get_information($res)
[Since version 0.4.1(-1)]
Function is used to get the node device's information.
| res [resource]: | libvirt nodedev resource |
| Returns: | nodedev information array |
libvirt_network_define_xmllibvirt_network_define_xml($res, $xml)
[Since version 0.4.2]
Function is used to define a new virtual network based on the XML description.
| res [resource]: | libvirt connection resource |
| @xml [string]: | XML string definition of network to be defined |
| Returns: | libvirt network resource of newly defined network |
libvirt_network_undefinelibvirt_network_undefine($res)
[Since version 0.4.2]
Function is used to undefine already defined network.
| res [resource]: | libvirt network resource |
| Returns: | TRUE for success, FALSE on error |
libvirt_network_getlibvirt_network_get($res, $name)
[Since version 0.4.1(-1)]
Function is used to get the network resource from name.
| res [resource]: | libvirt connection resource |
| @name [string]: | network name string |
| Returns: | libvirt network resource |
libvirt_network_get_bridgelibvirt_network_get_bridge($res)
[Since version 0.4.1(-1)]
Function is used to get the bridge associated with the network.
| res [resource]: | libvirt network resource |
| Returns: | bridge name string |
libvirt_network_get_activelibvirt_network_get_active($res)
[Since version 0.4.1(-1)]
Function is used to get the activity state of the network.
| res [resource]: | libvirt network resource |
| Returns: | 1 when active, 0 when inactive, FALSE on error |
libvirt_network_get_informationlibvirt_network_get_information($res)
[Since version 0.4.1(-1)]
Function is used to get the network information.
| res [resource]: | libvirt network resource |
| Returns: | network information array |
libvirt_network_set_activelibvirt_network_set_active($res)
[Since version 0.4.1(-1)]
Function is used to set the activity state of the network.
| res [resource]: | libvirt network resource |
| Returns: | TRUE if success, FALSE on error |
libvirt_network_get_xml_desclibvirt_network_get_xml_desc($res, $xpath)
[Since version 0.4.1(-1)]
Function is used to get the XML description for the network.
| res [resource]: | libvirt network resource |
| @xpath [string]: | optional xPath expression string to get just this entry, can be NULL |
| Returns: | network XML string or result of xPath expression |
libvirt_versionlibvirt_version($type)
[Since version 0.4.1(-1)]
Function is used to get libvirt, driver and libvirt-php version numbers. Can be used for information purposes, for version checking please use libvirt_check_version() defined below.
| type [string]: | optional type string to identify driver to look at |
| Returns: | libvirt, type (driver) and connector (libvirt-php) version numbers array |
libvirt_check_versionlibvirt_check_version($major, $minor, $micro, $type)
[Since version 0.4.1(-1)]
Function is used to check major, minor and micro (also sometimes called release) versions of libvirt-php or libvirt itself. This could useful when you want your application to support only versions of libvirt or libvirt-php higher than some version specified..
| major [long]: | major version number to check for |
| @minor [long]: | minor version number to check for |
| @micro [long]: | micro (also release) version number to check for |
| @type [long]: | type of checking, VIR_VERSION_BINDING to check against libvirt-php binding or VIR_VERSION_LIBVIRT to check against libvirt version |
| Returns: | TRUE if version is equal or higher than required, FALSE if not, FALSE with error [for libvirt_get_last_error()] on unsupported version type check |
libvirt_has_featurelibvirt_has_feature($name)
[Since version 0.4.1(-3)]
Function to check for feature existence for working libvirt instance.
| @name [string]: | feature name |
| Returns: | TRUE if feature is supported, FALSE otherwise |
libvirt_get_iso_imageslibvirt_get_iso_images($path)
[Since version 0.4.1(-3)]
Function to get the ISO images on path and return them in the array.
| @path [string]: | string of path where to look for the ISO images |
| Returns: | ISO image array on success, FALSE otherwise |
libvirt_print_binding_resourceslibvirt_print_binding_resources()
[Since version 0.4.2]
Function to print the binding resources, although the resource information are printed, they are returned in the return_value.
| Returns: | bindings resource information |
libvirt_logfile_setlibvirt_logfile_set($filename, $maxsize)
[Since version 0.4.2]
Function to set the log file for the libvirt module instance.
| @filename [string]: | log filename or NULL to disable logging |
| @maxsize [long]: | optional maximum log file size argument in KiB, default value can be found in PHPInfo() output |
| Returns: | TRUE if log file has been successfully set, FALSE otherwise |