예제 #1
0
		function domain_snapshots_list($domain) {
			$tmp = libvirt_list_domain_snapshots($domain);
			return ($tmp) ? $tmp : $this->_set_last_error();
		}
예제 #2
0
function ace_kvm_vm_delete_snapshots($vm_virt_id)
{
    global $host_conn;
    $result = FALSE;
    $vm_res = libvirt_domain_lookup_by_name($host_conn, $vm_virt_id);
    ace_kvm_log_last_error();
    $vm_snapshot_list = libvirt_list_domain_snapshots($vm_res);
    ace_kvm_log_last_error();
    foreach ($vm_snapshot_list as $vm_snapshot) {
        $vm_snapshot_res = libvirt_domain_snapshot_lookup_by_name($vm_res, $vm_snapshot);
        ace_kvm_log_last_error();
        # there's a problem with the flag VIR_SNAPSHOT_DELETE_CHILDREN here
        $result = libvirt_domain_snapshot_delete($vm_snapshot_res);
        ace_kvm_log_last_error();
    }
    $return = $result;
    return $return;
}