<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>OpenShift Virtualization Training</title><link>/</link><description>Recent content on OpenShift Virtualization Training</description><generator>Hugo</generator><language>en</language><atom:link href="/index.xml" rel="self" type="application/rss+xml"/><item><title>Footer</title><link>/pdf/footer/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>/pdf/footer/</guid><description>&lt;!-- markdownlint-disable MD033 -->
&lt;div class="pdf-footer">
&lt;p>&lt;span class="page">&lt;/span> / &lt;span class="topage">&lt;/span>&lt;/p>
&lt;/div>
&lt;!-- markdownlint-enable MD033 --></description></item><item><title>Footer</title><link>/pdf/header/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>/pdf/header/</guid><description>&lt;!-- markdownlint-disable MD033 -->
&lt;div class="pdf-header">
&lt;p>&lt;/p>
&lt;/div>
&lt;!-- markdownlint-enable MD033 --></description></item><item><title>Create a VM</title><link>/docs/getting-started-with-kubevirt/create-vm/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>/docs/getting-started-with-kubevirt/create-vm/</guid><description>&lt;h2 id="creating-a-virtual-machine">Creating a virtual machine&lt;/h2>
&lt;p>In OpenShift&amp;rsquo;s web console in the menu on the left, navigate to &lt;strong>Virtualization&lt;/strong> → &lt;strong>Overview&lt;/strong>. Make sure your project is active:&lt;/p>
&lt;p>&lt;img alt="Project dropdown" src="../openshift-project-dropdown.png">&lt;/p>
&lt;p>It&amp;rsquo;s still pretty empty here and a lot of zeroes look at us. However, we are going to change this.&lt;/p>
&lt;h3 id="task-111-create-your-first-virtual-machine">Task 1.1.1: Create your first virtual machine&lt;/h3>
&lt;p>Open the &lt;strong>VirtualMachines&lt;/strong> menu entry. Click on &lt;strong>Create VirtualMachine&lt;/strong> and choose &lt;strong>From template&lt;/strong>.&lt;/p>
&lt;p>On the left of the view that just opened, click on &lt;strong>User templates&lt;/strong> and choose the &lt;strong>Cirros VM&lt;/strong> template.&lt;/p></description></item><item><title>Lab environment</title><link>/setup/lab-environment/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>/setup/lab-environment/</guid><description>&lt;h2 id="login">Login&lt;/h2>
&lt;p>The necessary &lt;strong>URLs&lt;/strong> and &lt;strong>credentials&lt;/strong> to access the lab environment will be provided by your trainer.
Use Chrome/Chromium for the best experience.&lt;/p>
&lt;h2 id="openshifts-web-console">OpenShift&amp;rsquo;s web console&lt;/h2>
&lt;p>We are calling OpenShift&amp;rsquo;s web interface the &lt;em>web console&lt;/em>.
You access it by opening a browser, open the following URL and log in.&lt;/p>
&lt;ul>
&lt;li>&lt;a href="https://console.apps.lab.clusters.t-k.ch/" target="_blank" rel="noopener">https://console.apps.lab.clusters.t-k.ch/&lt;/a>
&lt;/li>
&lt;/ul>
&lt;p>During the whole training, make sure you&amp;rsquo;re working on the &lt;strong>Virtualization&lt;/strong> view:&lt;/p>
&lt;p>&lt;img alt="OpenShift&amp;rsquo;s Virtualization view" src="../openshift-virtualization-view.png">&lt;/p>
&lt;h2 id="web-terminal">Web terminal&lt;/h2>
&lt;p>OpenShift&amp;rsquo;s &lt;em>web terminal&lt;/em> is a convenient way to work with, e.g., &lt;code>oc&lt;/code> as it doesn&amp;rsquo;t require you to install anything locally on your computer.
It is fully integrated into OpenShift&amp;rsquo;s web console explained in the chapter above.&lt;/p></description></item><item><title>KubeVirt configuration</title><link>/setup/kubevirt-configuration/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>/setup/kubevirt-configuration/</guid><description>&lt;h2 id="kubevirt-installation">KubeVirt installation&lt;/h2>
&lt;p>On the Kubernetes cluster used for this training, the following Operators have been installed:&lt;/p>
&lt;table>
 &lt;thead>
 &lt;tr>
 &lt;th>Operator name&lt;/th>
 &lt;th>Namespace&lt;/th>
 &lt;/tr>
 &lt;/thead>
 &lt;tbody>
 &lt;tr>
 &lt;td>KubeVirt&lt;/td>
 &lt;td>kubevirt&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>Containerized Data Impoter (CDI)&lt;/td>
 &lt;td>cdi&lt;/td>
 &lt;/tr>
 &lt;/tbody>
&lt;/table>
&lt;p>As the configuration and the required feature flags are subject to change, we do not highlight them in every section.&lt;/p>
&lt;h3 id="emulation">Emulation&lt;/h3>
&lt;p>For local development and test environments, the emulation can be turned on. This may have a huge impact to the performance.&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-yaml" data-lang="yaml">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#204a87;font-weight:bold">apiVersion&lt;/span>&lt;span style="color:#000;font-weight:bold">:&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>&lt;span style="color:#000">kubevirt.io/v1&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f8f8f8;text-decoration:underline">&lt;/span>&lt;span style="color:#204a87;font-weight:bold">kind&lt;/span>&lt;span style="color:#000;font-weight:bold">:&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>&lt;span style="color:#000">KubeVirt&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f8f8f8;text-decoration:underline">&lt;/span>&lt;span style="color:#204a87;font-weight:bold">metadata&lt;/span>&lt;span style="color:#000;font-weight:bold">:&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>&lt;span style="color:#204a87;font-weight:bold">name&lt;/span>&lt;span style="color:#000;font-weight:bold">:&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>&lt;span style="color:#000">kubevirt&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>&lt;span style="color:#204a87;font-weight:bold">namespace&lt;/span>&lt;span style="color:#000;font-weight:bold">:&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>&lt;span style="color:#000">kubevirt&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f8f8f8;text-decoration:underline">&lt;/span>&lt;span style="color:#204a87;font-weight:bold">spec&lt;/span>&lt;span style="color:#000;font-weight:bold">:&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>&lt;span style="color:#204a87;font-weight:bold">configuration&lt;/span>&lt;span style="color:#000;font-weight:bold">:&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>&lt;span style="color:#204a87;font-weight:bold">developerConfiguration&lt;/span>&lt;span style="color:#000;font-weight:bold">:&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>&lt;span style="color:#204a87;font-weight:bold">useEmulation&lt;/span>&lt;span style="color:#000;font-weight:bold">:&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>&lt;span style="color:#204a87;font-weight:bold">true&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f8f8f8;text-decoration:underline">&lt;/span>&lt;span style="color:#000;font-weight:bold">[&lt;/span>&lt;span style="color:#000">...]&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline">
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>The Lab cluster is not using emulation.&lt;/p></description></item><item><title>Start and stop a VM</title><link>/docs/getting-started-with-kubevirt/lifecycle/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>/docs/getting-started-with-kubevirt/lifecycle/</guid><description>&lt;p>In the previous section, we wrote a VirtualMachine specification and applied the manifest to the Kubernetes cluster.&lt;/p>
&lt;h2 id="lifecycle">Lifecycle&lt;/h2>
&lt;p>When the underlying technology &lt;code>libvirt&lt;/code> refers to a VM it often also uses the concept of so-called &lt;em>guest domains&lt;/em>.&lt;/p>
&lt;p>According to &lt;a href="https://wiki.libvirt.org/VM_lifecycle.html" target="_blank" rel="noopener">libvirt.org&lt;/a>
, a guest domain can be in several states:&lt;/p>
&lt;ol>
&lt;li>&lt;strong>Undefined&lt;/strong>: This is a baseline state. Libvirt does not know anything about domains in this state because the domain hasn&amp;rsquo;t been defined or created yet.&lt;/li>
&lt;li>&lt;strong>Defined&lt;/strong> or &lt;strong>Stopped&lt;/strong>: The domain has been defined but it&amp;rsquo;s not running. This state is also called stopped. Only persistent domains can be in this state. When a transient domain is stopped or shut down, it ceases to exist.&lt;/li>
&lt;li>&lt;strong>Running&lt;/strong>: The domain has been created and started either as transient or persistent domain. Either domain in this state is being actively executed on the node&amp;rsquo;s hypervisor.&lt;/li>
&lt;li>&lt;strong>Paused&lt;/strong>: The domain execution on the hypervisor has been suspended. Its state has been temporarily stored until it is resumed. The domain does not have any knowledge whether it was paused or not.&lt;/li>
&lt;li>&lt;strong>Saved&lt;/strong>: Similar to the paused state, but the domain state is stored to persistent storage. Again, the domain in this state can be restored and it does not notice that any time has passed.&lt;/li>
&lt;/ol>
&lt;p>&lt;img alt="VM Lifecycle" src="../vm_lifecycle_graph.png">&lt;/p></description></item><item><title>Accessing the console</title><link>/docs/getting-started-with-kubevirt/console/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>/docs/getting-started-with-kubevirt/console/</guid><description>&lt;h2 id="console-access">Console access&lt;/h2>
&lt;p>Make sure you are on your VM&amp;rsquo;s details page and that it is started.&lt;/p>
&lt;p>Now open your VM&amp;rsquo;s console by clicking on &lt;strong>Open web console&lt;/strong>.
A new window opens. Wait for the console to connect.&lt;/p>
&lt;p>&lt;img alt="VNC web console" src="../openshift-console.png">&lt;/p>
&lt;p>You can now use the default credentials to log in:&lt;/p>
&lt;ul>
&lt;li>User: &lt;code>cirros&lt;/code>&lt;/li>
&lt;li>Password: &lt;code>gocubsgo&lt;/code>&lt;/li>
&lt;/ul>
&lt;p>Try executing a couple of commands, such as:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-bash" data-lang="bash">&lt;span style="display:flex;">&lt;span>whoami
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>ping tim-koko.ch
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h3 id="task-132-entering-the-console-using-virtctl">Task 1.3.2: Entering the console using virtctl&lt;/h3>
&lt;p>By executing the following command in your openshift terminal, you can also use the &lt;code>virtctl&lt;/code> cli to conncet to the virtual machines console:&lt;/p></description></item><item><title>Tolerations</title><link>/setup/tolerations/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>/setup/tolerations/</guid><description>&lt;h2 id="necessary-tolerations">Necessary tolerations&lt;/h2>
&lt;p>Our lab cluster uses tainted nodes, therefore some of the to-be-applied manifests will need a toleration.
The labs will tell you when to use it, but you can always find it here as an easy reference:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-yaml" data-lang="yaml">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000;font-weight:bold">[&lt;/span>&lt;span style="color:#000">...]&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f8f8f8;text-decoration:underline">&lt;/span>&lt;span style="color:#204a87;font-weight:bold">tolerations&lt;/span>&lt;span style="color:#000;font-weight:bold">:&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>- &lt;span style="color:#204a87;font-weight:bold">effect&lt;/span>&lt;span style="color:#000;font-weight:bold">:&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>&lt;span style="color:#000">NoSchedule&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>&lt;span style="color:#204a87;font-weight:bold">key&lt;/span>&lt;span style="color:#000;font-weight:bold">:&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>&lt;span style="color:#000">baremetal&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>&lt;span style="color:#204a87;font-weight:bold">operator&lt;/span>&lt;span style="color:#000;font-weight:bold">:&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>&lt;span style="color:#000">Equal&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>&lt;span style="color:#204a87;font-weight:bold">value&lt;/span>&lt;span style="color:#000;font-weight:bold">:&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>&lt;span style="color:#4e9a06">&amp;#34;true&amp;#34;&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f8f8f8;text-decoration:underline">&lt;/span>&lt;span style="color:#000;font-weight:bold">[&lt;/span>&lt;span style="color:#000">...]&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline">
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div></description></item><item><title>Exposing VM Ports</title><link>/docs/getting-started-with-kubevirt/ssh/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>/docs/getting-started-with-kubevirt/ssh/</guid><description>&lt;p>In the previous chapter, we accessed our VM console using the &lt;code>virtctl&lt;/code> tool. In this section we will expose the SSH port
of our VM and access it directly.&lt;/p>


&lt;div class="alert alert-info" role="alert">
&lt;h4 class="alert-heading">Note&lt;/h4>

This can be done for any port you want to use. For example, if your virtual machine provides a webserver, you can expose
the webserver port.

&lt;/div>

&lt;h2 id="checking-available-services-resources">Checking available Services resources&lt;/h2>
&lt;p>As you see with the following command, creating the VM does not create any Kubernetes Service for it.&lt;/p></description></item><item><title>Changing files</title><link>/docs/getting-started-with-kubevirt/vm-changes/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>/docs/getting-started-with-kubevirt/vm-changes/</guid><description>&lt;p>In the previous chapter, we gained access to the VM&amp;rsquo;s console. In this chapter, we will use this access to make a change
to our running VM and observe what happens if we restart the VM.&lt;/p>
&lt;h3 id="task-151-create-a-file">Task 1.5.1: Create a file&lt;/h3>
&lt;p>Connect to your VM&amp;rsquo;s web console.&lt;/p>
&lt;p>Login with the specified credentials and create a file:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-bash" data-lang="bash">&lt;span style="display:flex;">&lt;span>touch myfile
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Verify that the file really is present. Check it with:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-bash" data-lang="bash">&lt;span style="display:flex;">&lt;span>stat myfile
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h3 id="task-152-restart-vm">Task 1.5.2: Restart VM&lt;/h3>
&lt;p>Exit the console and restart your VM.&lt;/p></description></item><item><title>Introduction</title><link>/docs/containerized-data-importer/cdi-introduction/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>/docs/containerized-data-importer/cdi-introduction/</guid><description>&lt;p>The Containerized Data Importer Project&lt;sup id="fnref:1">&lt;a href="#fn:1" class="footnote-ref" role="doc-noteref">1&lt;/a>&lt;/sup> is an independently installed Operator. It is primarily used to provide a declarative way
to build Virtual Machine Disks on PVCs for OpenShift Virtualization VMs. The CDI Operator provides the custom resource &lt;code>DataVolume&lt;/code>
which is an abstraction above the PVC.&lt;/p>
&lt;h2 id="cdi-operator-components">CDI Operator components&lt;/h2>


&lt;div class="alert alert-info" role="alert">
&lt;h4 class="alert-heading">Note&lt;/h4>

The Operator has already been installed in namespace &lt;code>cdi&lt;/code>. If you want to deploy the Operator, check the
&lt;a href="https://github.com/kubevirt/containerized-data-importer?tab=readme-ov-file#deploy-it" target="_blank" rel="noopener">Deploy&lt;/a>
 section of the CDI documentation.

&lt;/div>

&lt;p>You may see the CDI Operator components with:&lt;/p></description></item><item><title>Create a DataVolume</title><link>/docs/containerized-data-importer/create-datavolume/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>/docs/containerized-data-importer/create-datavolume/</guid><description>&lt;h2 id="provisioning-a-virtual-machine-disk">Provisioning a Virtual Machine Disk&lt;/h2>
&lt;p>In the following lab, we will provision a disk from a given url. We will use a &lt;code>DataVolume&lt;/code> to create the Disk. We then
create a VM with the disk attached.&lt;/p>
&lt;p>We want to provision a VM running an Alpine Cloud Image&lt;sup id="fnref:1">&lt;a href="#fn:1" class="footnote-ref" role="doc-noteref">1&lt;/a>&lt;/sup>.&lt;/p>
&lt;h2 id="task-221-write-your-own-datavolume-manifest">Task 2.2.1: Write your own DataVolume manifest&lt;/h2>
&lt;p>Create a file &lt;code>dv_lab02-alpinedisk.yaml&lt;/code> in folder &lt;code>labs/lab02&lt;/code>and start with the content from the previous section:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-yaml" data-lang="yaml">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#204a87;font-weight:bold">apiVersion&lt;/span>&lt;span style="color:#000;font-weight:bold">:&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>&lt;span style="color:#000">cdi.kubevirt.io/v1beta1&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f8f8f8;text-decoration:underline">&lt;/span>&lt;span style="color:#204a87;font-weight:bold">kind&lt;/span>&lt;span style="color:#000;font-weight:bold">:&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>&lt;span style="color:#000">DataVolume&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f8f8f8;text-decoration:underline">&lt;/span>&lt;span style="color:#204a87;font-weight:bold">metadata&lt;/span>&lt;span style="color:#000;font-weight:bold">:&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>&lt;span style="color:#204a87;font-weight:bold">name&lt;/span>&lt;span style="color:#000;font-weight:bold">:&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>&lt;span style="color:#000">lab02-blankdv&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f8f8f8;text-decoration:underline">&lt;/span>&lt;span style="color:#204a87;font-weight:bold">spec&lt;/span>&lt;span style="color:#000;font-weight:bold">:&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>&lt;span style="color:#204a87;font-weight:bold">source&lt;/span>&lt;span style="color:#000;font-weight:bold">:&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>&lt;span style="color:#204a87;font-weight:bold">blank&lt;/span>&lt;span style="color:#000;font-weight:bold">:&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>{}&lt;span style="color:#f8f8f8;text-decoration:underline">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>&lt;span style="color:#204a87;font-weight:bold">contentType&lt;/span>&lt;span style="color:#000;font-weight:bold">:&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>&lt;span style="color:#4e9a06">&amp;#34;kubevirt&amp;#34;&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>&lt;span style="color:#204a87;font-weight:bold">storage&lt;/span>&lt;span style="color:#000;font-weight:bold">:&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>&lt;span style="color:#204a87;font-weight:bold">accessModes&lt;/span>&lt;span style="color:#000;font-weight:bold">:&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>- &lt;span style="color:#000">ReadWriteOnce&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>&lt;span style="color:#204a87;font-weight:bold">resources&lt;/span>&lt;span style="color:#000;font-weight:bold">:&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>&lt;span style="color:#204a87;font-weight:bold">requests&lt;/span>&lt;span style="color:#000;font-weight:bold">:&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>&lt;span style="color:#204a87;font-weight:bold">storage&lt;/span>&lt;span style="color:#000;font-weight:bold">:&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>&lt;span style="color:#000">64Mi&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline">
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Now adapt your DataVolume to fulfill the following specifications:&lt;/p></description></item><item><title>Using the Alpine disk</title><link>/docs/containerized-data-importer/alpine-vm/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>/docs/containerized-data-importer/alpine-vm/</guid><description>&lt;p>In the previous section we have provisioned a custom Alpine cloud disk image. We will now create a VM which uses this
disk image.&lt;/p>
&lt;h2 id="task-231-attach-the-disk">Task 2.3.1: Attach the disk&lt;/h2>
&lt;p>Write a new VirtualMachine manifest named &lt;code>lab02-alpine.yaml&lt;/code> in the directory &lt;code>labs/lab02&lt;/code>.&lt;/p>


&lt;div class="alert alert-info" role="alert">
&lt;h4 class="alert-heading">Note&lt;/h4>

This Alpine Cloud Image has cloud-init included. We will need another disk (cloudinitdisk) which configures our environment.
We will look into cloud-init in a later section. For now, just use the cloudinitdisk specification from the snippet below.

&lt;/div>

&lt;p>Block needed to reference the PVC as a disk and the &lt;code>cloudinitdisk&lt;/code>:&lt;/p></description></item><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><item><title>Introduction</title><link>/docs/initialize-vms-with-startup-scripts/startup-introduction/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>/docs/initialize-vms-with-startup-scripts/startup-introduction/</guid><description>&lt;p>When we create a virtual machine, we often want to configure the virtual machine to fit in our environment. To achieve this, OpenShift Virtualization
supports the assignment of startup scripts which are executed automatically when the VM initializes. They are typically used to
provide SSH keys, required configuration to run further configuration with ansible, deploy network configuration and so on.&lt;/p>
&lt;p>These startup script methods are supported:&lt;/p>
&lt;ul>
&lt;li>Cloud-init&lt;sup id="fnref:1">&lt;a href="#fn:1" class="footnote-ref" role="doc-noteref">1&lt;/a>&lt;/sup> and Ignition&lt;sup id="fnref:2">&lt;a href="#fn:2" class="footnote-ref" role="doc-noteref">2&lt;/a>&lt;/sup> which are targeting Linux and Unix systems&lt;/li>
&lt;li>Sysprep&lt;sup id="fnref:3">&lt;a href="#fn:3" class="footnote-ref" role="doc-noteref">3&lt;/a>&lt;/sup> to initialize Windows-based VMs&lt;/li>
&lt;/ul>
&lt;p>Cloud-init is the most-widely adopted method, and you will find great support on cloud providers such as AWS, GCP and Azure.&lt;/p></description></item><item><title>Cloud-init</title><link>/docs/initialize-vms-with-startup-scripts/cloud-init/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>/docs/initialize-vms-with-startup-scripts/cloud-init/</guid><description>&lt;p>In this section we will use cloud-init to initialize a Fedora Cloud&lt;sup id="fnref:1">&lt;a href="#fn:1" class="footnote-ref" role="doc-noteref">1&lt;/a>&lt;/sup> VM. Cloud-init is the de-facto standard for providing
startup scripts to VMs.&lt;/p>
&lt;p>Cloud-init is widely adopted. Some of the known users of cloud-init are:&lt;/p>
&lt;ul>
&lt;li>Ubuntu&lt;/li>
&lt;li>Arch Linux&lt;/li>
&lt;li>CentOS&lt;/li>
&lt;li>Red Hat&lt;/li>
&lt;li>FreeBSD&lt;/li>
&lt;li>Fedora&lt;/li>
&lt;li>Gentoo Linux&lt;/li>
&lt;li>openSUSE&lt;/li>
&lt;/ul>
&lt;h2 id="supported-data-sources">Supported data sources&lt;/h2>
&lt;p>OpenShift Virtualization supports the &lt;code>cloudInitNoCloud&lt;/code> and &lt;code>cloudInitConfigDrive&lt;/code> data source methods.&lt;/p>


&lt;div class="alert alert-info" role="alert">
&lt;h4 class="alert-heading">Note&lt;/h4>

As it is the simplest data source you should stick to &lt;code>cloudInitNoCloud&lt;/code> as the go-to data source. Only if &lt;code>cloudInitNoCloud&lt;/code> is not supported
by the cloud-init implementation you should switch to &lt;code>cloudInitConfigDrive&lt;/code>. For example the implementation of coreos-cloudinit was known to
require the &lt;code>cloudInitConfigDrive&lt;/code> data source. However, as CoreOS has built Ignition this implementation is superseded but there
may be more implementations.

&lt;/div>

&lt;h3 id="cloudinitnocloud-data-source">&lt;code>cloudInitNoCloud&lt;/code> data source&lt;/h3>
&lt;p>&lt;code>cloudInitNoCloud&lt;/code> is a flexible data source to configure an instance locally. It can work without network access but can also
fetch configuration from a remote server. The relevant configuration of a &lt;code>cloudInitNoCloud&lt;/code> data source in a VM looks like this:&lt;/p></description></item><item><title>Ignition</title><link>/docs/initialize-vms-with-startup-scripts/ignition/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>/docs/initialize-vms-with-startup-scripts/ignition/</guid><description>&lt;p>In the previous section we created a VM using a cloud-init configuration Secret. This time we will do something similar but with Ignition and Linux Fedora CoreOS.&lt;/p>
&lt;p>Known users of Ignition are:&lt;/p>
&lt;ul>
&lt;li>Fedora CoreOS&lt;/li>
&lt;li>Red Hat Enterprise Linux CoreOS&lt;/li>
&lt;li>Flatcar&lt;/li>
&lt;li>openSUSE MicroOS&lt;/li>
&lt;li>SUSE Linux Enterprise Micro&lt;/li>
&lt;/ul>
&lt;h2 id="supported-data-sources">Supported data sources&lt;/h2>
&lt;p>To provide Ignition data we have to use the &lt;code>cloudInitNoCloud&lt;/code> data source.&lt;/p>
&lt;h3 id="cloudinitnocloud-data-source">&lt;code>cloudInitNoCloud&lt;/code> data source&lt;/h3>
&lt;p>The relevant configuration of a &lt;code>cloudInitNoCloud&lt;/code> data source in a VM looks like this:&lt;/p></description></item><item><title>Sysprep</title><link>/docs/initialize-vms-with-startup-scripts/sysprep/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>/docs/initialize-vms-with-startup-scripts/sysprep/</guid><description>&lt;p>This lab is not yet implemented.
Please check the official &lt;a href="https://kubevirt.io/user-guide/user_workloads/startup_scripts/#sysprep" target="_blank" rel="noopener">documentation&lt;/a>
 for additional information.&lt;/p></description></item><item><title>VM disk images</title><link>/docs/scaling-vms/vm-images/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>/docs/scaling-vms/vm-images/</guid><description>&lt;p>If we want to run VMs at scale it makes sense to manage a set of base images to use for these VMs. It is not very convenient
to spin up and install some requirements for each single VM oneself. There are several ways we can distribute VM images in our cluster.&lt;/p>
&lt;ul>
&lt;li>Distribute images as ephemeral container disks using a container registry
&lt;ul>
&lt;li>Be aware of the non-persistent root disk&lt;/li>
&lt;li>Depending on the disk size, this approach may not be the best choice&lt;/li>
&lt;/ul>
&lt;/li>
&lt;li>Create a namespace (e.g., &lt;code>vm-images&lt;/code>) with pre-provisioned PVCs containing base disk images
&lt;ul>
&lt;li>Each VM would then use CDI to clone the PVC from the &lt;code>vm-images&lt;/code> namespace to the local namespace&lt;/li>
&lt;/ul>
&lt;/li>
&lt;/ul>
&lt;p>At the end of this section, we will have two PVCs containing base disks in our namespace:&lt;/p></description></item><item><title>Virtual machine pools</title><link>/docs/scaling-vms/vm-pools/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>/docs/scaling-vms/vm-pools/</guid><description>&lt;p>A VirtualMachinePool tries to ensure that a specified number of virtual machines are always in a ready state.&lt;/p>
&lt;p>However, the virtual machine pool does not maintain any state or provide guarantees about the maximum number of VMs
running at any given time. For instance, the pool may initiate new replicas if it detects that some VMs have entered
an unknown state, even if those VMs might still be running.&lt;/p>
&lt;h2 id="using-a-virtual-machine-pool">Using a virtual machine pool&lt;/h2>
&lt;p>Using the custom resource VirtualMachinePool, we can specify a template for our VM. A VirtualMachinePool consists of a
VM specification just like a regular VirtualMachine. This specification resides in &lt;code>spec.virtualMachineTemplate.spec&lt;/code>.
Besides the VM specification, the pool requires some additional metadata like labels to keep track of the VMs in the pool.
This metadata resides in &lt;code>spec.virtualMachineTemplate.metadata&lt;/code>.&lt;/p></description></item><item><title>Virtual machine replica sets</title><link>/docs/scaling-vms/vm-replica-sets/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>/docs/scaling-vms/vm-replica-sets/</guid><description>&lt;p>Just like a VirtualMachinePool, a&lt;/p>
&lt;p>VirtualMachineInstanceReplicaSet resource tries to ensure that a specified number of virtual machines
are always in a ready state. The VirtualMachineInstanceReplicaSet is very similar to the Kubernetes ReplicaSet&lt;sup id="fnref:1">&lt;a href="#fn:1" class="footnote-ref" role="doc-noteref">1&lt;/a>&lt;/sup>.&lt;/p>
&lt;p>However, the VirtualMachineInstanceReplicaSet does not maintain any state or provide guarantees about the maximum number of VMs
running at any given time. For instance, the VirtualMachineInstanceReplicaSet may initiate new replicas if it detects that some VMs have entered
an unknown state, even if those VMs might still be running.&lt;/p></description></item><item><title>Mounting storage</title><link>/docs/storage/mounting-storage/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>/docs/storage/mounting-storage/</guid><description>&lt;p>There are multiple ways of mounting a disk to a virtual machine. In this section we will mount various disks to our VM.&lt;/p>
&lt;h2 id="kubernetes-storage">Kubernetes storage&lt;/h2>
&lt;p>There are multiple methods to provide storage for your virtual machines. For storage to be attached you have to specify
a volume in the &lt;code>spec.templates.spec.volumes&lt;/code> block of your virtual machine. This volume must then be referenced as a
device in &lt;code>spec.templates.spec.domain.devices.disks&lt;/code> or &lt;code>spec.templates.spec.domain.devices.filesystems&lt;/code>.&lt;/p>
&lt;p>A sample configuration of a PersistentVolumeClaim mounted as a disk:&lt;/p></description></item><item><title>Using StorageProfiles</title><link>/docs/storage/storageprofiles/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>/docs/storage/storageprofiles/</guid><description>&lt;p>When working with storage and the containerized data importer, one usually wants to have meaningful defaults. Let us have a look
at how we can configure storage profiles to be used with OpenShift Virtualization.&lt;/p>


&lt;div class="alert alert-warning" role="alert">
&lt;h4 class="alert-heading">Warning&lt;/h4>

Due to the cluster-wide configuration of storage classes, the resources and commands in this lab are not meant to be created and executed!

&lt;/div>

&lt;h2 id="what-are-storage-profiles">What are storage profiles&lt;/h2>
&lt;p>For each available StorageClass, OpenShift Virtualization creates a StorageProfile resource. StorageProfiles serve as a source of information about
the recommended parameters for a PVC. They are used when provisioning a PVC using a DataVolume. Having recommended parameters
defined centrally in a StorageProfile reduces the complexity of your DataVolume definition.&lt;/p></description></item><item><title>Hotplugging disks</title><link>/docs/storage/hotplug-disks/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>/docs/storage/hotplug-disks/</guid><description>&lt;p>In this section we will hotplug a disk to a running virtual machine.&lt;/p>
&lt;h2 id="task-631-starting-a-virtual-machine">Task 6.3.1: Starting a virtual machine&lt;/h2>
&lt;p>First, create a file &lt;code>vm_lab06-cirros.yaml&lt;/code> in the folder &lt;code>labs/lab06&lt;/code> and start with the following virtual machine definition:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-yaml" data-lang="yaml">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#204a87;font-weight:bold">apiVersion&lt;/span>&lt;span style="color:#000;font-weight:bold">:&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>&lt;span style="color:#000">kubevirt.io/v1&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f8f8f8;text-decoration:underline">&lt;/span>&lt;span style="color:#204a87;font-weight:bold">kind&lt;/span>&lt;span style="color:#000;font-weight:bold">:&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>&lt;span style="color:#000">VirtualMachine&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f8f8f8;text-decoration:underline">&lt;/span>&lt;span style="color:#204a87;font-weight:bold">metadata&lt;/span>&lt;span style="color:#000;font-weight:bold">:&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>&lt;span style="color:#204a87;font-weight:bold">name&lt;/span>&lt;span style="color:#000;font-weight:bold">:&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>&lt;span style="color:#000">lab06-cirros&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f8f8f8;text-decoration:underline">&lt;/span>&lt;span style="color:#204a87;font-weight:bold">spec&lt;/span>&lt;span style="color:#000;font-weight:bold">:&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>&lt;span style="color:#204a87;font-weight:bold">runStrategy&lt;/span>&lt;span style="color:#000;font-weight:bold">:&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>&lt;span style="color:#000">Halted&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>&lt;span style="color:#204a87;font-weight:bold">template&lt;/span>&lt;span style="color:#000;font-weight:bold">:&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>&lt;span style="color:#204a87;font-weight:bold">metadata&lt;/span>&lt;span style="color:#000;font-weight:bold">:&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>&lt;span style="color:#204a87;font-weight:bold">labels&lt;/span>&lt;span style="color:#000;font-weight:bold">:&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>&lt;span style="color:#204a87;font-weight:bold">kubevirt.io/domain&lt;/span>&lt;span style="color:#000;font-weight:bold">:&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>&lt;span style="color:#000">lab06-volume&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>&lt;span style="color:#204a87;font-weight:bold">spec&lt;/span>&lt;span style="color:#000;font-weight:bold">:&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>&lt;span style="color:#204a87;font-weight:bold">domain&lt;/span>&lt;span style="color:#000;font-weight:bold">:&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>&lt;span style="color:#204a87;font-weight:bold">devices&lt;/span>&lt;span style="color:#000;font-weight:bold">:&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>&lt;span style="color:#204a87;font-weight:bold">disks&lt;/span>&lt;span style="color:#000;font-weight:bold">:&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>- &lt;span style="color:#204a87;font-weight:bold">name&lt;/span>&lt;span style="color:#000;font-weight:bold">:&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>&lt;span style="color:#000">rootdisk&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>&lt;span style="color:#204a87;font-weight:bold">disk&lt;/span>&lt;span style="color:#000;font-weight:bold">:&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>&lt;span style="color:#204a87;font-weight:bold">bus&lt;/span>&lt;span style="color:#000;font-weight:bold">:&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>&lt;span style="color:#000">virtio&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>- &lt;span style="color:#204a87;font-weight:bold">name&lt;/span>&lt;span style="color:#000;font-weight:bold">:&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>&lt;span style="color:#000">cloudinitdisk&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>&lt;span style="color:#204a87;font-weight:bold">disk&lt;/span>&lt;span style="color:#000;font-weight:bold">:&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>&lt;span style="color:#204a87;font-weight:bold">bus&lt;/span>&lt;span style="color:#000;font-weight:bold">:&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>&lt;span style="color:#000">virtio&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>&lt;span style="color:#204a87;font-weight:bold">interfaces&lt;/span>&lt;span style="color:#000;font-weight:bold">:&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>- &lt;span style="color:#204a87;font-weight:bold">name&lt;/span>&lt;span style="color:#000;font-weight:bold">:&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>&lt;span style="color:#000">default&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>&lt;span style="color:#204a87;font-weight:bold">masquerade&lt;/span>&lt;span style="color:#000;font-weight:bold">:&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>{}&lt;span style="color:#f8f8f8;text-decoration:underline">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>&lt;span style="color:#204a87;font-weight:bold">resources&lt;/span>&lt;span style="color:#000;font-weight:bold">:&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>&lt;span style="color:#204a87;font-weight:bold">requests&lt;/span>&lt;span style="color:#000;font-weight:bold">:&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>&lt;span style="color:#204a87;font-weight:bold">memory&lt;/span>&lt;span style="color:#000;font-weight:bold">:&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>&lt;span style="color:#000">64M&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>&lt;span style="color:#204a87;font-weight:bold">networks&lt;/span>&lt;span style="color:#000;font-weight:bold">:&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>- &lt;span style="color:#204a87;font-weight:bold">name&lt;/span>&lt;span style="color:#000;font-weight:bold">:&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>&lt;span style="color:#000">default&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>&lt;span style="color:#204a87;font-weight:bold">pod&lt;/span>&lt;span style="color:#000;font-weight:bold">:&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>{}&lt;span style="color:#f8f8f8;text-decoration:underline">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>&lt;span style="color:#204a87;font-weight:bold">volumes&lt;/span>&lt;span style="color:#000;font-weight:bold">:&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>- &lt;span style="color:#204a87;font-weight:bold">name&lt;/span>&lt;span style="color:#000;font-weight:bold">:&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>&lt;span style="color:#000">rootdisk&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>&lt;span style="color:#204a87;font-weight:bold">containerDisk&lt;/span>&lt;span style="color:#000;font-weight:bold">:&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>&lt;span style="color:#204a87;font-weight:bold">image&lt;/span>&lt;span style="color:#000;font-weight:bold">:&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>&lt;span style="color:#000">quay.io/kubevirt/cirros-container-disk-demo&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>- &lt;span style="color:#204a87;font-weight:bold">name&lt;/span>&lt;span style="color:#000;font-weight:bold">:&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>&lt;span style="color:#000">cloudinitdisk&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>&lt;span style="color:#204a87;font-weight:bold">cloudInitNoCloud&lt;/span>&lt;span style="color:#000;font-weight:bold">:&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>&lt;span style="color:#204a87;font-weight:bold">userData&lt;/span>&lt;span style="color:#000;font-weight:bold">:&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>&lt;span style="color:#000;font-weight:bold">|&lt;/span>&lt;span style="color:#8f5902;font-style:italic">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#8f5902;font-style:italic"> #cloud-config&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline"> 
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Create and start the virtual machine with:&lt;/p></description></item><item><title>VM snapshot and restore</title><link>/docs/storage/snapshot/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>/docs/storage/snapshot/</guid><description>&lt;p>OpenShift Virtualization provides a snapshot and restore functionality. This feature is only available if your storage driver supports &lt;code>VolumeSnapshots&lt;/code> and a &lt;code>VolumeSnapshotClass&lt;/code> is configured.&lt;/p>
&lt;p>You can list the available &lt;code>VolumeSnapshotClass&lt;/code> with:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-yaml" data-lang="yaml">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">oc get volumesnapshotclass --namespace lab-&amp;lt;username&amp;gt;&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline">
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;pre tabindex="0">&lt;code>NAME DRIVER DELETIONPOLICY AGE
longhorn-snapshot-vsc driver.longhorn.io Delete 21d
&lt;/code>&lt;/pre>&lt;p>You can snapshot virtual machines in running or stopped state. Using the QEMU guest agent the snapshot can
temporarily freeze your VM to get a consistent backup.&lt;/p></description></item><item><title>Resizing a Disk</title><link>/docs/storage/resizing-disks/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>/docs/storage/resizing-disks/</guid><description>&lt;p>In this section we will resize the root disk of a virtual machine.&lt;/p>
&lt;h2 id="requirements">Requirements&lt;/h2>
&lt;p>Resizing disks depends on the Kubernetes storage provider. The CSI driver must support resizing volumes and must be configured with &lt;code>AllowVolumeExpansion&lt;/code>.&lt;/p>
&lt;p>Further, it may depend on the operating system you use. Whenever the volume is resized, your VM might see the change
in disk size immediately. But there might still be the need to resize the partition and filesystem. Fedora Cloud for instance
has the package &lt;code>cloud-utils-growpart&lt;/code> installed. This rewrites the partition table so that the partition takes up all
the space available. This makes it a very handy choice for resizing disk images.&lt;/p></description></item><item><title>Introduction</title><link>/docs/live-migration/live-migration-introduction/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>/docs/live-migration/live-migration-introduction/</guid><description>&lt;p>The live migration feature (LiveMigration) is enabled by default in recent OpenShift Virtualization versions. Previously it needed to be enabled in the OpenShift Virtualization configuration running on the cluster (&lt;code>oc get kubevirt kubevirt -n kubevirt -o yaml&lt;/code>):&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-yaml" data-lang="yaml">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#204a87;font-weight:bold">apiVersion&lt;/span>&lt;span style="color:#000;font-weight:bold">:&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>&lt;span style="color:#000">kubevirt.io/v1&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f8f8f8;text-decoration:underline">&lt;/span>&lt;span style="color:#204a87;font-weight:bold">kind&lt;/span>&lt;span style="color:#000;font-weight:bold">:&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>&lt;span style="color:#000">KubeVirt&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f8f8f8;text-decoration:underline">&lt;/span>&lt;span style="color:#204a87;font-weight:bold">metadata&lt;/span>&lt;span style="color:#000;font-weight:bold">:&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>&lt;span style="color:#204a87;font-weight:bold">name&lt;/span>&lt;span style="color:#000;font-weight:bold">:&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>&lt;span style="color:#000">kubevirt&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>&lt;span style="color:#204a87;font-weight:bold">namespace&lt;/span>&lt;span style="color:#000;font-weight:bold">:&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>&lt;span style="color:#000">kubevirt&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f8f8f8;text-decoration:underline">&lt;/span>&lt;span style="color:#204a87;font-weight:bold">spec&lt;/span>&lt;span style="color:#000;font-weight:bold">:&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>&lt;span style="color:#204a87;font-weight:bold">configuration&lt;/span>&lt;span style="color:#000;font-weight:bold">:&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>&lt;span style="color:#204a87;font-weight:bold">developerConfiguration&lt;/span>&lt;span style="color:#000;font-weight:bold">:&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>&lt;span style="color:#204a87;font-weight:bold">featureGates&lt;/span>&lt;span style="color:#000;font-weight:bold">:&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>- &lt;span style="color:#000">Sidecar&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>- &lt;span style="color:#000">CommonInstancetypesDeploymentGate&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>- &lt;span style="color:#000">ExperimentalIgnitionSupport&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>- &lt;span style="color:#000">HotplugVolumes&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>- &lt;span style="color:#000">ExpandDisks&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>- &lt;span style="color:#000">Snapshot&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>- &lt;span style="color:#000">VMExport&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>- &lt;span style="color:#000">BlockVolume&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline">
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Additionally, the live migration feature can be configured under &lt;code>spec.configuration.migrations&lt;/code> with a set of configuration parameters. The full list can be found in the &lt;a href="https://kubevirt.io/api-reference/v1.3.0/definitions.html#_v1_migrationconfiguration" target="_blank" rel="noopener">API reference&lt;/a>
.&lt;/p></description></item><item><title>Perform a live migration</title><link>/docs/live-migration/live-migration/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>/docs/live-migration/live-migration/</guid><description>&lt;p>This lab demonstrates how to perform a live migration of a running virtual machine.&lt;/p>
&lt;h2 id="task-721-creating-a-virtual-machine">Task 7.2.1: Creating a virtual machine&lt;/h2>
&lt;p>For this lab we are going to create a Fedora Cloud VM and provide a cloud-init userdata configuration to initialize our VM.&lt;/p>
&lt;p>We will install&lt;/p>
&lt;ul>
&lt;li>an nginx Webserver running on port &lt;code>8080&lt;/code>&lt;/li>
&lt;li>and configure it to return a predefined response (Hello OpenShift Virtualization) when we send requests to it.&lt;/li>
&lt;/ul>
&lt;p>Create the following Secret resource using the import YAML functionality of the OpenShift Web Console:&lt;/p></description></item><item><title>Guest agent</title><link>/docs/monitoring/guest-agent/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>/docs/monitoring/guest-agent/</guid><description>&lt;p>In many of the available cloud images, the &lt;code>qemu-guest-agent&lt;/code> package is already installed. If it&amp;rsquo;s not preinstalled you can use one of the previously learned concepts to install the package.&lt;/p>
&lt;h2 id="task-811-start-a-virtual-machine-and-explore-guest-agent-information">Task 8.1.1: Start a virtual machine and explore guest agent information&lt;/h2>
&lt;p>In this lab we are going to reuse the virtual machine we created in the &lt;a href="/docs/initialize-vms-with-startup-scripts/cloud-init/">4.2. Cloud-init&lt;/a> lab.&lt;/p>
&lt;p>Start the &lt;code>cloud-init&lt;/code> virtual machine using the following command:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-bash" data-lang="bash">&lt;span style="display:flex;">&lt;span>virtctl start lab04-cloudinit --namespace lab-&amp;lt;username&amp;gt;
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>The presence of the guest agent in the virtual machine is indicated by a condition in the VirtualMachineInstance&amp;rsquo;s status. This condition shows that the guest agent is connected and ready for use.&lt;/p></description></item><item><title>Readiness and liveness probes</title><link>/docs/monitoring/probes/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>/docs/monitoring/probes/</guid><description>&lt;p>Liveness and readiness probes can be configured for VirtualMachineInstances similarly to how they are defined for containers. You can find more information about these probes &lt;a href="https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/" target="_blank" rel="noopener">in Kubernetes&amp;rsquo; documentation&lt;/a>
.&lt;/p>
&lt;p>Liveness probes will stop the VirtualMachineInstance if they fail, allowing higher-level controllers, such as VirtualMachine or VirtualMachineInstanceReplicaSet, to create new instances that should be responsive.&lt;/p>
&lt;p>Readiness probes signal to Services and Endpoints whether the VirtualMachineInstance is ready to handle traffic. If these probes fail, the VirtualMachineInstance will be removed from the list of Endpoints backing the Service until the probe recovers.&lt;/p></description></item><item><title>Prometheus monitoring</title><link>/docs/monitoring/prometheus-monitoring/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>/docs/monitoring/prometheus-monitoring/</guid><description>&lt;p>Prometheus is an open-source monitoring and alerting toolkit designed for reliability and scalability. It collects real-time metrics from services and systems, stores them in a time-series database, and provides powerful querying capabilities. Prometheus operates with a pull-based model, scraping metrics from endpoints at regular intervals. It supports multi-dimensional data through labels, enabling flexible queries and insights. Paired with tools like Grafana for visualization, Prometheus is widely used for monitoring cloud-native applications, infrastructure, and system performance, with built-in alerting to notify users of potential issues.&lt;/p></description></item><item><title>Prometheus Node Exporter</title><link>/docs/monitoring/node-exporter/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>/docs/monitoring/node-exporter/</guid><description>&lt;p>The Prometheus Node Exporter is a key component used for collecting operating system metrics from Linux and Windows systems. It exposes a wide range of system-level metrics that Prometheus can scrape, making it useful for monitoring the health and performance of physical and virtual machines.&lt;/p>
&lt;p>Some of the key metrics collected by Node Exporter include:&lt;/p>
&lt;ul>
&lt;li>CPU usage: Tracks how much CPU time is being used by user and system processes&lt;/li>
&lt;li>Memory usage: Monitors free and used memory, swap space, and buffer/cache utilization&lt;/li>
&lt;li>Disk I/O: Provides insights into disk read/write operations and storage usage&lt;/li>
&lt;li>Network statistics: Captures metrics on data sent and received over network interfaces&lt;/li>
&lt;li>File system usage: Monitors available and used space on file systems&lt;/li>
&lt;/ul>
&lt;p>Node Exporter runs as a lightweight daemon on each node and is easy to install and configure. It works out of the box, exposing most common system metrics through the &lt;code>/metrics&lt;/code> endpoint, but can also be extended with additional collectors to gather more specialized data. These metrics can be visualized through tools like Grafana, helping administrators monitor and troubleshoot infrastructure performance.&lt;/p></description></item><item><title>Requirements</title><link>/docs/superlab/requirements/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>/docs/superlab/requirements/</guid><description>&lt;p>For this lab we do not provide a step-by-step guide for the implementation. The goal is that you implement the required
manifests yourself. However, we provide a sample solution in the next chapter. Your solution may vary from ours.&lt;/p>
&lt;h2 id="basic-information">Basic Information&lt;/h2>
&lt;p>The goal of this super lab is to deploy a database and a web application connecting to this database. The database should
be run within a OpenShift Virtualization virtual machine. We do provide the web application as container image.&lt;/p></description></item><item><title>Sample Solution</title><link>/docs/superlab/solution/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>/docs/superlab/solution/</guid><description>&lt;p>As we did not provide a step-by-step guide for the super lab, you can find a sample solution for the lab as kubernetes resources. This is a sample solution and your outcome may vary.
The following code blocks contain multiple manifests separated with &lt;code>---&lt;/code>. You can write them to one file (e.g. &lt;code>multiple-manifests.yaml&lt;/code>) and apply them all together.&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-shell" data-lang="shell">&lt;span style="display:flex;">&lt;span>oc create -f multiple-manifests.yaml
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>If you want to inspect the used cloud-init scripts you can decode the base64 string from the secrets in the code blocks below. Copy the base64 string and use the following command:&lt;/p></description></item></channel></rss>