Deploying virtual machines in OpenShift Virtualization on Red Hat OpenShift Service on AWS
Once you have bare metal nodes running on your Red Hat® OpenShift® Service on AWS (ROSA) environment and OpenShift Virtualization configured, you can deploy virtual machines (VMs) to it. In this resource, Alan Cowles, Technical Principal Product Manager at Red Hat, walks through the steps needed to create new VMs and deploy them.
What will you learn?
- How to deploy VMs in OpenShift Virtualization
- How to deploy and customize VMs with OpenShift Virtualization
What you need before starting:
- Red Hat account
- AWS account
- ROSA cluster running with bare metal nodes
- OpenShift Virtualization Operator installed on your node
Deploying VMs in OpenShift Virtualization on ROSA
Alan Cowles (00:00):
Hello, my name is Alan Cowles. I'm a principal product manager at Red Hat, and this is our continuing demonstration of the Red Hat OpenShift Service on AWS, or ROSA, and OpenShift Virtualization. Now, in our previous demo, we did the configuration steps, the prerequisites, to set up this environment. Which involved adding additional compute nodes to the ROSA environment that are of the bare metal type.
(00:30)
It also involved us installing the operator for OpenShift Virtualization and configuring it. And now we are going to be taking a look at virtualization and deploying some virtual machines. We're going to start out by going to our catalog, and in our catalog we'll see that there are a number of Linux virtual machines automatically available when you enable OpenShift Virtualization. And you know that they're available because they have this ‘source available’ icon. And what that actually means is that under the storage menu, there are already persistent volumes.
(01:12):
You see RHEL 8, Fedora, CentOS Stream 9, but there are already volumes available with those operating systems that can be cloned to create a VM. So we're going to select our Linux VMs project and create a Red Hat Enterprise Linux 9 VM. And we have the option to do a quick create on the virtual machine, but we can also customize it and we can take a look at some of these options. The options allow you to set the password or accept a random one that is generated by cloud-init, and allows you to change that data source of which volume you would like to clone for this virtual machine. Clicking on ‘next,’ we can see that it allows us to also edit the CPU and memory that's available to the virtual guest, and also to change its disc size as well as its networking.
(02:09):
So we're just going to go ahead and create this virtual machine, and we are going to wait for a few moments for volume binding and you'll see that it is currently provisioning.
(02:30):
The process to provision a VM can take a few minutes, but the status will be updated live as the process continues.
(03:30):
And as we can see our VM is beginning to post here. We can go ahead and open our web console and we are up and running with a Red Hat Enterprise Linux 9 system on OpenShift Virtualization on our ROSA cluster. Now, while it's easy to boot Linux virtual machines, because we already have the images available, one thing that we can also do is (using the templates that are available) we can also run Windows machines. So I'm going to take this opportunity to switch to the Windows VMs project, and then I am going to create a Windows Server 2012. Now notice there's no quick create option here because not everything's ready to go, but I'm going to customize this virtual machine and it's going to ask me what media I would like to boot from.
(04:47):
And in this case, I'm going to actually upload a new PVC that I would like to use and I can browse my local system for one that I have available for that. And I [00:05:00] have actually downloaded a pre-made Windows Server 2012 image here. So you can see it's getting prepared to create a persistent volume that it can then upload this image to. And now the upload process has begun, and we're probably going to go ahead and speed along this demo at this stage and pick up after the upload has completed. With our upload of our image complete, we can now create this virtual machine and it's going to be very similar to the Linux VM process from earlier. We'll see the status go from starting to provisioning, and when the VM is ready, we will see graphics appear in the VNC console window.
(06:34):
You can see the Windows VM is now coming up in the VNC console. We can go ahead and open the web console to get a larger view of this.
(06:57):
There are a few things running here that are part of the cloud-init process [00:07:00] for Windows virtual machines. But when the machine is completely booted, we will be ready to go.
(07:34)
And now that our VM has completed booting, it'll ask us to change our administrator password so we can go ahead and do this. And with that, we are now running a Windows Server 2012 virtual machine on OpenShift Virtualization on Red Hat OpenShift service on AWS or ROSA. Going back just to look at our virtualization overview, and we can see that we have currently two virtual machines running. The VCP usage is currently two, and we're using about 600 mbs of memory. Thank you for viewing my demonstration where we took a look at how to deploy both a Linux and a Windows virtual machine into OpenShift Virtualization running on the Red Hat OpenShift Service on AWS, or ROSA. I hope you enjoyed this demonstration and I look forward to having you join me for future demonstrations.
Now you have learned how to deploy custom or quickly created VMs using OpenShift Virtualization. Next, learn about how you can import existing VMs from other environments into OpenShift Virtualization.