Add a "vm restart guest" command

This causes a guest shutdown but then restarts the guest without requiring a full
reload or destroying/re-creating network devices.
This commit is contained in:
Matt Churchyard
2018-10-09 11:09:09 +01:00
parent edbcf6eed3
commit 5df10f2408
6 changed files with 40 additions and 5 deletions

View File

@@ -24,8 +24,8 @@
# IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
CMD_VALID_LIST="init,switch,datastore,image,get,set,list,create,destroy,rename,install,start,stop,add"
CMD_VALID_LIST="${CMD_VALID_LIST},reset,poweroff,startall,stopall,console,iso,configure,passthru,_run"
CMD_VALID_LIST="init,switch,datastore,image,get,set,list,create,destroy,rename,install,start,stop,restart"
CMD_VALID_LIST="${CMD_VALID_LIST},add,reset,poweroff,startall,stopall,console,iso,configure,passthru,_run"
CMD_VALID_LIST="${CMD_VALID_LIST},info,clone,snapshot,rollback,send,recv,version,usage"
# cmd: vm ...
@@ -74,6 +74,7 @@ cmd::parse(){
install) core::install "$@" ;;
start) core::start "$@" ;;
stop) core::stop "$@" ;;
restart) core::restart "$@" ;;
add) core::add "$@" ;;
reset) core::reset "$@" ;;
poweroff) core::poweroff "$@" ;;