Skip to content

guolunwei/vm_manager

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Virtual Machine Management Script

This script provides functionality to manage virtual machines (VMs) based on a template snapshot. It supports listing, cloning, removing, starting, stopping, restarting and setting the IP address of VMs.

Prerequisites

  • Install Git for Windows.
  • Install VMware Workstation and and put vmrun.exe in Git's PATH.
  • Create a vm, take a snapshot of it, then modify the config.ini configuration.

Installation

git clone https://github.com/guolunwei/vm_manager.git
chmod -R +x vm_manager/*.sh

cd vm_manager
./set_env.sh

source /etc/profile

# Modify configurations
vim /path/to/vm_manager/config.ini

Usage

Usage: vm [command] [arguments]

Available commands:
  list       List running or all VMs     vm list [--all]
  clone      Clone one or more VMs       vm clone <vm_name> [...]
  remove     Remove one or more VMs      vm remove <vm_name> [...]
  start      Start one or more VMs       vm start <vm_name> [...]
  stop       Stop one or more VMs        vm stop <vm_name> [...]
  restart    Restart one or more VMs     vm restart <vm_name> [...]
  setip      Set IP address of a VM      vm setip <vm_name> <ip_addr>
  ssh        SSH into a VM               vm ssh <vm_name>

For example:
  vm clone web1 web2
  vm setip web1 192.168.88.100

About

VMware Workstation VM Management Script

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages