Skip to content

vijayakumar75/vbox-scripts

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

============================================================================================ shell scripts for VMs provisioning, cloning in VirtualBox on top of ZFS Volumes (ZVOLs)

vm-create.sh

  • creates new VM with given pramaters

accepts vm name as a first input argument (mandatory) other optional arguments (in a given order):

  • ostype (default: OpenBSD_64)
  • number of vcpu (default: 1)
  • amount of RAM (in MB) (default: 256)
  • size of ZFS Volume (default value is 7G)

NOTE: paths to the zvol hardcoded into the script custom-tailoring and renaming may be required


zvol-snapshot.sh

  • check for a VirtualBox snapshots for a given VM name (mandatory argument) and if VM is not running
  • then create zfs snapshot for a VM's zfs volume

snapshots naming convention:

  • new snapshot will be named ${PATH_TO_ZVOL}@Clean
  • any existsing ZFS snapshot will be renamed to ${PATH_TO_ZVOL}@Previous

NOTE: paths to the zvol hardcoded into the script custom-tailoring and renaming may be required


vm-clone.sh

  • clone VM and underlying ZVOL with a given parameter:

accepts SOURCE and TARGET vm names as a first and second input arguments (mandatory) other optional arguments (in a given order):

  • number of vcpu for TARGET VM (default: 1)
  • amount of RAM (in MB) for TARGET (default: 256)

NOTE: paths to the zvol hardcoded into the script custom-tailoring and renaming may be required.


vm-destroy.sh

  • delete specisfied VM from Virtualbox repository and
  • destroy underlaying ZFS Volume

pass VM name as an input parameter


About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Shell 100.0%