Libvirt Functions
PHP Manual


(php-libvirt 0.1)

libvirt_domain_get_idGet the hypervisor ID number for the domain


integer libvirt_domain_get_id ( resource $domain )

Get the hypervisor ID number for the domain. Is valid only for running domains. For more unique ID use libvirt_domain_get_uuid_string() or libvirt_domain_get_uuid(). These functions are valid for all domains not only for active ones.



Domain resource of domain to look up. You can get domain resource using various functions (i.e. libvirt_domain_lookup_by_uuid() or libvirt_list_domains()). Valid only for running (active) domains.

Return Values

Hypervisor ID of the domain.

See Also

Libvirt Functions
PHP Manual