VMware’s Linux virtualized host solution has become a popular choice for many IT pros looking to build their own virtual machines and to keep their IT infrastructure running efficiently.
But, in order to get a virtual machine running, you’ll need to learn about virtualization, hardware, and configuration.
In this article, we’ll show you how to set up a Linux virtual machine on VMware vCenter Server 5 and the VMware ESXi host that you’ll be using in the next article.
In the first part of the article, you can learn how to install and configure virtual machines on VMware ESX and vCenter.
In a future article, I’ll show how to create a virtual server in the vSphere 6 cloud, with all the hardware needed to boot a virtualized server.
In that article, it’ll also cover how to configure a virtual appliance, which is an optional step in virtualization.
VMware vMotion in ESXi and vSphere¶ VMware’s vSphere host is built with a Linux-based kernel.
The vSphere Linux kernel is a proprietary Linux kernel developed by VMware.
This kernel was released in 2016, and it has a large number of new features, including the ability to execute virtual machines, virtual CPUs, and virtual network adapters.
For the purposes of this article though, we’re going to assume you’re running Linux.
As with any Linux kernel, you should be able to install, configure, and manage a Linux VM from VMware’s download site.
For example, if you have VMware vCloud Director installed, you might have a few things you want to configure.
For this article we’re just going to use the default configuration that’s included with the Linux kernel.
If you don’t have VMware’s latest version of VMware Linux, you will need to configure the default Linux kernel using the Linux Kernel Configuration Tool (LKCTool).
The LKCTools documentation on the VMware web site includes some instructions on how to use this tool.
If we click on the “Linux Kernel Configuration” link on the right, we can select a Linux kernel from the dropdown list.
You can see the LKctools documentation for our example Linux kernel here.
To configure the Linux virtual guest, we first need to make sure we have all of the required configuration information in place.
Open up the Lkctools configuration file for the Linux guest.
The LkCTools configuration files are located at /etc/lkctool/lkswitch.conf.
We’re going use the /etc directory for our virtual machine configuration files.
To find the Lkswitch file, open up a terminal window and type the following command: sudo cat /etc/$USER/lkinit_linux.conf Lksname Linux Virtual Host System Name Linux Virtual Machine Type Virtual Machine Bootstrap Size 512MB MaxCPU 100 MaxMemory 1024M MaxFreeSpace 512M MaxSMB 100M LksConfigFile /etc/.lksconfig Lksconfig file for this virtual machine.
We need to change the LKSNAME variable to the Linux name we’re using in this example.
We want to use “linux” as the name for the virtual machine name.
Lks name is the same as the file name that the virtual machines bootloader uses when configuring the virtual hosts.
To change the default LKS name, we just need to add a new line to the LSKConfigFile variable, and then uncomment the existing line.
LKSname = “Linux Virtual Host” LksnapFile /var/run/lki.sock LksvCPU_Load = 2 LksVCPU_Memory = 64 LksSMB_Size = 512 LksFreeSpace_Size= 256 LksNumVirtualHosts = 1 The LksLoaded_CPU and LksMemory variables tell the virtual processor and memory that the LLSNAP file contains.
We use these variables because the virtual processors and memory on the host are not loaded in the kernel and we want them to run asynchronously when the host is up and running.
The CPU_Load and CPU_Memory variables also tell the processor and virtual memory how much memory to allocate on the virtual CPU and virtual CPU cache lines.
These variables tell which virtual CPUs are active.
When we load our LLSnap file into the kernel, we use the LTS and LTS_FIFO_UNLOAD instructions to tell the kernel how many virtual CPUs the kernel has to allocate for the new virtual machines.
You should now be able start a new virtual machine by running the following commands: sudo /usr/bin/vmk start Starting the VM…
Running VM from a virtual host…
Creating a virtual CPU…
Creating virtual CPU Cache…
Starting the Linux Virtual Server…
LksGuestName = “Virtual Host” In this example, we’ve just started a virtual virtual machine, but we can easily start a