<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Tahoma
}
--></style></head>
<body class='hmmessage'><div dir='ltr'>
<div align="left"><font style="font-size: 10pt;" size="2" face="Arial">Hello...! </font><br><font style="font-size: 10pt;" size="2" face="Arial">I am using libvirt-php for controlling my xen virtual machines. For this I have installed libvirt-php along with xampp server.</font><br><font style="font-size: 10pt;" size="2" face="Arial">Now I need to create a web based controll panel application which shows me running vms, and some options like Shutdown, Pause, Create, Destroy. My aim is, when I click Destroy button the selected vm should be destroyed. For this I have used the following php-script:</font><br></div><font style="font-size: 10pt;" size="2" face="Arial"><br></font><font style="font-size: 10pt;" size="2" face="Courier New"><?php </font><font style="font-size: 10pt;" size="2" face="Courier New"><br></font><font style="font-size: 10pt;" size="2" face="Courier New">    </font><font style="font-size: 10pt;" size="2" face="Courier New"><br></font><font style="font-size: 10pt;" size="2" face="Courier New">    $conn=libvirt_connect("xen:///"); </font><font style="font-size: 10pt;" size="2" face="Courier New"><br></font><font style="font-size: 10pt;" size="2" face="Courier New">    $name=libvirt_domain_lookup_by_id($conn,4); // Here '4' is the id of my running vm</font><font style="font-size: 10pt;" size="2" face="Courier New"><br></font><font style="font-size: 10pt;" size="2" face="Courier New">    $dest=libvirt_domain_destroy($name);</font><font style="font-size: 10pt;" size="2" face="Courier New"><br></font><font style="font-size: 10pt;" size="2" face="Courier New">    echo $dest; </font><font style="font-size: 10pt;" size="2" face="Courier New"><br></font><font style="font-size: 10pt;" size="2" face="Courier New"><br></font><font style="font-size: 10pt;" size="2" face="Courier New">?>  </font><font style="font-size: 10pt;" size="2" face="Arial"><br></font><font style="font-size: 10pt;" size="2" face="Arial"><br></font><font style="font-size: 10pt;" size="2" face="Arial"><br></font><font style="font-size: 10pt;" size="2" face="Arial">When I execute this it shows me following warning:</font><font style="font-size: 10pt;" size="2" face="Arial"><br></font><font style="font-size: 10pt;" size="2" face="Arial"><br></font><b><font style="font-size: 10pt;" size="2" face="Arial">Warning: libvirt_domain_destroy() [function.libvirt-domain-destroy]: operation virDomainDestroy forbidden for read only access in /opt/lampp/htdocs/xampp/xen/test.php on line 5</font><font style="font-size: 10pt;" size="2" face="Arial"><br></font></b><font style="font-size: 10pt;" size="2" face="Arial"><br></font><font style="font-size: 10pt;" size="2" face="Arial"><br></font><font style="font-size: 10pt;" size="2" face="Arial">So, Could you please help me to solve this? </font><font style="font-size: 10pt;" size="2" face="Arial"><br></font><font style="font-size: 10pt;" size="2" face="Arial"><br></font><font style="font-size: 10pt;" size="2" face="Arial">! Thank You !</font><font style="font-size: 10pt;" size="2" face="Arial"><br></font><br>                                          </div></body>
</html>