 ‫תודה רבה. ‫תודה רבה. ‫אני נראה של רדאט, ‫פי-סיפינג'ניה רדאט, ‫שעבר על עבירת. ‫אני דניאלירס, ‫עבר רדאט, ‫וכתבולטור של עבירת. ‫אז היום אנחנו רוצים להסתכל ‫על יעביר ה-VM ‫של סינר, של נושאים. ‫המגיקה לעשות את זה. ‫אבל first we introduced the problem with the disks, ‫לשפחת את זה ולמיבן לעשות את ה-VM ‫של ה-VM. ‫אנחנו נראה ככה אנחנו יכולים להגרם את ה-VM ‫ללמיות ה-VM, ‫אבל далее אנחנו אנסים על את זה ‫לעביר את ה-VM. ‫ואפ nhất אנחנו נראה ככה אנחנו יכולים ‫להתחיל של זה ‫עם המהרג, ‫איך אנחנו יכולים לדחים את ה-VM, ‫לדחי חלב של פרופות ‫וספגם, ואיך אנחנו יכולים להסתכל על המחשבים שאתם חושבים על ה-SDK So first Ovid supports a lot of storage types We support anything In recent releases we support also Cinder storage So everything is good But how to 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 you, we have a lot of solutions for importing VMs From LiveVirt, from VMware We can download this 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 And we do What you see here is a real QMU command line Running VM without any disk with nbdo rl So we know that QMU is very complicated And the command line is very complicated But this is a real commander that works QMU supports a lot of external disk format Network disk like SSH, NGTP, 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 a 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 right corner So next we need to expose the disk with QMU nbdo An external system Next we need Now we can create a temporary disk on Ovid Just make sure that the disk is in the original 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 We have 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? Resolve and someone? Good enough Let's keep, let's keep, 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 live 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 We start 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 QMNDD 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 rollback and cleanup Okay, so now, Nier, we'll show how to act perfectly So how can we actually implement this in OVET? Basically, you can do this flow Without changing OVET code If you create a disk, go to this directly And place it on NBDOI But we wanted something more easier to use So we have to dirty our hands with OVET code So first, we need to change the OVET API model Everything in OVET is designed using the API model So we have a disk object You want to edit external disk property So we can plug there one of the many URLs that QMND 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 site when you're doing it And then Daniel added external disk URI in the UI So you can just plug URL in the UI When you want to create a 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 A script in 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 OVET, it's not so trivial First, you need to build the OVET engine API model Because engine depends on it OVET engine depends on it And SDK depends on it And once you build everything You can build with DSM And try everything Now, let's move to Daniel to explain How do you expose disk? Okay, let's see how do we actually expose the disk With QNU entity First, we need to create a test image So what the cool kids are using today Is VIRT builder We need to work the VIRT builder To create some Fedora 13 image Next, expose the disk on external system How do we do it? QMU NBD is your best friend Simple command line You can expose the image The image we created before Now, we need to test If we expose the actually worked We use QMU image info on the NBD URL And you can see that we have some info on the image So the image was exposed correctly Okay, let's see a short demo Move the time Okay, so this is a short demo Just of the VIRT 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 for a few seconds Now, we'll move to another machine And test it with QMU 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 VL Move it time again I'll create it in the UI Okay, so we click the new button Open the create VM dialog Specifying some name Creating a disk Specify the size Then we'll specify the URL That we just exposed of the external disk A few seconds we'll prove it With... 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 $13 And that's it for the demo We have a sequel In a moment Now, let's see how the VM XML Really looks We have the... 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 It's open So, we click on the VM as before Find the disk Find the move button Click on it Select the target domain Prove 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 Nier will show you all about the SDK Take it from Nier So, you think the UI is nice and easy 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 All this 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 Of it We need to get the disk service Using the disk ID And use the move command With the 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 A 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 a camera image We create the new disk Get the VM attached to 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 tips will just let you Continue And it will start the 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 And it will soon be finished But Daniel made some cuts here again So, let's move to The next slide How do we all back? It's pretty easy Everything is started I'll just stop the VM And remove it That's all, you wait a little And in few seconds You can remove the VM So, if you import the VM And something is not right So, you have several seconds Of downtime Now you want to roll back In 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 just stopped the VM And removed the disk Which is pretty quick operation And of course You can have a VM With several disks Of it will do everything For you with the same API So, I think we pulled the orbit 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 for 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 That the camera supports You can use this section In the camera manual So, that's all Do you have any questions? 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 Lot of latency But with local HTTP server It's also very fast Yes 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 There was added TLS PSK support So, you can pass Shared key to the server And to OVRT 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 Explore the image read-only Yes, if you have a running VM Using this disk You cannot You cannot use this Which 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 running And then, of course, it will lose everything That was changed since the last night More questions? Okay, so thank you