function domain_suspend($domain)
 {
     $dom = $this->get_domain_object($domain);
     if (!$dom) {
         return false;
     }
     $tmp = libvirt_domain_suspend($dom);
     return $tmp ? $tmp : $this->_set_last_error();
 }
Exemplo n.º 2
0
/**
 * suspend a virtual machine on the virt host
 *
 * @global  resource $host_conn  libvirt connection
 *
 * @param   string   $vm_virt_id virt_id of the vm
 *
 * @return  bool                 on success
 */
function ace_kvm_vm_suspend($vm_virt_id)
{
    global $host_conn;
    $vm_res = libvirt_domain_lookup_by_name($host_conn, $vm_virt_id);
    ace_kvm_log_last_error();
    $return = libvirt_domain_suspend($vm_res);
    ace_kvm_log_last_error();
    return $return;
}