Module 7 VMware vSphere ICM v8 PDF
Document Details
Uploaded by MemorablePointillism
null
Tags
Summary
This module from a VMware vSphere course covers deploying virtual machines, including creating, modifying, and managing virtual machines and templates. It also discusses content libraries and updating templates, as well as hot-pluggable devices and dynamically increasing virtual disk size.
Full Transcript
Module 7 Deploying Virtual Machines 7-2 Importance Virtual machines are the foundation of your virtual infrastructure. Deploying VMs effectively involves recognizing the different types of virtual hardware. It also requires skills in creating , cloning and managing VMs and templates, modi...
Module 7 Deploying Virtual Machines 7-2 Importance Virtual machines are the foundation of your virtual infrastructure. Deploying VMs effectively involves recognizing the different types of virtual hardware. It also requires skills in creating , cloning and managing VMs and templates, modifying VMs, and updating templates. 7-3 Module Lessons 1. Creating Virtua l Machines 2. Virtual Machine Hardware Deep Dive 3. Modifying Virtual Machines 4. Creating Templates and Cloning VMs 5. Introduction to Content Libraries 6. Subscribing to Content Libraries 7. Managing Templates in a Content Library 253 7-4 Lesson 1: Creating Virtual Machines 7-5 Learner Objectives Create and provision a virtual machine Explain the importance of VMware Tools Install VMware Tools Remove a v irtual machine 254 7-6 About Provisioning Virtu al Machines You can create VMs in sev eral ways. Provisioning Method Use vSphere Client Use VMware Host Client Use the New Virtual Machine wizard. Yes Yes Deploy VMs from existing templates or Yes No clones. Deploy VMs from OVF templates. Yes Yes The optimal method for provisioning VMs for your environment depends on factors such as the size and type of your infrastructure and the goals that you want to achieve. You can use the New Virtual Machine wizard to create a single VM if no other VMs in your environment meet your requirements. such as a particular operating system or hardware configuration. For example, you might need a VM that is configured only for testing purposes. You can also create a single VM , install an operating system on it, and use that VM as a template from which to clone other VMs. Deploy VMs, virtual appliances. and v Apps stored in Open Virtual Machine Format (OVF) to use a preconfigured VM. A virtual appliance is a VM that typically has an operating system and other software preinstalled. You can deploy VMs from OVF templates that are on local file systems (for example, local disks such as C:), removable media (for example, CDs or USB keychain drives), shared network drives, or URLs. In addition to using the vSphere Client, you can also use VMware Host Client to create a VM by using OVF files. However, several limitations apply when you use VMware Host Client for this deployment method. For information about OVF and OVA limitations for the VMware Host Client, see vSphere Single Host Management - VMware Host Client at https:/ I docs.vmware.com/ en/VMware-vSphere/index.html. 255 7-7 Creating VMs with the New Virtual Machine Wizard In the vSphere Client, you can use the New Virtual Machine wizard to create a VM. - >JSphere Cltent C1 [[J] New Virtua l Machine Selec t a creation ty pe Ht:.w wou:d y~u 1;~o:e 10 creato!l For information about installing VMware Tools in specific guest operating systems. see VMware Tools Administration at https:/ /docs.vmware.com/en/VMware-Tools/index.html. 265 7-16 Deploying OVF Templates You can deploy any VM or virtual appliance stored in OVF format. Virtual appliances are preconfigured VMs: They are usually designed for a single purpose. They are also available from VMware Marketplace. Deploy OVF Template Select an OVF template y OJ. n~'tl'.l!M'ln.~,.CJ'~rllt~CM'r>l(>y.ll\()\,';:t ""t>l"-h.'IMDf\\ol ~,oll.- tJW.nt> fl'O',.,.....,., ICO!I~! t.o\JI.... MI)tw.:fl ~ ~-"~'..-.'""'"""""" u....... ~....,ii.. ~-.. ,~.......-·sr:-oo.!«tIIUt!o~_AdCD/[)VO d rive 1 > USB x H(l c~· rmol le r u~;e 3.1 USB Contrc 'J er Other Device s: PCi DeviCE· Precision Clo-ck )Other S.::r l.;; l oort Networi< You might have to modify a VM's configuration, for example, to add a network adapter or a virtual disk. You can make all VM changes while the VM is powered off. Some VM hardware changes can be made while the VM is powered on. 294 7-44 Hot-Pluggable Devices With the hot plug option, you can add resources to a running VM. Examples of hot -pluggable devices: USB controllers Ethernet adapters Hard disk devices With supported guest operating systems, you can also add CPU and memory while the VM is powered on. Edit Settings Wont0-04 Cores pr Sockel I CPU Hoi Plug 11 ENL!c c~u Hoi Add I Edit Settings Wlnt0-04 "'Mf:. v ····················-·······---·-····-······ I Memory Hoi Plug Adding devices to a physical server or removing devices from a physical server requires that you physically interact with the server in the data center. When you use VMs, resources can be added dynamically without a disruption in service. You must shut down a VM t o remove hardware, but you can reconfigure the VM without entering the data center. 295 You can add CPU and memory while the VM is powered on. These features are called the CPU Hot Add and Memory Hot Plug, which are supported only on guest operating systems that support hot-pluggable functionality. These features are deactivated by default. To use these hot-plug features, the following requirements must be satisfied: You must install VMware Tools. The VM must use hardware version 11 or later. The guest operating system in the VM must support CPU and memory hot-plug features. The hot-plug features must be activated in the CPU or Memory settings on the Virtual Hardware tab. If virtual NUMA is configured with virtual CPU hot-plug settings, the VM is started w ithout virtual NUMA. Instead, the VM uses UMA (Uniform Memory Access). 296 7-45 Dynamically Increasing Virtual Disk Size You can increase the size of a virtual disk that belongs to a powered-on VM. It must not have snapshots attached. It might require system tools to make the new space usable. Edit Settings ' WIN10·02 X [ICM-Oata~tore] WlNJ0.02/WINI0.02 vmd\o; L-----------------------------~ ~~~0 IM>ID.) After you increase the size of a virtual disk, you might need to increase the size of the file system on this disk. Use the appropriate tool in the guest OS to configure the file system to use the newly allocated disk space. 297 7-46 Inflating Thin-Provisioned Disks Thin-provisioned virtual disks can be converted to a thick , eager-zeroed format. Choose one of the following methods to inflate a thin-provisioned disk on a VM that is either powered on or off: Select the VM's file w ith the. vmdk extension and select Inflate. Select thick-provisioned when you use vSphere Storage vMotion to migrate the VM to a different datastore.................................................. --- · · ····· · ·. ! tJ ,o;dd ,s.f CJ (:l ~.. w,·'..!t"' t:J LSO 0 Cl ~-~--,_.,.,, ,,.t) [} (J crt ''· -.-_,;;..,J l~J (:) d'',,],f :·l,,lkJ t:l Ph tJ Discovered virtual machine v tJ Lab Templates [Qi) Photon-Template , v tJ Lab VMs &i W IN10-02 6"' New VM from This Template... @ Win10-04 l'iH> Convert to V irtual Machine... (i¥1 Win10-06 > tJ vCLS QJ Photon-HW > 1J sb-vcsa-01.vclass.local 307 7-58 Updating Templates You update a template to include new patches, add and remove virtual hardware, upgrade VMware Tools, update the VM hardware versi on, and install new applications. To update a template: 1. Convert the t emplate to a VM. VMs cannot be deployed from this template while it is a VM. 2. Place the VM on an isolated network t o prevent user access. 3. Make appropriate changes to the VM. 4. Convert the VM t o a template. - vSphere Cl1ent 0 < gil) Photon- [CJJ Summar-y Mo J sa-vcsa-01.vclass.local v IJ] ICM-Datacenter VM Templa > t::J Discovered virtual machine v 0 Lab Templates @;) Ptwton-Template v 0 Lab VMs /i,~ WIN10-02 ~/ll New VM fro'll This Template.. &l Winl0-04 rj~>< Convet to Virt ua Machine.. QJ Winl0-06 > t::J vCLS fP Cone:~ Template:. Gi'l Photon- HW ii'il Clone :o LiiJr ary... '.. 1 sb-vcsa-0 1.vclass.focal To update your template t o include new patches or soft ware, you do not need to create another template. Instead, you convert the template to a VM. You can then power on the VM and make changes to the VM. For added security, you might want to prevent users from accessing the VM w hile you update it. To prevent access, either disconnect the VM from the network or place it on an isolated network. Log in to the VM's guest operating system and apply the patch or inst all the software. When you finish, power off the VM and convert it to a template again. 308 7-59 Deploying VMs from a Template To deploy a VM. you must provide information such as the VM name. inventory location, host, datastore. and guest operating system customization data. Photon-Template+ Select a name and folder Deploy From Template ~ Pho to n- ·· ~~ ,s;o-Ot.Yd.inlo.:lll Sel e t~a lcut1011fOVMS tlJ Wll~10· 02 fjl Woni0-0.: {f1 VIlr110.()6 c.o....:I.'L- 309 7-60 Cloning Virtual Machines Cloning a VM creates a VM that is an exact copy of the original: Cloning is an alternative to deploying a VM from a template. The source VM can be powered on or off. ::.::_ vSphere Cl1ent C < ~ WI Nl 0 -02 I ® ~ Action - WINlo-02 Su11mary Monitor cont1gure oower... ! sa-vcsa-Otvcla ss.local Guest OS Issues and Alarms t1J ICM-Datacenter > EJ Discovered vlrt w Snapshot s &, A newer... ersjon of VMwa.re Tools IS ava\la ~ 0 Lab Templates ~Open Remo te Console @;I Pho ton-Temp 0 Lab VMs 61 Migrate... Guest OS {j,\ WIN10-02 Clone ~ aone to Vtrtual Maclline.. [,i'1 W ini0-04 Fault Tolerance ~ Wint0-06 ~o Clone to Template... > tJ v CLS VM Policies Sf Oone as Template to Library... Q'1 Photo n-HW To clone a VM, you must be connected to vCenter. You cannot clone VMs if you use VMware Host Client to manage a host directly. When you clone a VM that is powered on, services and applications are not automatically quiesced when the VM is cloned. When deciding whether to clone a VM or deploy a VM from a template, consider the following points: When you deploy many VMs from a template, al l the VMs start with the same base image. Cloning many VMs from a running VM might not create identical VMs, depending on the activity happening within the VM when the VM is cloned. VM templates use disk space, so you must plan your disk space requirements accordingly. Deploying a VM from a template is quicker than cloning a running VM, especially when you must deploy many VMs at a time. 310 7-61 Guest Operating System Customization When you deploy a VM from a template or clone a VM, you can customize some aspects of the guest operating system. By customizing a guest operating system, you can change information, including the following details: Computer name Network settings License settings Time zone Administrator or root password Windows Security Identifier Customizing the guest operating system prevents conflicts that might occur when you deploy a VM and a clone with identical guest OS settings. Without customization, VMs retain the host name, IP address and so on, of the source VM or template. 311 7-62 About Customization Specifications You can create a customization specification to prepare the guest operating system: Specifications are stored in the vCenter database. Windows and Linux guests are supported. VM Cust omization Specifications NEW.. IMPOQT EOIT OUF-UC~Tf O:X~VRT t'ElETE 5'1!1 Compute- PO IKi~S C'U Storage Po icy Componfnts To manage customization specifications, select Policies and Profiles from the main menu. On the VM Customization Specifications pane, you can create specifications or manage existing ones. 312 7-63 Customizing the Guest Operating System When cloning a VM or deploying a VM from a template, you can use a customization specification to prepare the guest operating system. Photon-Template- Select clone options X Deploy From Template SE'!E'c:t turther clone options. m (.1!-AIIoert:r~.al Photon-Template - Customize guest OS X Deploy From Template Cus1 om i ~e the g uest OS to pre~eo t conflicts wnt>n y01.1 aeptoy tne vltluar machlne Operating System V"1ware Photon OS. (64-bi1 ) Ill You can define the customization settings by using an existing customization specification during cloning or deployment. You create the specification ahead of time. During cloning or deployment, you can select the customization specification to apply to the new VM. VMware Tools must be installed on the guest operating system that you want to customize. The guest operating system must be installed on a disk attached to SCSI node 0:0 in the VM configuration. For more about guest operating system customization, see vSphere Virtual Machine Administration at https:/ /docs.vmware.com/en/VMware-vSphere/index.html. 313 7-64 Lab 16: Creating Templates and Deploying VMs Create a VM template, create a customization specification, and deploy VMs from a template: 1. Create a Virtual Machine Template 2. Create Customization Specifications 3. Deploy Virtual Machines from a Template 7-65 Review of Learner Objectives Create a template of a virtual machine Deploy a virtual machine from a template Clone a virtual machine Create customization specifications for guest operating systems 314 7-66 Lesson 5: Introduction to Content Libraries 7-67 Learner Objectives Identify the benefits of a content library Recognize types of content libraries Create a local content library Deploy a virtual machine from a content library 315 7-68 About Content Libraries Content libraries are repositories of OVF templates and other file types that can be shared and synchronized across vCenter systems globally. Organizations might have multiple vCenter instances in data centers around the globe. On these vCenter instances, organizations might have a collection of templates, ISO images, and so on. The challenge is that all these items are independent of one another. with different versions of these files and templates on various vCenter instances. The content library is the solution to this challenge. It lets you store OVF templates, ISO images, or any other file types in a central location. The templates, images, and files can be published, and other content libraries can subscribe to and download content. The content library keeps content up to date by periodically synchronizing with the publisher, ensuring that the latest version is available. 316 7-69 Benefits of Content Libraries Storage efficiency and consistency are key reasons to install and use a content library. Using content libraries. administrators can perform the following functions: Store and share content. such as templates. ISO images, scripts. Perform distributed f ile management. Synchronize content libraries across sites and vCenter instances. Mount an ISO file directly from a content library. Maintain versions of VM templates. Content libraries are stored on vSphere datastores..-------1.~,. _\ r;:n ~~" :~:·.I t..... !t..... LJ(~)I...~.: :. Sharing content and ensuring that the content is kept up to date are major tasks. For example. for a main vCenter instance, you create a central content library to store the original copies of OVF templates. ISO images. scripts, and other file types. When you publish this content library, other libraries. which might be located anywhere in the world, can subscribe and download an exact copy of the data. When an OVF template is added, modified. or deleted from the published catalog , the subscriber synchronizes with the publisher. and the libraries are updated w ith the latest content. Starting with vSphere 7, you can update a template while simultaneously deploying VMs from the template. In addition, the content library keeps two copies of the VM template. the previous and current versions. You can roll back the template to reverse changes made to the template. 317 7-70 Content Library Types Content is st ored in one of the content library types: Local : Content t hat is controlled by the administrator Published: A local library that is available for subscription Subscribed: A library that synchronizes w ith a published library Administrators can change content in a local or published content library. Users cannot change content in a subscribed content library. A subscribed content library cannot be published. A local library is the simplest form of library. A local library is available for use in data centers that are objects to the local vCenter. A published library is a local library that is available for subscription. Using the vCenter database, the content library tracks version changes. No option to use previous versions of content is available. A subscribed library is configured to subscribe to a published library. An administrator cannot directly change the contents of the subscribed library. But the administrator can control how the data is synchronized to the subscribed content library. 318 7-71 Content Library Interface To create and manage your content libraries, from the main menu, select Content Libraries. :=:= vSphere Cl1ent 0, Con tent Libraries ~-· ' 1'. '.......... ,,, (,;)Home 4f Shortcuts n ,.-............,..,....... ,~, ""'"" -·- -i" _...... _..._.~~"" ~,o,_, frt~ Global lnventOiy Lists. t.& Pchcie>-s and Profiles l1 Auto Deploy ', Hyb: td Cloud Ser\nces D~vo:lop er Center 3 19 7-72 Creating a Local Content Library When you create a content library, you select the content library t ype, for example, Local content library. Content libraries New Content library Configure content library X Local hbranes can be published ~demaly Subscribed hbraries ongina1e from other pubh~hed librarie;. lo L·>Clpi [] ~,; v·~· c... ~.. Lvrrrt.. tf Gt: You can mount an ISO file directly from a content library. You connect the CD/DVD device to an ISO file that is stored in the content library, for example, to install a guest OS on a new VM. The ISO files are available only to VMs that are registered on an ESXi host that can access the datastore where the content library is located. These ISO fi les are not available to VMs on hosts that cannot see the datastore on which the content library is located. 324 7-77 Deploying VMs from a Content Library You can deploy VMs from templates in a content library by using the New Virtual Machine wizard. < t.1 Lab VMs Deploy F10m Template Select a template. !! I(:! H'l.tM _...,:" F'oil::IE;r ()(!;;;,rs · D l>iKo"* tCI...!r111N....,_~ ' b u.tiT""'JlJlo: f~ K On the Select a template page, you can choose a template from a cont ent library or from the vCenter inventory. The Content Library tab lists OVF templates and the Data Center tab lists VM templates, including VM templates that you added t o the content library. 325 7-78 Lab 17: Using Local Content Libraries Create a local content library to clone and deploy virtual machines: 1. Create a Local Content Library 2. Create an OVF Template in the Content Library 3. Create a VM Template in the Content Library 4. View the Content Library Templates 5. Deploy a VM from a Template in the Content Library 7-79 Review of Learner Objectives Identify the benefits of a content library Recognize types of content libraries Create a local content library Deploy a virtual machine from a content library 326 7-80 Lesson 6: Subscribing to Content Libraries 7-81 Learner Objectives Publish content libraries Subscribe to a published content library 327 7-82 Content Libraries: Local, Published, and Subscribed You can publish a local content library so that other libraries can subscribe and download a copy of the data. After synchronization, both published and subscribed libraries contain the same items, or the subscribed library contains the metadata for the items. - - - - _.,. I 1 Automatic Synch Meta data I ---~------------- You can create a local library as the source for content that you want to save or share. You create the local library on a single vCenter instance. Furthermore, you can then add or remove items to and from the local library. You can publish a local library, and this content library service endpoint can be accessed by other vCenter instances in your virtual environment , whether or not they are in the same enhanced linked mode group. When you publish a library, you can configure the authentication method, which a subscribed library must use to authenticate to it You can create a subscribed library and populate its content by synchronizing it to a published library. You can choose whether a subscribed library contains copies of the published library files or only the metadata of the library items. The published library can be on the same vCenter instance as the subscribed library, or more likely, the subscribed library can reference a published library on a different vCenter instance. You cannot add library items to a subscribed library. You can add items only to a local or published library. After synchronization, both libraries contain the same items, or the subscribed library contains the metadata for the items. You can publish this content library so that other libraries that are located across the world can subscribe and dow nload an exact copy of the data. If an OVF template is added, modified, or deleted from the published library, the subscribed library synchronizes with the published library and the libraries are updated with the latest content 328 7-83 Publishing a Content Library You can enable publishing on a local content library by editing its settings. You can add password protection to the library. Subscribed libraries use the subscription URL to access the published library. Ccnten! Libranes Edit Settings SA-Pubhsned-L;orary X S ub~crlpl lcm URI. hltp-..:1/~ ::t·vc:.ta·Olv::.; New Subscription and create a subscription. 2. After the subscription is created, select the subscription in the list and click PUBLISH. If you add new VM templates to the published libri;lry, you must publish them so that the subscribed library receives them. = vSphere Client Q n SA-Local-Library 8 ·91!.181 ~ SA-Local-Library Summary Templtnes Othe iJ Actions· SA·Loc~ti·Ubrary D Other Types o ~) OVF & OV A Tempi... PUaUSH EDIT SUBSCRIPTION ~i' VM Templates., Create Subscription Select subscription type X Subscriptions allow a bi-directional relationship between Publisher and 'llm4otO (:1 LabVMs 0 vCLS sb·vcsa·Olvcl.as$.1ccal vSphere uses linked clone technology to clone a VM template on checkout. This VM clone is used for changes and updates, whereas the original VM template remains available in the content library to deploy VMs. When the changes to the cloned VM are complete, the VM clone is re-merged w ith the VM template, the cloned VM is destroyed, and the VM template is updated. You can discard the checked out virtual machine to avoid creating new versions or to prevent other users from using a faulty version. To discard the checked out VM , click the ellipsis next t o the checked out VM and click Discard Checked Out VM. 343 7-99 Checking In the VM to the Template After making changes to the VM, you check in the VM to the template. The Check in notes box is required. !!il App-Llb Template ~> a-vcsd·Olvclasslocal {l] ICM·D