Esempio n. 1
0
 /**
  * Start
  *
  * @return bool
  */
 public function powerOn()
 {
     return (bool) libvirt_domain_create($this->domain);
 }
 function domain_start($dom)
 {
     $dom = $this->get_domain_object($dom);
     if ($dom) {
         $ret = libvirt_domain_create($dom);
         $this->last_error = libvirt_get_last_error();
         return $ret;
     }
     $ret = libvirt_domain_create_xml($this->conn, $dom);
     $this->last_error = libvirt_get_last_error();
     return $ret;
 }
Esempio n. 3
0
/**
 * start 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_start($vm_virt_id)
{
    global $host_conn;
    $vm_res = libvirt_domain_lookup_by_name($host_conn, $vm_virt_id);
    ace_kvm_log_last_error();
    $result = libvirt_domain_create($vm_res);
    ace_kvm_log_last_error();
    return $result;
}