2.7. Pools 2.7.1. Introduction to Virtual Machine Pools A virtual machine pool is a group of virtual machines that are all clones of the same template and that can be used on demand by any user in a given group. Virtual machine pools allow administrators to rapidly configure a set of generalized virtual machines for users. Users access a virtual machine pool by taking a virtual machine from the pool. When a user takes a virtual machine from a pool, they are provided with any one of the virtual machines in the pool if any are available. That virtual machine will have the same operating system and configuration as that of the template on which the pool was based, but users may not receive the same member of the pool each time they take a virtual machine. Users can also take multiple virtual machines from the same virtual machine pool depending on the configuration of that pool. Virtual machine pools are stateless by default, meaning that virtual machine data and configuration changes are not persistent across reboots. However, the pool can be configured to be stateful, allowing changes made by a user to persist. However, if a user configures console options for a virtual machine taken from a virtual machine pool, those options will be set as the default for that user for that virtual machine pool. Note Virtual machines taken from a pool are not stateless when accessed from the Administration Portal. This is because administrators need to be able to write changes to the disk if necessary. In principle, virtual machines in a pool are started when taken by a user, and shut down when the user is finished. However, virtual machine pools can also contain pre-started virtual machines. Pre-started virtual machines are kept in an up state, and remain idle until they are taken by a user. This allows users to start using such virtual machines immediately, but these virtual machines will consume system resources even while not in use due to being idle. 2.7.2. Creating a virtual machine pool You can create a virtual machine pool containing multiple virtual machines based on a common template. See Templates in the Virtual Machine Management Guide for information about sealing a virtual machine and creating a template. Sysprep File Configuration Options for Windows Virtual Machines Several sysprep file configuration options are available, depending on your requirements. If your pool does not need to join a domain, you can use the default sysprep file, located in /usr/share/ovirt-engine/conf/sysprep/ . If your pool needs to join a domain, you can create a custom sysprep for each Windows operating system: Copy the relevant sections for each operating system from /usr/share/ovirt-engine/conf/osinfo-defaults.properties to a new file and save as 99-defaults.properties . In 99-defaults.properties , specify the Windows product activation key and the path of your new custom sysprep file: os. operating_system .productKey.value= Windows_product_activation_key ... os. operating_system .sysprepPath.value = USD{ENGINE_USR}/conf/sysprep/sysprep. operating_system Create a new sysprep file, specifying the domain, domain password, and domain administrator: If you need to configure different sysprep settings for different pools of Windows virtual machines, you can create a custom sysprep file in the Administration Portal (see Creating a Virtual Machine Pool below). See Using Sysprep to Automate the Configuration of Virtual Machines in the Virtual Machine Guide for more information. Procedure Click Compute Pools . Click New . Select a Cluster from the drop-down list. Select a Template and version from the drop-down menu. A template provides standard settings for all the virtual machines in the pool. Select an Operating System from the drop-down list. Use Optimized for to optimize virtual machines for Desktop or Server . Note High Performance optimization is not recommended for pools because a high performance virtual machine is pinned to a single host and concrete resources. A pool containing multiple virtual machines with such a configuration would not run well. Enter a Name and, optionally, a Description and Comment . The Name of the pool is applied to each virtual machine in the pool, with a numeric suffix. You can customize the numbering of the virtual machines with ? as a placeholder. Example 2.1. Pool Name and Virtual Machine Numbering Examples Pool: MyPool Virtual machines: MyPool-1 , MyPool-2 , ... MyPool-10 Pool: MyPool-??? Virtual machines: MyPool-001 , MyPool-002 , ... MyPool-010 Enter the Number of VMs for the pool. Enter the number of virtual machines to be prestarted in the Prestarted field. Select the Maximum number of VMs per user that a single user is allowed to run in a session. The minimum is 1 . Select the Delete Protection check box to enable delete protection. If you are creating a pool of non-Windows virtual machines or if you are using the default sysprep , skip this step. If you are creating a custom sysprep file for a pool of Windows virtual machines: Click the Show Advanced Options button. Click the Initial Run tab and select the Use Cloud-Init/Sysprep check box. Click the Authentication arrow and enter the User Name and Password or select Use already configured password . Note This User Name is the name of the local administrator. You can change its value from its default value ( user ) here in the Authentication section or in a custom sysprep file. Click the Custom Script arrow and paste the contents of the default sysprep file, located in /usr/share/ovirt-engine/conf/sysprep/ , into the text box. You can modify the following values of the sysprep file: Key . If you do not want to use the pre-defined Windows activation product key, replace <![CDATA[USDProductKeyUSD]]> with a valid product key: Example 2.2. Windows Product Key Example Domain that the Windows virtual machines will join, the domain's Password , and the domain administrator's Username : Example 2.3. Domain Credentials Example Note The Domain , Password , and Username are required to join the domain. The Key is for activation. You do not necessarily need both. The domain and credentials cannot be modified in the Initial Run tab. FullName of the local administrator: DisplayName and Name of the local administrator: The remaining variables in the sysprep file can be filled in on the Initial Run tab. Optional. Set a Pool Type : Click the Type tab and select a Pool Type : Manual - The administrator is responsible for explicitly returning the virtual machine to the pool. Automatic - The virtual machine is automatically returned to the virtual machine pool. Select the Stateful Pool check box to ensure that virtual machines are started in a stateful mode. This ensures that changes made by a user will persist on a virtual machine. Click OK . Optional. Override the SPICE proxy: In the Console tab, select the Override SPICE Proxy check box. In the Overridden SPICE proxy address text field, specify the address of a SPICE proxy to override the global SPICE proxy. Click OK . For a pool of Windows virtual machines, click Compute Virtual Machines , select each virtual machine from the pool, and click Run Run Once . Note If the virtual machine does not start and Info [windeploy.exe] Found no unattend file appears in %WINDIR%\panther\UnattendGC\setupact.log , add the UnattendFile key to the registry of the Windows virtual machine that was used to create the template for the pool: Check that the Windows virtual machine has an attached secondary CD-ROM device with the unattend file, for example, A:\Unattend.xml . Select the virtual machine and click Run Run once . Under Boot Options, check Attach Windows guest tools CD . Click Start , click Run , type regedit in the Open text box, and click OK . In the left pane, go to HKEY_LOCAL_MACHINE SYSTEM Setup . Right-click the right pane and select New String Value . Enter UnattendFile as the key name. Double-click the new key and enter the unattend file name and path, for example, A:\Unattend.xml , as the key's value. Save the registry, seal the Windows virtual machine, and create a new template. See Templates in the Virtual Machine Management Guide for details. You have created and configured a virtual machine pool with the specified number of identical virtual machines. You can view these virtual machines in Compute Virtual Machines , or by clicking the name of a pool to open its details view; a virtual machine in a pool is distinguished from independent virtual machines by its icon. 2.7.3. Explanation of Settings and Controls in the New Pool and Edit Pool Windows 2.7.3.1. New Pool and Edit Pool General Settings Explained The following table details the information required on the General tab of the New Pool and Edit Pool windows that are specific to virtual machine pools. All other settings are identical to those in the New Virtual Machine window. Table 2.30. General settings Field Name Description Template The template and template sub-version on which the virtual machine pool is based. If you create a pool based on the latest sub-version of a template, all virtual machines in the pool, when rebooted, will automatically receive the latest template version. For more information on configuring templates for virtual machines see Virtual Machine General Settings Explained and Explanation of Settings in the New Template and Edit Template Windows in the Virtual Machine Management Guide . Description A meaningful description of the virtual machine pool. Comment A field for adding plain text human-readable comments regarding the virtual machine pool. Prestarted VMs Allows you to specify the number of virtual machines in the virtual machine pool that will be started before they are taken and kept in that state to be taken by users. The value of this field must be between 0 and the total number of virtual machines in the virtual machine pool. Number of VMs/Increase number of VMs in pool by Allows you to specify the number of virtual machines to be created and made available in the virtual machine pool. In the edit window it allows you to increase the number of virtual machines in the virtual machine pool by the specified number. By default, the maximum number of virtual machines you can create in a pool is 1000. This value can be configured using the MaxVmsInPool key of the engine-config command. Maximum number of VMs per user Allows you to specify the maximum number of virtual machines a single user can take from the virtual machine pool at any one time. The value of this field must be between 1 and 32,767 . Delete Protection Allows you to prevent the virtual machines in the pool from being deleted. Sealed Ensures that machine-specific settings from the template are not reproduced in virtual machines that are provisioned from the template. For more information about the sealing process, see Sealing a Windows Virtual Machine for Deployment as a Template 2.7.3.2. New Pool and Edit Pool Type Settings Explained The following table details the information required on the Type tab of the New Pool and Edit Pool windows. Table 2.31. Type settings Field Name Description Pool Type This drop-down menu allows you to specify the type of the virtual machine pool. The following options are available: Automatic : After a user finishes using a virtual machine taken from a virtual machine pool, that virtual machine is automatically returned to the virtual machine pool. Manual : After a user finishes using a virtual machine taken from a virtual machine pool, that virtual machine is only returned to the virtual machine pool when an administrator manually returns the virtual machine. Stateful Pool Specify whether the state of virtual machines in the pool is preserved when a virtual machine is passed to a different user. This means that changes made by a user will persist on the virtual machine. 2.7.3.3. New Pool and Edit Pool Console Settings Explained The following table details the information required on the Console tab of the New Pool or Edit Pool window that is specific to virtual machine pools. All other settings are identical to those in the New Virtual Machine and Edit Virtual Machine windows. Table 2.32. Console settings Field Name Description Override SPICE proxy Select this check box to enable overriding the SPICE proxy defined in global configuration. This feature is useful in a case where the user (who is, for example, connecting via the VM Portal) is outside of the network where the hosts reside. Overridden SPICE proxy address The proxy by which the SPICE client connects to virtual machines. This proxy overrides both the global SPICE proxy defined for the Red Hat Virtualization environment and the SPICE proxy defined for the cluster to which the virtual machine pool belongs, if any. The address must be in the following format: protocol:// host : port 2.7.3.4. Virtual Machine Pool Host Settings Explained The following table details the options available on the Host tab of the New Pool and Edit Pool windows. Table 2.33. Virtual Machine Pool: Host Settings Field Name Sub-element Description Start Running On Defines the preferred host on which the virtual machine is to run. Select either: Any Host in Cluster - The virtual machine can start and run on any available host in the cluster. Specific Host(s) - The virtual machine will start running on a particular host in the cluster. However, the Manager or an administrator can migrate the virtual machine to a different host in the cluster depending on the migration and high-availability settings of the virtual machine. Select the specific host or group of hosts from the list of available hosts. CPU options Pass-Through Host CPU When selected, allows virtual machines to use the host's CPU flags. When selected, Migration Options is set to Allow manual migration only . Migrate only to hosts with the same TSC frequency When selected, this virtual machine can only be migrated to a host with the same TSC frequency. This option is only valid for High Performance virtual machines. Migration Options Migration mode Defines options to run and migrate the virtual machine. If the options here are not used, the virtual machine will run or migrate according to its cluster's policy. Allow manual and automatic migration - The virtual machine can be automatically migrated from one host to another in accordance with the status of the environment, or manually by an administrator. Allow manual migration only - The virtual machine can only be migrated from one host to another manually by an administrator. Do not allow migration - The virtual machine cannot be migrated, either automatically or manually. Migration policy Defines the migration convergence policy. If the check box is left unselected, the host determines the policy. Cluster default (Minimal downtime) - Overrides in vdsm.conf are still applied. The guest agent hook mechanism is disabled. Minimal downtime - Allows the virtual machine to migrate in typical situations. Virtual machines should not experience any significant downtime. The migration will be aborted if virtual machine migration does not converge after a long time (dependent on QEMU iterations, with a maximum of 500 milliseconds). The guest agent hook mechanism is enabled. Post-copy migration - When used, post-copy migration pauses the migrating virtual machine vCPUs on the source host, transfers only a minimum of memory pages, activates the virtual machine vCPUs on the destination host, and transfers the remaining memory pages while the virtual machine is running on the destination. The post-copy policy first tries pre-copy to verify whether convergence can occur. The migration switches to post-copy if the virtual machine migration does not converge after a long time. This significantly reduces the downtime of the migrated virtual machine, and also guarantees that the migration finishes regardless of how rapidly the memory pages of the source virtual machine change. It is optimal for migrating virtual machines in heavy continuous use, which would not be possible to migrate with standard pre-copy migration. The disadvantage of this policy is that in the post-copy phase, the virtual machine may slow down significantly as the missing parts of memory are transferred between the hosts. Warning If the network connection breaks prior to the completion of the post-copy process, the Manager pauses and then kills the running virtual machine. Do not use post-copy migration if the virtual machine availability is critical or if the migration network is unstable. Suspend workload if needed - Allows the virtual machine to migrate in most situations, including when the virtual machine is running a heavy workload. Because of this, virtual machines may experience a more significant downtime than with some other settings. The migration may still be aborted for extreme workloads. The guest agent hook mechanism is enabled. Enable migration encryption Allows the virtual machine to be encrypted during migration. Cluster default Encrypt Don't encrypt Parallel Migrations Allows you to specify whether and how many parallel migration connections to use. Cluster default : Parallel migration connections are determined by the cluster default. Disabled : The virtual machine is migrated using a single, non-parallel connection. Auto : The number of parallel connections is automatically determined. This settings might automatically disable parallel connections. Auto Parallel : The number of parallel connections is automatically determined. Custom : Allows you to specify the preferred number of parallel connections, the actual number may be lower. Number of VM Migration Connections This setting is only available when Custom is selected. The preferred number of custom parallel migrations, between 2 and 255. Configure NUMA NUMA Node Count The number of virtual NUMA nodes available in a host that can be assigned to the virtual machine. NUMA Pinning Opens the NUMA Topology window. This window shows the host's total CPUs, memory, and NUMA nodes, and the virtual machine's virtual NUMA nodes. You can manually pin virtual NUMA nodes to host NUMA nodes by clicking and dragging each vNUMA from the box on the right to a NUMA node on the left. You can also set Tune Mode for memory allocation: Strict - Memory allocation will fail if the memory cannot be allocated on the target node. Preferred - Memory is allocated from a single preferred node. If sufficient memory is not available, memory can be allocated from other nodes. Interleave - Memory is allocated across nodes in a round-robin algorithm. If you define NUMA pinning, Migration Options is set to Allow manual migration only . 2.7.3.5. New Pool and Edit Pool Resource Allocation Settings Explained The following table details the information required on the Resource Allocation tab of the New Pool and Edit Pool windows that are specific to virtual machine pools. All other settings are identical to those in the New Virtual Machine window. See Virtual Machine Resource Allocation Settings Explained in the Virtual Machine Management Guide for more information. Table 2.34. Resource Allocation settings Field Name Sub-element Description Disk Allocation Auto select target Select this check box to automatically select the storage domain that has the most free space. The Target and Disk Profile fields are disabled. Format This field is read-only and always displays QCOW2 . 2.7.3.6. Editing a Virtual Machine Pool After a virtual machine pool has been created, its properties can be edited. The properties available when editing a virtual machine pool are identical to those available when creating a new virtual machine pool except that the Number of VMs property is replaced by Increase number of VMs in pool by . Note When editing a virtual machine pool, the changes introduced affect only new virtual machines. Virtual machines that existed already at the time of the introduced changes remain unaffected. Procedure Click Compute Pools and select a virtual machine pool. Click Edit . Edit the properties of the virtual machine pool. Click Ok . 2.7.3.7. Prestarting Virtual Machines in a Pool The virtual machines in a virtual machine pool are powered down by default. When a user requests a virtual machine from a pool, a machine is powered up and assigned to the user. In contrast, a prestarted virtual machine is already running and waiting to be assigned to a user, decreasing the amount of time a user has to wait before being able to access a machine. When a prestarted virtual machine is shut down it is returned to the pool and restored to its original state. The maximum number of prestarted virtual machines is the number of virtual machines in the pool. Prestarted virtual machines are suitable for environments in which users require immediate access to virtual machines which are not specifically assigned to them. Only automatic pools can have prestarted virtual machines. Procedure Click Compute Pools and select the virtual machine pool. Click Edit . Enter the number of virtual machines to be prestarted in the Prestarted VMs field. Click the Type tab. Ensure Pool Type is set to Automatic . Click OK . 2.7.3.8. Adding Virtual Machines to a Virtual Machine Pool If you require more virtual machines than originally provisioned in a virtual machine pool, add more machines to the pool. Procedure Click Compute Pools and select the virtual machine pool. Click Edit . Enter the number of additional virtual machines in the Increase number of VMs in pool by field. Click OK . 2.7.3.9. Detaching Virtual Machines from a Virtual Machine Pool You can detach virtual machines from a virtual machine pool. Detaching a virtual machine removes it from the pool to become an independent virtual machine. Procedure Click Compute Pools . Click the pool's name. This opens the details view. Click the Virtual Machines tab to list the virtual machines in the pool. Ensure the virtual machine has a status of Down ; you cannot detach a running virtual machine. Select one or more virtual machines and click Detach . Click OK . Note The virtual machine still exists in the environment and can be viewed and accessed from Compute Virtual Machines . Note that the icon changes to denote that the detached virtual machine is an independent virtual machine. 2.7.3.10. Removing a Virtual Machine Pool You can remove a virtual machine pool from a data center. You must first either delete or detach all of the virtual machines in the pool. Detaching virtual machines from the pool will preserve them as independent virtual machines. Procedure Click Compute Pools and select the virtual machine pool. Click Remove . Click OK .

Commands:
<Credentials> <Domain>__AD_Domain__</Domain> <Password>__Domain_Password__</Password> <Username>__Domain_Administrator__</Username> </Credentials>
<ProductKey> <Key><![CDATA[USDProductKeyUSD]]></Key> </ProductKey>
<ProductKey> <Key>0000-000-000-000</Key> </ProductKey>
<Credentials> <Domain>__AD_Domain__</Domain> <Password>__Domain_Password__</Password> <Username>__Domain_Administrator__</Username> </Credentials>
<Credentials> <Domain>addomain.local</Domain> <Password>12345678</Password> <Username>Sarah_Smith</Username> </Credentials>
<UserData> <FullName>__Local_Administrator__</FullName> </UserData>
<LocalAccounts> <LocalAccount wcm:action="add"> <Password> <Value><![CDATA[USDAdminPasswordUSD]]></Value> <PlainText>true</PlainText> </Password> <DisplayName>__Local_Administrator__</DisplayName> <Group>administrators</Group> <Name>__Local_Administrator__</Name> </LocalAccount> </LocalAccounts>
protocol:// host : port