3.2 - VirtualClusters
3.2 - VirtualClusters
Shajulin Benedict
shajulin@iiitkottayam.ac.in
Indian Institute of Information Technology Kottayam
www.sbenedictglobal.com
Preview
• Discussed Topics
• Virtualization – creation of virtual machines
– It is a crucial enabler of Cloud Computing.
• Levels of virtualization
• S/w level
– We discussed the virtualization mechanisms/tools (Type I / Type
II)
• H/w level
– Virtualization of CPU, Memory
2
Agenda
• Virtual Clusters
• Resource management of VCs (Automation)
• The concept of live migration
www.sbenedictglobal.com
Physical Cluster to Virtual Cluster
• Virtual Cluster (VC)?
• In general, a physical cluster is a collection of servers
(Machines) interconnected via. a physical network.
• Think about the clustering concepts of SuperMUC.
• Now, we have to learn about virtual clusters (connections of
VMs and virtual switches/networks).
• Eg. VMWare 4
www.sbenedictglobal.com
Virtual Clusters
• Virtual clusters consists of
• multiple VMs
• These VMs are logically connected to distributed servers via.
a virtual network.
• Virtual clusters could be configured-- similar to how VMs could
be configured with a set of vCPUs, memory, and so forth,
• Dynamic provisioning of VMs is typically practiced in
VMClusters.
•
Cluster - 1 Cluster - 2 Cluster - 3
VirtCluster - 1
VirtCluster - 2
Cloud Computing 5
www.sbenedictglobal.com
Virtual Clusters – Design Aspects
• Design Aspects of Virtual Clusters include
• Live migration of VMs.
• Live migration of memory and file systems.
• Dynamic deployment (runtime) of Virtual clusters.
www.sbenedictglobal.com
Dynamic Provisioning - Characteristics
• Dynamic provisioning of VMs to the available VCs has
the following properties.
• Physical or virtual nodes could be included for the
provisioning.
• A VM runs with a guest OS.
• VMs could be replicated across multiple servers
– For reliability, fault tolerance, or disaster recovery.
• The VMs can be inside the firewall or outside the firewall.
• The no.of machines could be dynamically increased or
decreased.
• The failure in any physical server can pull down the running
VMs, but the system continues.
www.sbenedictglobal.com
Dynamic Provisioning - strategies
• Effective implementation strategies of a Virtual Cluster
requires diligent efforts in wide directions.
• For sure, manual provisioning is
•Storage VC
not good!!!
mechanisms deployment
of VMimages
VCstrategies VCscheduling
Server Load
consolidation Balancing
www.sbenedictglobal.com
Dynamic Provisioning – Deployment
considerations
• VC Deployment
• The deployment of VMs should be fast.
• VC deployment includes the following steps:
– To construct and distribute the whole system of software stacks
(including OS) to a physical node (usually via. templates)
– A template is a disk image that includes a pre-installed OS
with or without the application software on top of the OS.
– To quickly identify the destination nodes (algorithms could be
designed)
– To switch run time environments from one user’s cluster to the
other user’s cluster.
– Upon migration, the cluster should be shutdown or suspended
quickly (a green solution).
• The deployment procedure could, therefore, incur hefty
overheads.
9
www.sbenedictglobal.com
Effective deployment solutions
• Tackling the deployment overheads.
• Option 1: design new migration strategies.
– Prediction based,
– simulation based,
– monitoring assisted,
– Adaptive method,
– Templates can utilize COW (Copy on Write) format.
• Option 2: frame an effective load balancer.
– Eg. autoscaling
• Option 3: shorten the execution of workloads by increasing the
resource utilization.
– Eg. Mapping VMs to appropriate physical servers could increase
the performance of tasks.
10
www.sbenedictglobal.com
VM migration – Working mechanism
• Virtual machine migration is the task of moving a
virtual machine from one physical hardware
environment to another.
Guest
Host 1 Host 2
www.sbenedictglobal.com
VM migration - stages
A block device is a computer
data storage device that supports
reading and (optionally) writing
data in fixed-size blocks, sectors,
or clusters. These blocks are
generally 512 bytes
or a multiple thereof in size.
Cloud Computing 12
13
www.sbenedictglobal.com
VMWare Topology
• With this architecture, we can create a
virtual datacenter.
• vCenter server
• Provides a central point of control
to the datacenter.
• It is responsible for performance
monitoring and configuration.
• Server groups with computing servers
• They run ESX or ESXi based x86
servers on bare metal.
• These servers could be grouped
as clusters too.
• Storage networks/arrays
• 3 types
– Fibre channel SAN
– Internet Small Computer
Storage Interface (iSCSI)
– NAS
https://www.vmware.com/pdf/vi_architecture_wp.pdf
14
www.sbenedictglobal.com
VMWare Topology
• Management clients
• vSphere client
• vSphere CLI
• vSphere Management Assistant (MA)
15
www.sbenedictglobal.com
VMWare - Components
• Vmware ESX or ESXi server
– A server with virtualization layer.
– It abstracts the underlying
hardware for provisioning
resources to VMs.
• A Virtual Machine File System
(VMFS) among ESXi servers.
– High performance cluster
filesystem – e.g., Parallel
FileSystem, HDFS
– Similar, lustre
• vCenter Management Server
– Centralized component for
provisioning and managing VMs.
16
www.sbenedictglobal.com
VMWare – Components – contd.
• Virtual Infrastructure Clients
– An interface for client connections.
• Virtual Infrastructure web access
– An interface for users/admins to
manage vms.
– The configurations can happen at
the cluster level.
17
www.sbenedictglobal.com
Distributed Services
Distributed Services
• VMware VMotion,
• VMware Storage VMotion,
• VMware Dynamic Resource
Scheduler
• VMware High Availability,
• Fault Tolerance
18
www.sbenedictglobal.com
VMWare vMotion
20
www.sbenedictglobal.com
VMWare - Insights
21
www.sbenedictglobal.com
An Example
• An example – Finance
Calculation for populations.
• Initially, resources are reserved.
• Accounting dept can have increased
memory or processing speed during the
year end (Dynamic changes happen).
• Different speed and memory can be
assigned for different tasks.
• Payroll
• Accounting.
• ,,,
22
www.sbenedictglobal.com
VMWare lab tasks
• Task1: Creating a VM.
• Task 2: Creating a single sign on to the remote VM
via. vSphere web client user interface.
• Task 3: Identify the available list of nodes connected
to the vCenter.
• Task 4: VM migration
• Task 5: live VM migration
• Task 6: Dashboard and Analysis of virtual servers /
clusters / datacenters.
23
www.sbenedictglobal.com
VMWare – Task 1 and Task 2
• Login to
http://labs.hol.vmware.com/HOL/catalogs/catalog/123
• Choose the appropriate lab
• HOL-SDC-1610 or HOL-SDC-1410 or HOL-1810-SDC-1
• You should see a VM as similar to Virtualbox. But, this
Vm is not in your machine!!
• Open the vSphereClient –web interface via. browser of
your newly created VM.
• Provide a single sign on for the lab in order to utilize
the resources.
• administrator@vsphere.local
• VMware1!
24
www.sbenedictglobal.com
VMWare – Task 3, 4, 5
• Click vCenter Inventory lists to check the available
machines (VMs and so forth).
• You should see some available vCenter servers, clusters,
hosts, and vms…
• Understand how a VM is instantiated in a host.
• Login to VM
• Launch a “remote console”
• Takes a while…
• Login with the credentials…
• Root VMware1!
• Type “date” commands or the
other commands. The VM works.
25
www.sbenedictglobal.com
VMWare – Task 3,4, 5
• Create a VM by cloning the existing VMs.
• Create vm on the host.
• Clone based on the existing vm.
• Choose the default or modified settings.
• Check the vm is green.
• If issues, alert pops up.
• Launch the console.
• To close the console, type CTL+ALT → close the window.
• Issues:
• Check if you are in the main console.
26
www.sbenedictglobal.com
VMWare – Task 3, 4, 5 (Migration)
• Choose the created vm and migrate the vm from one
host to the other.
• Choose the migration mode from the menu.
• Choose the appropriate host for migration.
• Choose the appropriate storage option for the migration.
• Click migrate option.
• Takes a while…
• Now, check where the VM is located…
• VM should be migrated to the destination hosts!!!
27
www.sbenedictglobal.com
Certificates…
28
www.sbenedictglobal.com
VMWare - vRealize
• VMWare vRealize log insights can perform search for
logs and information based on
• Machine learning based intelligent grouping
• High performance search
• Trouble shooting mechanisms
• It supports two mechanisms
• Dashboard approach
– To quickly visualize log data.
– Charts and events are displayed here.
– A summary view.
• Interactive approach
– It allows designers or users to track down the issues behind vms,
host, cluster, or datacenters.
– It provides a detailed information about an event.
– This could be queried too. 29
www.sbenedictglobal.com
30
www.sbenedictglobal.com
Manual Deployment or Orchestration
• It is stressful.
• Misses accuracy.
31
www.sbenedictglobal.com
DataCenter Automation
• It is good to have scripts with commands for easy
datacenter automation.
• Thus, it is better than the point and click options.
• Vmware commandlets provide this option in vSphere
cloud.
• It is useful for managing, automating, and handling
other operations via. command line interface.
• Mostly preferred by administrators.
32
www.sbenedictglobal.com
VMWare Layout
• Users are connected to VCs via. vCenter node (vCSA)
• vCSA → vCenter Server Virtual Appliance
• The lab consists of
• Datacenter -1; Cluster – 2; Hosts -6; VMs – 13; vApps – 0;
• Datastore – 5; Networks – 2; and Distributed switches – 2;
• Datacenter
• RegionA01 : VMW-HOL
• Cluster
• RegionA01-COMP01 : HOLCluster
• RegionA01-MGMT01
• VMHosts - ESXi Host
• esx-01a.corp.local, esx-02a.corp.local, … esx-06a.corp.local
• VMs 33
• Linux-base-01a, ….www.sbenedictglobal.com
DataCenter Automation
• Task 1: Operate with PowerShell ISE
• ISE stands for Integrated Scripting environment.
• This operates on top of the command line interface.
• ISE lists a set of commands while typing a command. Thus,
the search for commands is easy.
• Type the commands on the scripting page. Type “F8” to run
the commands on the terminal.
• You can also directly type the commands on the terminal
window.
• Task 2: search for the available commands (also
called as commandlets)
• Get-VICommand
34
www.sbenedictglobal.com
DataCenter Automation
• Task 3: Connect to the vCenter server instance (vcsa-
01a);
• Connect to the VI server:
– Connect-VIServer servername –User username –Password
password
– Servername = vcsa-01a; username = corp\administrator;
password=VMware1!
35
www.sbenedictglobal.com
DataCenter Automation
• Task 4: Store the esxihosts as variables and check if
the host objects exists/connected.
• $esxihost = Get-VMHost (assigning the host to a variable)
• $esxihost (outputs the whole list of variables)
• $esxihost | select –first 1 (selecting the first
– Ie, shows the first server host (esx-01a.corp.local).
• ($esxihost | select -first 1).ConnectionState.ToString()
• Task 5: Check if the storage devices are connected to
the VM.
• $vmHost = Get-VMHost | select -first 1
• $esxcli = Get-EsxCli -VMHost $vmHost -V2 (Using ESXCLI. You can manage
many aspects of an ESXi host with the ESXCLI command set. You can run ESXCLI commands as vCLI
commands or run them in the ESXi Shell in troubleshooting situations)
• $esxcli.storage.nmp.device.list.Invoke()
36
www.sbenedictglobal.com
DataCenter Automation
• Task 6: Using the connected database device, view
and create a datastore
• Get-VMHost | Get-ScsiLun -CanonicalName
naa.6589cfc000000a67c3f50923a8b96682 | select
vmhost,canonicalname,capacitygb
• New-Datastore -VMHost esx-01a.corp.local -Name
iSCSIDatastoreNew -Vmfs -Path
naa.6589cfc000000a67c3f50923a8b96682
• Get-VMHost esx-01a.corp.local | Get-Datastore
37
www.sbenedictglobal.com
DataCenter Automation
38
www.sbenedictglobal.com
DataCenter Automation
• Task 8: Work with Clusters
• Check the existing clusters
– Get-Cluster
• Create a new cluster in the newly created datacenter
– New-Cluster -Location (Get-Datacenter -Name "VMW-HOL") -
Name HOLCluster -HAEnabled -DRSEnabled -
DRSAutomationLevel FullyAutomated
– (Please check the table as similar to the previous step)
• Check the Vmhost in the old cluster
– Get-Cluster RegionA01-COMP01 | Get-VMHost
39
www.sbenedictglobal.com
DataCenter Automation
• Task 8: Work with VMs.
• Create a new VM (3-4 seconds)
– New-VM -Name VMHOL -VMHost esx-01a.corp.local -DiskMB
4000 -MemoryMB 256
– Check with
– Get-VM -Name VMHOL | Get-View
– Start VM async
– Start-VM -VM VMHOL -Confirm –RunAsync
• Create VM in a specified host (RegionA01-MGMT01)
– New-VM -Name HOLVM -VMHost (Get-Cluster RegionA01-
MGMT01 | Get-VMHost | Get-Random) -DiskMB 1 -
NetworkName "VM Network" | Start-VM
• Remove the created VM
– Get-VM HOLVM | Stop-VM | Remove-VM –DeletePermanently
– Check the status of VM
• Create a VM and launch the VM console using command
– Get-VM windsc-01a | Open-VMConsoleWindow 40
www.sbenedictglobal.com
DataCenter Automation
• Task 9: Cloning VM using commands
• Ensure whether you have created a VM for the cloning
purpose.
• Now, clone a new VM
– Get-VM HOLVM | New-VM -Name "HOLVMTemplate" -VMHost
(Get-Cluster RegionA01-MGMT01 | Get-VMHost | Get-Random)
– (Note: network or memory details are not given here). You could
also start the VM.
– Start-VM -VM HOLVMTemplate
• Now, create a template from the cloned VM
– Stop-VM –VM HOLVMTemplate (NOTE: creation of template is
only possible when the VM is powered OFF)
– Set-VM -VM "HOLVMTemplate" -ToTemplate -Confirm:$false
• Now, clone a new VM from the template (This is often used in
programs).
– New-VM -Template "HOLVMTemplate" -Name
"HOLVMFrom_Template"Cloud-VMHost
Computing (Get-Cluster RegionA01- 41
42
www.sbenedictglobal.com