How Do I Choose the Best Virtual Machine?

The Linux operating system is a widely used operating system on the server. Although it was not suitable for the general public at first and was not as convenient as the Windows operating system, today's Linux distributions are already as easy to use as Windows, and they are stable and Security has advantages.

linux virtual machine

On a physical computer, one or more virtual computers simulated by software are called virtual machines. The virtual machine uses the hardware resources of the host machine and has most of the functions of a real computer. You can install the operating system supported by the virtual machine software in the virtual machine, for example, you can install linux in the vm virtual machine, or you can install windows in the vm virtual machine, whether your host machine is using a Unix-like system or windows system.
After downloading VMWare, decompress it and install VMWare to the hard disk as prompted.
1 Create a virtual machine
A. Double-click the "VMware workstation" icon on the desktop with the left mouse button and run
linux_About the VMtools installation process
1.Enter LINUX as ROOT
2.Press CTRL + ALT
Press CTRL + ALT to enter
Although Windows Server 2012 R2 enhanced support for Linux virtual machines, some Linux virtual machine problems still exist.
In the latest version of Windows Server operating system, we can see that Microsoft is working hard to strengthen support for Linux virtual machines. We often need to use Linux as a client operating system in Linux virtual machines, but usually these Linux virtual machines face many limitations or lack support for some Linux virtual machine features. Windows Server 2012 R2 has made several improvements to the Linux virtual machine and removed some restrictions on the Linux virtual machine, including the fact that the Linux virtual machine has started to support Hyper-V Dynamic Memory and real-time backup functions. However, these features can play different roles in different Linux virtual machine hairstyle versions, and there are still some potential problems with Linux virtual machines. Administrators should carefully evaluate whether they need to run Linux virtual machines in Hyper-V-if they do-they must be prepared to deal with these Linux virtual machine limitations.
Linux virtual machine problems you may face when running RHEL 6.5-Although Windows Server 2012 and 2012 R2 support Linux virtual machines, if your Linux virtual machine uses RHEL 6.5 as a client operating system, you should pay attention to the following points- Includes some Linux virtual machine features that are disabled by default.
Linux virtual machines do not support secure boot and UEFI-the second-generation Linux virtual machines support the use of UEFI (Unified Extensible Firmware Interface) instead of traditional BIOS. However, in the second generation of Linux virtual machines, some versions of Linux virtual machines do not support UEFI features and secure boot functions.
Prerequisites and potential "pitfalls" for real-time backup of Linux virtual machines-The Windows Server real-time backup feature allows users to create backup copies of Linux virtual machines while the Linux virtual machine is running. But the Linux virtual machine operating system must first meet a number of prerequisites. If you are using a Linux virtual machine, it is even more necessary to confirm what the Linux virtual machine wants to achieve and what links may cause problems.
What problems can NUMA-based Linux virtual machines cause-non-uniform memory access architecture or NUMA is a computer design method. Linux virtual machines can isolate memory and improve system performance. However, some known issues in the Linux virtual machine kernel 2.6.x may cause you some trouble.
Hyper-V bugs may affect Linux virtual machines-The new Hyper-V version does solve many problems that you may encounter when using Linux virtual machines, including Linux virtual machine networking and backup features. However, a known Hyper-V bug may cause the Linux virtual machine to randomly use the network name, which will cause the network connection to be disconnected. So you need to know how to avoid the situation of Linux virtual machine. [1]
Logical volume management
Many recent Linux distributions include the technology of logical volume management (LVM) because it is a disk and partition management that allows administrators to perform a large number of tasks. Some staging features-expanding or staging data across multiple disks-may be less common in a virtualized world, and users typically store data on the same storage area network or data storage area. In addition to these, LVM also provides other interesting features. By enabling LVM, administrators can expand the network file system, expanding different partitions and file systems at work, while keeping the file system online and accessible. According to strict compliance requirements, LVM allows us to perform volume-based snapshots for backup and recovery without invoking the capabilities of vSphere.
My suggestion is to partition LVM and virtual machines if you have a strict availability strategy for your workload and take advantage of online tuning capabilities. If you don't need a lot of uptime or don't plan to install Linux to run on a separate partition, the complexity of LVM will far outweigh the benefits and eventually disable LVM.
Partition options
Linux installed by default usually prompts the user to use all files from only one partition. This is true in some cases, but when you try to adjust and improve the security and performance of the virtual machine, each file has a separate partition such as / tmp, / var, / home, / usr, which is even more so Meaning-especially if you want different installation options for each partition. By using the / etc / fstab file, you can specify the installation options for different partitions on the corresponding lines as follows:
UUID = 0aef28b9-3d11-4ab4-a0d4-d53d7b4d3aa4 / tmp ext4 defaults, noexec 1 2
Web servers, for example. One of the most common use cases is Linux virtual machines. We will soon find that some "default" installation options end up breaking security and performance plans.
Noatime / atime / relatime: These installation options determine how to handle the timestamps contained on the partition file. In older Linux distributions, the default was "once", which meant that the operating system would write a timestamp for the file metadata for each read and write-yes, only the number of read calls. Always use a web server that provides files to the outside world, and you can imagine the overhead of this process. By specifying "noatime" on the web server's data partition, you can reduce the server's overhead by not updating the access time. The new release default option is "relatime", which is very powerful. If the modification time is updated, only the access time is updated.
Noexec / exec: Disable or enable binary file execution on the given partition. For the example of a web server, using "noexec" to mount the / tmp partition makes a lot of sense. In fact, many hardening guidelines recommend using this option for increased security.
Users must exercise caution when changing access time parameters. Some applications, such as email-related features, require a full "one-time" installation option. In the web server example, as long as the security guidelines allow it to access, you can use "noatime" to install the web server data. As far as noexec is concerned, use this option wisely, and many automatic installers and packages are unpacked to / tmp and executed from there. It's easy to turn on and off, but I can at least add noexec for / tmp. [2]
VMXNET3 and PVSCSI
For a long time, everyone has recommended using VMXNET3 network adapters and paravirtualized disk adapters in virtual machines. In a Windows-based virtual machine, we can specify only those drivers that are automatically installed using VMware tools. With this hardware, Linux brings some challenges. First, newer Linux distributions usually have their own VMXNET3 adapters and drivers, and they are used as default drivers even if VMware tools are installed.
Older Linux distributions may include an outdated VMXNET3 driver version, and may not provide you with the full feature set included in the VMware tools version. VMware's KB2020567 outlines how to enable certain features in the VMXNET driver. If you want to install VMXNET3 driver in VMware tools, you can specify the following options during VMware tools installation:
./vmware-install.pl --clobber-kernel-modules = vmxnet3
For low-cost CPUs that want some additional throughput, paravirtualized SCSI adapters are a good way. Be sure to check the list of supported operating systems before making this choice to ensure that the paravirtualized SCSI adapter supports kernel or distribution.
If possible, I recommend administrators use VMXNET3 and PVSCSI. If using an older kernel, install the VMware tool VMXNET3 version. If you use an updated kernel, use the native Linux driver in the distribution.
Memory management
The Linux operating system constantly moves storage pages from physical memory pages to the local swap partition, which is by design. In fact, VMware is doing the same with memory management capabilities. But Linux memory management behaves a bit differently, moving memory pages even if physical memory-currently virtual memory is available. To reduce the swap activity inside the Linux virtual machine, we can adjust a "swapiness" value. Higher values indicate more motion, while lower values indicate that memory does not move. To adjust this value, just add "Vm.swappiness = ##" to /etc/sysctl.conf and replace "##" with the value you want after restarting.
I like to replace this value with a number lower than the default of 60. It doesn't make sense to manage your memory swap using both the operating system and vSphere. Also, it depends on the application, but I usually set this value to 15 to 20. [3]
I / O scheduler
ESXi plays a big role in managing memory, and when it belongs to the I / O scheduler and writes to disk, it assumes another state. In addition, the Linux operating system repeats some of these functions internally. For the 2.6 kernel, most distributions already use Completely Fair Queuing as the default I / O scheduler. Others available are NOOP, Anticipatory and Deadline. VMware only explains how to change this value and why you want to change it. It doesn't make sense to schedule I / O twice. In short, by switching to the grub kernel entry with additional machines, you can switch using the Linux kernel's default I / O scheduler.
There is no need to schedule the operating system first and then the hypervisor. I recommend using the NOOP I / O scheduler because it does not optimize disk I / O and allows vSphere full management.
Remove unused hardware and disable unnecessary services
How many times have you used virtual floppy disks and internal computer speakers in virtual machines in the past year? If you do not plan to use these devices, blacklist them. The command to delete a floppy disk is as follows:
echo "blacklist floppy" | tee /etc/modprobe.d/blacklist-floppy.conf
rmmod floppy
update-initramfs -u
There is also no need to tangle unused hardware. If you are still using it, you may wish to disable any virtual consoles. This can be achieved in / etc / inittab by:
1: 2345: respawn: / sbin / getty 38400 tty1
2: 23: respawn: / sbin / getty 38400 tty2
# 3: 23: respawn: / sbin / getty 38400 tty3
# 4: 23: respawn: / sbin / getty 38400 tty4
# 5: 23: respawn: / sbin / getty 38400 tty5
# 6: 23: respawn: / sbin / getty 38400 tty6
I suggest you remove the floppy disk. Remember that you must also delete the hardware configuration of the virtual machine and disable it in the virtual machine's BIOS. For other services, you can blacklist them, including monitoring disk array configuration (mptctl), pcspker, snd_pcm, snd_page_alloc, snd_timer, snd, snd_soundcore, coretemp, parport and parport_pc.
Before you blacklist these services, make sure you are not using them. At the same time, I will always open a few virtual consoles that may be used, but it is a bit more to open six.
Here are some considerations for running Linux virtual machines. Considering the performance gains, everyone should be on a case-by-case basis. With some minor adjustments, you may see more performance improvements and some degraded performance. As usual, test in a lab environment before making changes. Technology is constantly changing, so best results can be achieved by testing in advance. If you have any other tips or suggestions, you can suggest them in the comments. [4]

IN OTHER LANGUAGES

Was this article helpful? Thanks for the feedback Thanks for the feedback

How can we help? How can we help?