We're sorry but this page doesn't work properly without JavaScript enabled. Please enable it to continue.
Feedback

Running virtual machines out of thin air

00:00

Formal Metadata

Title
Running virtual machines out of thin air
Title of Series
Number of Parts
490
Author
License
CC Attribution 2.0 Belgium:
You are free to use, adapt and copy, distribute and transmit the work or content in adapted or unchanged form for any legal purpose as long as the work is attributed to the author in the manner specified by the author or licensor.
Identifiers
Publisher
Release Date
Language

Content Metadata

Subject Area
Genre
Abstract
How to run virtual machines in oVirt without copying their disks. Have you ever wanted to run your virtual machine in oVirt without copying its hugh disks? Tired of checking the slow transfer progress? We did, and we have a good plan to avoid the wait! In this talk we show how oVirt can start virtual machine without copying the disks, using external disk via NBD or other protocols supported by qemu. Once the virtual machine is running, copy the disks in the background to oVirt storage. This minimizes downtime to seconds instead of minutes, and can be used in many scenarios such as importing virtual machines from other systems (even from foreign systems via virt-v2v), previewing backups before restore, and provisioning a virtual machines. Audience: Virtualization administrators or developers interested in oVirt architecture and would like a peek into future development.
SoftwarePrincipal idealTrigonometric functionsProjective planeComputer animation
Software development kitMiniDiscVirtual machineMiniDiscVirtual machineMathematicsComputer animation
Data storage deviceSCSIType theoryPhysical systemMiniDiscMiniDiscData storage deviceType theoryComputer fileServer (computing)iSCSIVirtual machineComputer animation
MiniDiscMiniDisc
File Transfer ProtocolSCSINegative BinomialverteilungFirst-person shooterType theoryComputer networkMiniDiscReal numberPhysical systemMiniDiscSoftwareComputer animation
Physical systemPhysical systemComputer animation
Physical systemMiniDiscVirtual machineSoftware testingPivot elementMiniDisc2 (number)Physical systemMultiplication signMaxima and minimaData storage deviceGoodness of fitRight angleLecture/Conference
MiniDiscCodeDataflowComputer animation
Insertion lossComputer fileParameter (computer programming)Interface (computing)MiniDiscScripting languageBuildingData modelBuildingEndliche ModelltheorieMereologyScripting languageValidity (statistics)MiniDiscParameter (computer programming)MathematicsComputer fileUniform resource locatorCategory of beingObject (grammar)Computer animationLecture/Conference
MiniDiscPasswordRootFunction (mathematics)Physical systemMiniDiscMedical imagingPhysical systemSoftware testingComputer animationLecture/Conference
InformationFile formatVirtual realityComputer-generated imagerySoftware testingMiniDiscMedical imagingInformationUniform resource locatorMotherboardComputer animation
Demo (music)MiniDiscInterior (topology)Multiplication signComputer animation
Demo (music)MiniDisc2 (number)Medical imaging
Demo (music)MiniDiscVirtual machineInformationMedical imagingSoftware testingVirtual machineSource codeComputer animation
Virtual machineMiniDiscOpen setTime domainData storage deviceDomain nameData storage deviceMiniDiscComputer animation
Demo (music)Virtual realityVirtual machineMultiplication signComputer animation
2 (number)MiniDiscComputer animation
MiniDiscComputer animation
Demo (music)2 (number)BootingComputer animation
MiniDiscSource codeFile formatData storage deviceTime domainOpen setHuman migrationCache (computing)Source codeOperator (mathematics)MiniDiscComputer fileCommunications protocolHuman migrationData storage deviceDomain nameMoment (mathematics)Physical systemComputer animation
Demo (music)MiniDiscHypermediaView (database)VideoconferencingDemo (music)Open setDomain nameMiniDiscComputer animation
View (database)Operator (mathematics)Human migrationSource codeComputer animation
Demo (music)MiniDiscSoftware development kitCartesian coordinate systemComputer animationLecture/Conference
MiniDiscComputer clusterSoftware development kitType theoryMiniDiscData storage deviceBand matrixDomain nameSource codeService (economics)OrbitMobile appCartesian coordinate systemCategory of beingComputer animation
Software development kitDemo (music)Commodore VIC-20Online helpDemo (music)2 (number)Software development kitMiniDiscComputer animationLecture/Conference
View (database)VideoconferencingOnline helpLoginVideo game consoleScripting languageBootingFilm editingSlide ruleMiniDiscCASE <Informatik>Type theoryOperator (mathematics)Message passingComputer animationLecture/Conference
Type theoryMoving averageFlow separationPhysical system2 (number)Computer animation
Moving averageDemo (music)Demo (music)Flow separationOperator (mathematics)Multiplication signMiniDiscComputer animationLecture/Conference
Moving averageDemo (music)Computing platformVirtual realityPatch (Unix)EmulationUniform resource locatorInformationResultantOpen sourceVirtual machineUniform resource locatorSheaf (mathematics)Patch (Unix)Computer configurationSource codeGoogolDemo (music)Multiplication signClosed setCodeWritingComputer animation
Local ringMiniDiscVirtual machineDistanceSoftware developerServer (computing)Key (cryptography)Information securityData centerTransport Layer SecurityMedical imagingComputer animation
Point cloudFacebookOpen source
Transcript: English(auto-generated)
Hello everyone. I'm Nir from Red Hat,
PCP engineer Red Hat, working on OVID. Hi, I'm Daniel Lares, an engineer at Red Hat and the contributor of OVID project. So today we want to talk about running VM from signal from nursing and the magic to do it.
So first, we introduce the problem is the disks, copying disk and why we want to run VM without disks. We'll see how we can cast the magic and how we can run VM without disks. Then we will try to work OVID to add this feature.
Finally, we'll see how we can actually do this using the changes we made, how we can expose disk, importing virtual machines quickly, and how we can use all the new features using the SDK.
So first, OVID supports a lot of storage types. We support anything. In recent releases, we support also single storage. So everything is good, but how do you use a disk which is not in your OVID setup? You cannot access the iSCSI server or whatever storage.
Maybe it's a local file on some real machine and you have some nice VM there that you want to get. So what do you do? Well, it's not new. We have a lot of solutions for importing VMs. From LIViAT, from VML,
we can download these and upload them to OVID. But big disks are big and copying them is slow. So do we have a better solution? For example, maybe you can use some magic to turn this fog into a princess. We do. What you see here is
a real QAIMO command line running VM without any disk, this NBDOL. So we know that QAIMO is very complicated and the command line is very complicated, but this is a real command line that works. QAIMO supports a lot of external disk format,
network disks like SSH and HTTP and FTP and many others. So I think it would be useful to use some disk on another system without copying it. Let's try to change OVID to do it.
So now, Daniel will explain how we can cast the magic. Okay. Let's see how can we cast the magic in OVID. So we have our little OVID mouse on the left side. And the tasty cheese on the external system. How do we help our mouse getting the cheese?
So first step, we have a tasty disk on some external system and it connected to a VM, but we cannot access it. What can we do? First step, stop the VM. It will take just a few seconds.
You can see the time elapsed on the upper left, upper right corner. So next, we need to expose the disk with QAIMO NBD. External system. Next, now we can create a temporary disk on OVID.
Just make sure that the disk is in redone mode, so we don't corrupt the data. And now this is about 15 seconds elapsed. Next step, we can simply start the VM with the temporary disk. So less than 20 seconds with a running VM on a disk
that is on an external system. Okay. Now we need to decide whether we want to delete or keep the VM. Do you want to keep or delete by raise of hand? Someone? Good enough.
Let's keep. Let's try to keep it. Okay. If we want to keep it, we just need to mirror the temporary disk to the destination. We do this by using large storage migration, which is a feature we already have.
Next step, we simply pivot to the destination disk and then the VM can use the new disk with minimal downtime, like 20 seconds. And next step, just for cleanup, delete the temporary disk. Next, unexpose the external disk,
since we exposed it earlier with QAIMO NBD. Okay. Let's see what we do if we want to delete it. First step, shut down the VM. Next, delete the temporary disk and unexpose the external disk.
So this is the basic callback and cleanup. Okay. So now Nir will show how to hack. So how can we actually implement this in Ovid? Basically, you can do this flow without changing Ovid code If you create a disk, go to disk directly
and rebase it on NBD URL. But we wanted something more, easier to use. So we have to dirty our hands with Ovid code. So first we need to change the Ovid API model. Everything in Ovid is designed using the API model.
So we have a disk object. We want to edit external disk property. So we can plug there one of the many URLs that QAIMO supports. This was easy, changing one file. Then we need to work a little more on the engine,
adding external disk argument. When you create a disk and pass it to VDSM, this is much more work. And you want Daniel on your side when you're doing it. And then Daniel added external disk URI in the UI. So we can just plug URL in the UI
when you want to create the disk. Again, more work. And finally we need to change VDSM which was probably the biggest change to accept external disk, validate it and do anything you need to use it. And of course we want an example
script in the SDK showing how you can use this API which was the biggest part. And I didn't mention Ansible. We also have Ansible layer that we didn't touch. But probably Ansible we want to allow using it.
And once you finish all the changes, you need to build Ovid. It's not so trivial. First you need to build the Ovid engine API model because the engine depends on it and Ovid engine depends on it and the SDK depends on it. And once you build everything, you can build VDSM and try everything.
Now let's move to Daniel to explain how do you expose disk. Okay, let's see how to actually expose the disk with QNTT. First, we need to create a test image so what the cool kids are using today is VIR builder so just invoke the VIR builder
to create some federal 13 image. Next, expose the disk on external system. How do we do it? QMOMPD is your best friend. Simple command line. You can expose the image the image we created before. Now, we need to test if
expose actually worked. We use QMOM image info on the MBD URL and we can see that we have some info on the image so the image was exposed correctly. Okay, let's see show demo, movie time.
Okay, so this is a show demo
just of the VIR builder flow. Okay, so we invoke the command uncompressing the disk opening the new disk and we can see that the image is created now we will expose it
it is exposed few seconds now we'll move to the another machine and test it with QMOM image info. Okay, let's return.
Okay, so now let's see how we can actually import the VM so to create the VM first step is opening the VM dialog in the UI create the disk on some temporary storage domain and specify the external disk URI in the disk dialog
then just run the VM movie time again I've created the UI okay, so we click the new button
open the create VM dialog specify some name create a new disk, specify the size then we'll specify the URL that we just exposed of the external disk a few seconds will approve it
and we have okay, the disk is created and done. Now we can run the VM and we see
the boot in a few seconds we have running VM with Fedora 13
and that's it for the demo we have a SQL in a moment now let's see how the VM XML really looks we see the backing store it uses source
protocol NBD on some external system, so we know the disk is actually using the external system the disk on the external system is a backing file now how do we import the external disk again, we need to open the VM disk tab and push the move button
on the disk to move it to the target storage domain which invokes the live storage migration operation just another small demo let's open
okay, so click on the VM as before find the disk find the move button click on it select the target domain approve and this will
start the live migration operation it could take a while since it actually copies the entire data from the source to the target so we can continue just a sec okay, so
we will show you all about the SDK take it from here so you think the UI is nice and easy, but if you want to write some interesting application you want something that we can program, so let's see how we can use the SDK using external disks first we added external disk
property to disk, so you can just create a disk with external disk and of course the person writing the application must handle the exposing of the disk which can be NBD or HTTP or whatever, so we did not implement anything there
and then we need to create a VM and attach the disk to the VM, the old disk is standard of your API usage and we have to start the VM so the VM is running did we pull the rabbit from the
app that you've seen at the start well, not yet we need to move the disk so to move the disk to another storage domain actually copying the data from the source into orbit we need to get the disk service using the disk ID and use the move command with the storage domain, destination storage domain
and then we have to wait a lot of time, of course, depending on the disk size and storage and bandwidth and whatever but once all this is running, we can use the VM maybe our users are using the VM and everyone is happy
so let's see a demo of this
so we run the quick import example that you can find in the Python SDK after it will be merged everything here is not merged we create the external disk using camera image, we created the new disk created the VM, attached it and the VM is powering up in 13 seconds
and now we can open the console and login Daniel did some cuts here so he missed the boot messages and we have a working VM that you can use so if you want to keep this VM
the example script will just let you continue and it will start a move operation so let's answer yes and now we can go and drink a few coffees depending on the type of the disk of course in this case it was pretty quick
it will soon be finished but Daniel made some cuts here again so let's move to the next slide how do we roll back? it's quite easy everything is turned out, just stop the VM and remove it
that's all, you wait a little and in a few seconds you can remove the VM so if you imported the VM and something is not right so you have several seconds of downtime, now you want to roll back in a few seconds you can roll back everything and start again the VM on the other system
and again a demo of this so again we created the VM but this time
we said no so we are just stopping the VM and removing the disk which is quite a quick operation and of course you can have a VM with several disks obviously it will do everything for you with the same API
so I think we pulled the rabbit for that and another result of this work was a patent we filed a patent for minimizing the downtime when importing virtual machines so it will be available
to anyone writing open source code and not to the people writing closed source code, which is nice and if you want to learn more about this you can check the patches which are in review actually it's worked from last year that we didn't have time to complete all the demos
are available in this URL in Google Drive and if you want to know more about external disk, all the options you can use this section so that's all do we have any questions?
the distance between the VM or what's your experience with that?
the question is about does it matter what is the distance between the disk and the VM we didn't try it but I believe with NBD it should be pretty efficient so you probably can import VM from Amazon to your data center I never tried it
we only tried on development setup on the same machine running on VMs but it should be pretty efficient we tried with HTTP, it's less efficient when you have a lot of latency but with local HTTP server, it's also very fast
yes doesn't that kind of defeat the purpose
of any security? you can use TLS the question was if NBD is a security issue because it's not dedicated and not encrypted so what we use here is indeed the unsecured NBD
but you can use TLS-based NBD recently it was added TLS PSK support so you can pass a shared key to the server and to overt it's not implemented, of course but we can implement it with secured NBD
or HTTPS another question? yes so the question was if we need to
expose the image read only yes, if you have a running VM using this disk you cannot you cannot use disk some other VM is changing it will corrupt the image on the other side so it must be read only but you can, for example, create a snapshot
on some other VM and expose the snapshot while the other VM is on it and then of course you will lose everything that will change since the last snapshot more questions?
ok, so thank you