Virtualization administrators are constantly on the hunt for virtualization techniques to help make their work...
faster, more manageable and better optimized.
The number of virtualization tools keeps growing, so admins must find the best use cases and strategies for each product.
Relatively new tools, such as Ansible, provide renewed automation possibilities. Meanwhile, standbys such as PowerShell and PowerCLI still offer new ways to manage infrastructure components. Core virtualization services, such as Hyper-V, System Center Virtual Machine Manager (SCVMM) and vCenter also continue to offer new capabilities to admins willing to further optimize and customize settings to fit their deployments.
Review our top nine articles of the year to learn the best virtualization techniques going into 2019.
File management gets easier in Hyper-V
Previous versions of Hyper-V made it difficult to copy files to VMs, but with Hyper-V running on Windows Server 2012 R2 or later, admins have numerous options to copy files from hosts to VMs.
Admins can use Enhanced Session Mode to copy files or share local host resources with Hyper-V VMs. To do this, admins must first enable a series of settings, including guest Integration Services and Remote Desktop Service. Admins who prefer command-line interfaces can also use the Copy-VMFile cmdlet in PowerShell to copy files from hosts to VMs.
Automate VM deployments with Ansible templates
Admins looking for virtualization techniques to make their work easier and faster have a lot of options. For admins who manage KVM environments, Ansible provides a compelling way to automate the provisioning of KVM machines.
If admins define their VMs as code, they can use various virt modules to manage KVM networks, storage pools and VMs. Admins can create an Ansible task that uses a customizable template as its configuration source, name Ansible variables that drive the task and create a custom module to rapidly create VM clones.
Rapidly deploy and restore Hyper-V VMs with Sysprep
Microsoft provides the System Preparation tool (Sysprep) to help Hyper-V admins who want to hasten VM deployments and generalize virtual and physical machines. The VM images that Sysprep generalizes take less time to configure, are ready for production sooner and offer faster restoration for disaster recovery.
Admins must install an OS that supports the /mode:VM option, execute a Sysprep command, and copy the relevant VHD or VHDX files. This process removes unnecessary drivers and support files, which reduces the size of the image and enables faster OS booting.
Size servers right with these four criteria
Figuring out how many VMs fit on a server is a common struggle for admins, but with four criteria in mind, they can match hardware and virtual environments and ensure they choose the right servers.
Typically, admins install the maximum amount of RAM on a host server. But for virtual servers, admins should instead install the minimum amount a VM needs and then add from there as necessary. Memory issues are most likely to cause server sizing mistakes, but admins should also ensure they have enough CPU cores, use at least four network interface cards and plan to have more resources than necessary to avoid resource constraints.
Install VMs from the command line with virt-install
Virt-install is a compelling virtualization technique for admins who want to automate VM installation from the command line. To execute virt-install, admins must either use a GUI that uses a virtual network computing client or use a kickstart file to provide the information a GUI would ask for.
Admins can use a script to run virt-install and verify that it is running with virsh. Admins can further expand their virtualization techniques with a wide variety of commands that can locate files, specify memory and choose the types of VMs to install.
Weigh the costs and advantages of Hyper-V management tools
The ability to properly weigh the costs of a product against its benefits is an important skill. With Hyper-V, admins can use Hyper-V Manager, which is free, or SCVMM, which is a separate product with a distinct pricing plan.
Judicious admins, especially if they're in smaller organizations, might find Hyper-V Manager fulfills many of their needs. However, if admins need greater scalability across many VMs and hosts, they should choose SCVMM because it offers better consolidation and automation options.
Control VMware infrastructures with PowerCLI
VMware admins should add PowerCLI command knowledge to their arsenal of virtualization techniques. Get-VM is a core command that gets the names and statuses of all the VMs, but admins can also chain other commands to it to find specific servers and export the uncovered data to a file. By default, these cmdlets only reveal some of the information available, but admins can use pipelines to access and use even more fine-grained information.
Get around Generation 2 VM limitations with PowerShell
Commands also come in handy for admins who want to manage external media with PowerShell. Generation 2 VMs don't support a physical DVD drive, which means admins who want to use DVD media must instead mount an ISO file on a virtual DVD drive.
An advantage of this method is that admins can mount an ISO file to numerous VMs and script bulk operations, whereas Generation 1 VMs can only use one physical DVD drive. With a few PowerShell cmdlets and the VMDvdDrive command, admins can check VM mappings, detach and reattach ISO files, and add a SCSI virtual DVD drive.
Enable production-ready nested virtualization in Hyper-V
Windows Server 2016 makes Hyper-V nested virtualization easy, but admins must be careful about using it in production. Nested virtualization is most common in test/dev environments, but it can offer production-ready private cloud functionality, such as self-service provisioning, to departments that need to create their own Hyper-V VMs, but that don't warrant an entire private cloud. Admins considering this path must meet a variety of system requirements and consider network configurations, storage performance effects and memory limitations.