LinuxVirtualization
Linux Virtualization - Using Linux to Host Other Operating Systems on Top of Linux!
Linux is such a powerful operating system that is already has virtualization built into the Linux Kernel! This makes setting up virtualization on a Linux machine very simple, and easy to setup. Even the commercial virtualization softare often is based on the Linux Kernel, even VMware ESXi and vSphere is based on a heavily modified Linux kernel.
There are many options when using Linux to host virtual machines. For beginners, I find that the easiest route is by using the FREE virtualization software tools by Oracle, called VirtualBox. I LOVE VirtualBox, and used it for many years to quickly and easily create virtual macines, not only an a Linux host, but also on Windows and MAC host machines! And yes, it's TOTALLY FREE for all versionks of VirtualBox. I have created hundreds of custom shell command-line scripts over the years to manage over 100 virtusla machines running on top of VirtualBox
Here's an example of a very basic, simple shell script that starts up a Linux VM(Virtual Machine) from the command line, in headless mode:
#!/usr/bin/bash # Jamie - 10-03-2020 # FreeIPA_Server1-startvm - Start FreeIPA Server #1 on CentOS 8 in Headless mode # Now starts the RockyLinux I now have from migrating the original CentOS 8 echo "" vboxheadless --startvm FreeIPA_Server-1 & echo "Please stand by while the VM starts up..." sleep 20 echo "" echo "The FreeIPA Server takes a LONG time to start up..." echo "" echo "Please be patient and stand by..." echo "" sleep 90 echo "" echo "Almost there..." echo "" sleep 20 echo "" echo "The FreeIPA Server VM is now running!" echo ""
This, like all shell scripts, just have executable permissions in order to run from the command-line. The easiest way to ensure and/or change the permissions of the script file is to use the chmod command, like this:
[jamie@server.dawgland.com:~$ sudo chmod 755 ansctrl8-StartVM [jamie@server.dawgland.com:~$