VM Management Introduction
A virtual machine is a computer that, like any physical computer, runs an operating system and has various applications. It provides an x86-based hardware platform. A virtual machine behaves exactly like a physical computer and contains its own virtual CPU, RAM, and NIC. It comprises a set of specification and configuration files and is backed by the physical resources of a host. Each virtual machine has virtual devices that provide the same functionality as the physical hardware and have additional benefits in terms of portability, manageability, and security.
The virtual machine monitor or VMM sends requests for computer resources on behalf of its virtual machine to the ESXi hypervisor, known as the VMkernel. In turn, the VMkernel presents the VMM's resource requests to the physical hardware.
Steps to create Virtual Machine : vSphere Client is the main console from which you deploy and manage virtual machines.
Creating a new virtual machine is a three-step process. First, you start the Create New Virtual Machine wizard to create a virtual machine.
Next, you install the OS just like you would for any new physical machine. An OS running in a virtual machine is referred to as the guest OS.
A faster and often more convenient method is to install the guest OS from the ISO image file of the OS installation media.
First, you need to copy the image file to either a NFS or VMFS datastore. Then, to install a guest OS from an ISO image, you have to configure the virtual machine’s CD or DVD drive to connect to the ISO image. Always make sure to check the “Connect at power on” so that the ISO image is seen within the virtual machine. Then you can proceed with the OS installation process.
Finally, you install VMware Tools into the guest OS. VMware Tools provide two very visible benefits: better video performance and the ability to move the mouse pointer freely into and out of the console window. VMware Tools contains virtual device drivers and boosts the performance and manageability of the virtual machine. The VMware Tools installation wizard automatically selects the VMware Tools version appropriate for the OS running in the virtual machine..
Virtual Machine Power Options : The power state of a virtual machine indicates whether or not the virtual machine is active and functional. There are four basic power states, which you can access by right-clicking a virtual machine in the inventory and selecting Power.
The Power On command powers on the virtual machine and boots the guest OS or resumes the virtual machine when it is suspended. The Power Off command powers off the virtual machine. This works the same way as when you shut down a physical machine by switching off the power switch directly instead of using the Shutdown command.
The next power command is Suspend. This command pauses the virtual machine activity. All transactions are frozen until you issue the Power On command to release the suspended state and resume the virtual machine activity. The last power command, Reset, resets the virtual machine when VMware Tools is not installed. It restarts the guest OS when VMware Tools is installed and available. If the OS does not support an automatic shutdown before the reset operation, then VMware Tools must be installed so that the OS can shut down appropriately.
There are two power options available when you install VMware Tools. The Shut Down Guest option shuts down the guest OS and the Restart Guest option shuts down and restarts the guest OS without powering off the virtual machine.
You can also configure automatic startup and shutdown properties for virtual machines, so that they start and stop automatically with the host system.
Templates : A template is a master copy of a virtual machine that can be used to create and provision new virtual machines. The template image usually includes a specific OS, one or more applications, and a configuration that provides virtual counterparts to hardware components. Templates coexist with virtual machines in the inventory and cannot be powered on or edited. You can view templates in the VMs and Templates inventory view.
Virtual machines can be converted into templates without requiring a full copy of the virtual machine files and the creation of a new object. Templates can be stored in a VMFS datastore or an NFS datastore.
If you want to edit a template, you must first convert the template to a virtual machine and then make your changes. For example, you might apply the latest patch to your application. Finally, convert the edited virtual machine back to a template.
Cloning VM : Cloning a virtual machine is an alternative to deploying a virtual machine from a template. Instead of creating a template and deploying virtual machines from it, you create a copy, or make a clone of the virtual machine. The virtual machine being cloned can either be powered on or powered off.
Customizing the Guest OS: When you clone a virtual machine or deploy a virtual machine from a template, you can customize the guest OS of the virtual machine to change properties such as the computer name, network settings, and license settings.
Removing the VM from the Inventory: vSphere Client has two commands for removing virtual machines from the inventory. These are Remove from Inventory and Delete from Disk.
The Remove from Inventory command unregisters the virtual machine from both the
vCenter Server inventory and the host on which it is located. However, the virtual machine files remain at the same storage location so that you can re-register the virtual machine at a later time.
The Delete from Disk command permanently removes the virtual machine and its files from storage location. The vCenter Server removes all references to the virtual machine and it is no longer tracked
in the inventory
Snapshot : Virtual machine snapshots allow you to preserve the state of a virtual machine, so that you can return to the same state repeatedly. Snapshots are useful when you need to switch between states, but you do not want to create multiple virtual machines.
A snapshot captures the entire state of the virtual machine at that point in time. This includes:
- The contents of the virtual machine’s memory,
- The virtual machine settings, and
- The virtual machine’s virtual disks.
Please note that capturing virtual machine memory within the snapshot is optional because it will consume a significant amount of hard disk space in the datastore.
You can take a snapshot while a virtual machine is powered on, powered off, or suspended. If the virtual machine has multiple disks in different disk modes, then you must Power off the virtual machine before taking a snapshot.
Update Manager: Update Manager is a simple patch management solution for the virtual infrastructure. It applies security updates and bug fixes to reduce risks from vulnerabilities.
Update Manager is a vCenter Server plug-in that allows you to apply updates and patches across all ESXi hosts. It is used to install and update third-party software on hosts and it is used to upgrade virtual machine hardware, VMware Tools, and virtual appliances. It enables centralized, automated patch and version management from within VMware vSphere Server. Security administrators can compare ESXi hosts, as an example, against these baselines to identify and remediate systems that are not in compliance.
host baselines and virtual machine baselines are the two types of baselines available within Update Manage
Importing and Exporting: vSphere Client allows you to import and export virtual machines, virtual appliances, and vApps so that you can share these objects between products and organizations.
In vCenter Server inventory. Virtual machines, virtual appliances, and vApps are stored in the Open Virtual Machine Format or OVF. OVF is a file format that allows for the exchange of virtual machines, virtual appliances, and vApps across products and platforms
Migration : You can migrate virtual machines from one host to another or from one datastore to another.
There are 2 methods.
The first method is cold migration and the second is hot migration, also known as vMotion migration. If a virtual machine is powered off or suspended during migration, we refer to the process as cold migration. With a cold migration of a virtual machine, the source and target host does not require shared storage. A cold migration is a general purpose tool for moving virtual machines between hosts, datastores, and datacenters, as long as the virtual machine is powered off or suspended.
If a virtual machine is powered on, we refer to the process as a hot migration. A hot migration is performed using vMotion. vMotion allows you to migrate virtual machines between hosts with no downtime to the virtual machines.
In order to perform the migration, the virtual machines must be located on shared storage, accessible by both the source and destination hosts. It is not possible to migrate virtual machines across datacenters using vMotion. vMotion also allows you to improve hardware utilization and schedule hardware downtime. vMotion is required if you are using VMware Distributed Resource Scheduler or DRS, as it allows DRS to balance virtual machines across hosts in the DRS cluster
VMDirectPath I/O is a technology that improves CPU efficiency by allowing device drivers in virtual machines to bypass the virtualization layer. This allows the device drivers to directly access and control a physical device. VMDirectPath I/O relies on DMA Address Translation in an I/O memory management unit to convert guest physical addresses to host physical addresses. VMDirectPath I/O supports a direct device connection for virtual machines running on Intel Xeon 5500 systems, which have an I/O memory management unit called Virtual Technology for Directed I/O.
while the virtual machine gains performance (mostly CPU), it loses many virtualization features, such as vMotion, virtual device hot add, and virtual machine suspend and resume. Each virtual machine supports up to six PCI DirectPath devices
Hot Extending Virtual Disk : Virtual machine virtual disks can be extended while the virtual machine is running. This is referred to as hot extending a virtual disk. You can hot extend a virtual disk, as long as the virtual machine does not have any snapshots.
Hot adding memory and CPU : Virtual machines configured for either hardware version 7 or 8 provides full support for adding both memory and virtual processors to a virtual machine, without having to power off the virtual machine. This is referred to as hot adding memory and CPU.
Hot add functionality is available only on a few guest operating systems, for example, Windows Server 2008.
No comments:
Post a Comment