/** * Forced Shutdown * * @return bool */ public function forceOff() { return (bool) libvirt_domain_destroy($this->domain); }
function domain_destroy($domain) { $dom = $this->get_domain_object($domain); if (!$dom) { return false; } $tmp = libvirt_domain_destroy($dom); return $tmp ? $tmp : $this->_set_last_error(); }
/** * stop 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_stop($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_destroy($vm_res); ace_kvm_log_last_error(); ace_kvm_vm_match_nic_link_states_to_networks($vm_virt_id); return $result; }