Skip to content
This repository has been archived by the owner on Jul 19, 2024. It is now read-only.
/ libvirt-php Public archive
forked from libvirt/libvirt-php

Based on official libvirt-php, with some additional functions.

License

Notifications You must be signed in to change notification settings

yzslab/libvirt-php

 
 

Repository files navigation

libvirt-php

About this forked repository

Seems like the official libvirt-php isn't being maintenanced by anyone, contributions sent to libvirt-list was ignored, so this repository appeared.

Additional functions

resource libvirt_domain_snapshot_create_xml(resource $domain, string $xml, int $flags = 0)
bool libvirt_domain_undefine_flags(resource $domain, int $flags = 0)
bool libvirt_domain_reset(resource $domain, int $flags = 0)

int libvirt_get_last_error_code()
int libvirt_get_last_error_domain()

array libvirt_network_get_dhcp_leases(string $mac = null, int $flags = 0)
array libvirt_domain_get_cpu_total_stats()

Additional constants

enum virDomainUndefineFlagsValues {
    VIR_DOMAIN_UNDEFINE_MANAGED_SAVE	=	1 (0x1; 1 << 0)	
    Also remove any managed save
    
    VIR_DOMAIN_UNDEFINE_SNAPSHOTS_METADATA	=	2 (0x2; 1 << 1)	
    If last use of domain, then also remove any snapshot metadata
    
    VIR_DOMAIN_UNDEFINE_NVRAM	=	4 (0x4; 1 << 2)	
    Also remove any nvram file
    
    VIR_DOMAIN_UNDEFINE_KEEP_NVRAM	=	8 (0x8; 1 << 3)	
    Keep nvram file Future undefine control flags should come here.
}

enum virStorageVolDeleteFlags {
    VIR_STORAGE_VOL_DELETE_NORMAL	=	0 (0x0)	
    Delete metadata only (fast)
    VIR_STORAGE_VOL_DELETE_ZEROED	=	1 (0x1; 1 << 0)	
    Clear all data to zeros (slow)
    VIR_STORAGE_VOL_DELETE_WITH_SNAPSHOTS	=	2 (0x2; 1 << 1)	
    Force removal of volume, even if in use
}

Origin README content

Bugfix libvirt-php required for KnightSwarm/Squire

Fixes:

  1. Fix libvirt_domain_update_device not being properly defined. 8bb78b3cfb

  2. Fix libvirt_storagepool_get_xml_desc requiring OPTIONAL second parameter for xPath. f89fb516ad

About

Based on official libvirt-php, with some additional functions.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C 90.9%
  • PHP 3.3%
  • C++ 2.4%
  • Objective-C 1.6%
  • M4 1.2%
  • Shell 0.3%
  • Makefile 0.3%