From 90bc1264e7f7f829ceea6928d57b5a12c733c7e7 Mon Sep 17 00:00:00 2001 From: Akkariin Meiko <34357771+kasuganosoras@users.noreply.github.com> Date: Fri, 28 Sep 2018 15:06:29 +0800 Subject: [PATCH] Update README.md --- README.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/README.md b/README.md index fe76c17..3b26e90 100644 --- a/README.md +++ b/README.md @@ -10,6 +10,8 @@ This project is to make it easier for developers to manage virtual machines. You need install php_ssh2 module to use this manager. +Maybe this document has some grammatical mistakes, because the author is Chinese :P + ### Example code for connect a server ```php @@ -78,4 +80,18 @@ This method can get any registered virtual machine xml config file and return. ```php String dumpxml ( Name ) ``` +#### Clone an exist virtual machine +You can use this method to clone a exist virtual machine. + +This method may take a long time, you need add a line `set_time_limit(120)` in your code. +```php +String cloneVM ( Name, New name, New disk path ) +``` +#### Set the virtual machine network +This method can control the virtual machine network. + +The third param is Boolean type, if you give it a true value, the network will going start, else the network will going off. +```php +String setNetwork ( Server, Network name, Status ) +``` You can find out more info in `libvirt/libvirt.php`