<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Instance types and preferences on OpenShift Virtualization Training</title><link>/docs/instance-types-and-preferences/</link><description>Recent content in Instance types and preferences on OpenShift Virtualization Training</description><generator>Hugo</generator><language>en</language><atom:link href="/docs/instance-types-and-preferences/index.xml" rel="self" type="application/rss+xml"/><item><title>Introduction</title><link>/docs/instance-types-and-preferences/types-introduction/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>/docs/instance-types-and-preferences/types-introduction/</guid><description>&lt;p>Even if OpenShift Virtualization provides advanced options and a lot of configuration options for different VMs, we usually have a common
set of VM specifications which we will use for most of our VMs. Therefore, it may make sense to define such
specifications as instance types and / or preferences.&lt;/p>
&lt;p>To achieve this, OpenShift Virtualization provides multiple CustomResourceDefinitions like &lt;code>VirtualMachineInstancetype&lt;/code>, &lt;code>VirtualMachineClusterInstancetype&lt;/code> or &lt;code>VirtualMachinePreference&lt;/code>.&lt;/p>
&lt;h2 id="vm-virtualmachineinstancetype">VM VirtualMachineInstancetype&lt;/h2>
&lt;p>For an instance type we have the option of using the cluster-wide &lt;code>VirtualMachineClusterInstancetype&lt;/code> or the namespaced
&lt;code>VirtualMachineInstancetype&lt;/code>.&lt;/p></description></item><item><title>Common instance types and preferences</title><link>/docs/instance-types-and-preferences/common-instancetypes/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>/docs/instance-types-and-preferences/common-instancetypes/</guid><description>&lt;p>The OpenShift Virtualization project provides a set of &lt;a href="https://github.com/kubevirt/common-instancetypes" target="_blank" rel="noopener">common instance types and preferences&lt;/a>
.
In this lab, we are going to have a look at these and how they can help us create virtual machines.&lt;/p>
&lt;h2 id="common-instance-types-and-preferences">Common instance types and preferences&lt;/h2>
&lt;p>By default OpenShift Virtualization comes with a set of common instance types and preferences. You can reference those instance types and preferences when creating virtual machines.&lt;/p>
&lt;p>The cluster provided as well as the user provided instance types and preferences can either be displayed in the web console or by cli.&lt;/p></description></item><item><title>Create an instance type</title><link>/docs/instance-types-and-preferences/create-instancetype/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>/docs/instance-types-and-preferences/create-instancetype/</guid><description>&lt;p>In this section, we will create and use our own instance type.&lt;/p>
&lt;h2 id="task-331-create-your-own-instance-type">Task 3.3.1: Create your own instance type&lt;/h2>
&lt;p>In the previous section we have seen that the Cirros preference requests 256Mi of memory. However, the smallest instance type
available requests 512Mi of memory. In order to adapt to this, let&amp;rsquo;s create our own instance type and assign it to our VirtualMachines.&lt;/p>
&lt;p>Define the following instance type:&lt;/p>
&lt;ul>
&lt;li>Request 256Mi of memory&lt;/li>
&lt;li>Reduce the overcommit percentage from 50% to 25%&lt;/li>
&lt;li>Name the resource &lt;code>lab03-o1-pico&lt;/code>&lt;/li>
&lt;/ul>
&lt;details data-mode="normalexpertmode" class="normalexpertmode">
 &lt;summary>Task hint&lt;/summary>
&lt;p>Create the following resource using the import YAML functionality of the OpenShift Web Console:&lt;/p></description></item><item><title>Re-assign an instance type</title><link>/docs/instance-types-and-preferences/reassign-instancetype/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>/docs/instance-types-and-preferences/reassign-instancetype/</guid><description>&lt;p>In this section we will change the instance type of our running VMs to our newly created instance type.&lt;/p>
&lt;h2 id="changing-an-instance-type">Changing an instance type&lt;/h2>
&lt;p>Whenever a VM referencing an instance type or preference is created, the definition at time of creation is stored in a &lt;code>ControllerRevision&lt;/code>. This revision is then referenced in a new field &lt;code>.spec.instancetype.revisionName&lt;/code> in our VM manifest.&lt;/p>
&lt;p>This field ensures that our VirtualMachine knows the original specification even when the type or preference would change. This ensures that there are no accidental changes to the VM resources or preferences.&lt;/p></description></item></channel></rss>