Manage Linux virtual machines - sloopstash/kickstart-linux GitHub Wiki

[!TIP] Check requirements at Home page.

Configure environment variables

# Allowed values for $OS_NAME variable.
* centos-linux-7
* ubuntu-linux-18-04
* ubuntu-linux-22-04
* amazon-linux-2
* alma-linux-8
* alma-linux-9
* rocky-linux-8
* rocky-linux-9

# Allowed values for $OS_ARCHITECTURE variable.
* amd64
* arm64

# Allowed values for $OS_EDITION variable.
* server
* desktop

# Allowed values for $HYPERVISOR variable.
* virtualbox
* vmware

# Store environment variables.
$ export OS_NAME=ubuntu-linux-18-04
$ export OS_ARCHITECTURE=amd64
$ export OS_EDITION=server
$ export HYPERVISOR=virtualbox

Manage Linux virtual machines using Vagrant

Follow the instructions to build and manage Linux virtual machines using Vagrant.

Windows

Open the Git Bash terminal in administrator mode and use the below commands to build and manage Linux virtual machines effectively.

# Switch to Linux starter-kit directory.
$ cd /opt/kickstart-linux

# Boot Linux VM using Vagrant.
$ VAGRANT_CWD=./vagrant/$OS_NAME/$HYPERVISOR/$OS_ARCHITECTURE/$OS_EDITION vagrant up

# SSH to Linux VM using Vagrant.
$ VAGRANT_CWD=./vagrant/$OS_NAME/$HYPERVISOR/$OS_ARCHITECTURE/$OS_EDITION vagrant ssh

# Exit from Linux VM.
$ exit

# Halt Linux VM using Vagrant.
$ VAGRANT_CWD=./vagrant/$OS_NAME/$HYPERVISOR/$OS_ARCHITECTURE/$OS_EDITION vagrant halt

# Provision Linux VM using Vagrant.
$ VAGRANT_CWD=./vagrant/$OS_NAME/$HYPERVISOR/$OS_ARCHITECTURE/$OS_EDITION vagrant provision

# Destroy Linux VM using Vagrant.
$ VAGRANT_CWD=./vagrant/$OS_NAME/$HYPERVISOR/$OS_ARCHITECTURE/$OS_EDITION vagrant destroy

Mac and Linux

Open the terminal and use the below commands to build and manage Linux virtual machines effectively.

# Switch to Linux starter-kit directory.
$ cd /opt/kickstart-linux

# Boot Linux VM using Vagrant.
$ sudo VAGRANT_CWD=./vagrant/$OS_NAME/$HYPERVISOR/$OS_ARCHITECTURE/$OS_EDITION vagrant up

# SSH to Linux VM using Vagrant.
$ sudo VAGRANT_CWD=./vagrant/$OS_NAME/$HYPERVISOR/$OS_ARCHITECTURE/$OS_EDITION vagrant ssh

# Exit from Linux VM.
$ exit

# Halt Linux VM using Vagrant.
$ sudo VAGRANT_CWD=./vagrant/$OS_NAME/$HYPERVISOR/$OS_ARCHITECTURE/$OS_EDITION vagrant halt

# Provision Linux VM using Vagrant.
$ sudo VAGRANT_CWD=./vagrant/$OS_NAME/$HYPERVISOR/$OS_ARCHITECTURE/$OS_EDITION vagrant provision

# Destroy Linux VM using Vagrant.
$ sudo VAGRANT_CWD=./vagrant/$OS_NAME/$HYPERVISOR/$OS_ARCHITECTURE/$OS_EDITION vagrant destroy