 Selamat datang, semua. Untuk sesi ini, saya akan mulakan dengan Virtual Machine. Saya, Leonard. Saya dari Malaysia. Namun, saya sekarang berdasarkan di Oslo, Nore. Saya bekerja di sebuah perniaga yang menghidupkan infrastruktur cloud membantu pelanggan dan klien untuk memperbaiki infrastruktur cloud dan servisinya. Dalam masa lalu, saya bekerja dengan perniagaan hardware yang mengeluarkan solutions CICD untuk perniagaan hardware mereka. Jadi, ia di mana saya mendapatkan sedikit pengalaman dengan KVM. Ya. Ya, mari kita mulakan. Jadi, jika anda ada pembanyakan, perhubungan untuk membuang tangan anda dan perniagaan akan bergerak atau anda boleh bincang dengan baik-baik saja jika anda mahu, ya. Dan mari kita mulakan dengan konten. Jadi, saya sebenarnya menerima ini untuk menjadi sebuah sesi tutorial atau sesi kerja tapi nampaknya ia menjadi sebuah session berbincang. Tapi bila-bila, mari kita dulu berbincang dengan anda supaya jika anda ingin bekerja bersama dengan material yang di tempat ini, anda boleh buat begitu. Plan saya adalah bahawa semua orang boleh mendapatkan tangan 30 dengan KVM dalam session ini. Jadi itu kata-kata untuk menjelaskan. Saya akan menunjukkan kata-kata ini satu kali sebelum kita pergi. Semua orang dapat kata-kata. Saya akan menunggu. Bagus. Ya. Okey. Kena berbincang dengan virtual machines. Berbicara, berapa banyak anda sebenarnya menggunakan ini untuk menggunakan virtual machines? Okey, itu banyak. Jadi ini mungkin sebuah repetiti tentang apa yang anda sudah berlaku dalam masa lalu, tapi mungkin anda boleh beritahu saya sesuatu yang baru. Jadi mari kita berkongsi bersama-sama. Jadi kata-kata anda telah menjelaskan di deskripsi. Jadi saya tidak mahu menjelaskan. Jadi ini sebuah session ini menjelaskan untuk menjelaskan ini untuk mengikuti teknologi KVM dan menggunakan virtual machine menggunakan interface Koma9 dan juga menggunakan interface penggunaan grafika. Jika kita mempunyai masa. Dan di tengah-tengah tutorial, saya akan menunggu semua orang di sini dalam penonton. Mungkin anda tahu bagaimana menjelaskan laptop hardware atau jika KVM digunakan. Dan juga, jika anda tahu bagaimana mencari, mengubah, mulakan, dan mengubah KVM. Itu... Ya, kata-kata saya untuk hari ini, untuk kami. Ya, itu agenda 90 minit. Jadi pertama-tiga, kami akan menjelaskan bagaimana kami menjelaskan KVM. Jadi kami akan menjelaskan instalasi, konfigurasi, bagaimana menjelaskan sistemnya untuk menggunakan model KVM dan sebagainya. Dan keadaan kecil-kecil ini adalah bagaimana menjelaskan KVM menggunakan interface Koma9 dengan CLI. Dan menggunakan kata-kata ini lebih berbeza tapi hanya menggunakan interface grafika. Ya. Dan, ya. Ya. Pada pertanyaan, selamat datang. Jadi, senang- senang- senang, dan mikrofon atau... akan digunakan. Dan kita boleh berbincang lebih jauh-jauh. Ya, OOV KonoBase Virtual Machine. Jadi... ia adalah teknologi virtualisasi-virtualisasi terbentuk Linux sendiri. Jadi, ia sebenarnya mengambil Linux untuk mengubah menjadi penghantaran. Dan kita akan kembali pada termasuk penghantaran jika beberapa orang tak familiar dengan kita nanti. Ia bermaksud juga bahawa ia menolak komputer host, bagi contoh, laptop saya. Ia dapat mengubah banyak virtualisasi-virtualisasi terbentuk atau virtual machine... virtual machines, maaf. Atau dalam beberapa dokumentasi, ia dipanggil domain. Jadi, kita akan kemudian nanti. Dan jika sistem kamu memiliki Linux 2.6.20 atau lebih baru, kamu sebenarnya mempunyai KVM support ke dalam KonoBase Linux. Ya. Dan teknologi virtualisasi-virtualisasi terbentuk bagi contoh Ubuntu, ia adalah KVM. Dan untuk hardware Intel dan AMD, KVM membutuhkan kawasan virtualisasi. Kita akan kemudian kemudian. KVM juga mempunyai KVM-Z, Linux 1, dan juga ARM. Tetapi, saya tidak mempunyai kemungkinan untuk bermain dengan KVM pada platform ini. Jadi, terutamanya, konten hari ini saya akan mempunyai menggunakan KVM dengan platform 8x86. Jadi, KVM mengubah Linux yang di-engan K1 kawasan tersebut. Kawasan tersebut yang di-engan K1 bermaksud KVM lulusan kawasan tersebut. Kehidupi KVM diperkenalkan sebagai proses Linux diberi dengan kawasan laut dengan komponen hardware yang dihidu. Macam mana, kita boleh melakukan atau actually plug-in dedicated virtual hardware such as network cards, graphic adapter, CPU, memory and this, and so forth. Ya, we got a hypervisor. So, the term hypervisor is to mean that the software stack that to create and one that's a typo I have to fix. So yes, virtual machines. And sometimes a hypervisor is also called a virtual machine monitor, VMM. So it actually isolates the host hypervisor operating system and the resources from the virtual machines and enable the creation and management of those VMs. And also we would not be talking so much on a quick emulator, but we will be seeing quick emulator being used while we sort of interact with the kernel virtual machines. So quick emulator is part of the KVM experience behind the user space backend for it. But it also can be used for the hardware without virtualization extension by using its tiny code generator. So regarding the tiny code generator, it's actually the core binary translation engine that is responsible for enabling Q Quick Emulator to emulate foreign processes on any given supported host. Ya, and sometimes as I mentioned earlier on, virtual machines are called domain. I did some research on it. It has some history with Xen in the past. So the term sort of lingers around. So sometimes we will see this term domain zero. So domain zero is the first domain started by the hypervisor at boot and we will be running the Linux OSX, for example, on this machine. So this domain is a privilege. So it may access the hardware and run tools that manage other domains, so other guest virtual machines. And the other virtual machines is referred sometimes as a domain U or DOM U, which the U stands for user. They are unprivileged and it's equivalent to the guest system or guest virtual machine. So the first task, if you would like to follow along, you can open your laptop and we can actually check how to verify that your support actually have virtualization features enabled. So, for example, as we mentioned earlier in the earlier slides, KVM requires a CPU with virtualization extensions. So the most common to the Intel virtualization technologies called Intel VT. And the CPU flag is VMX, which stands for virtual machine extensions and MD virtualization, which is known as AMD-V. And its equivalent CPU flag is SVM, which stands for Secure Virtual Machine. So we'll get back to this later on. So if to actually check your system, whether it's supporting KVM, or not KVM, but supports a virtualization feature, you can actually try to grab how many to check the flags, whether it exists in the CPU info. Let me try it here. And you can try it on your laptop, too, if you want to do so. Screen's up. Yep, that's good. Yes. Yes, please hold on. I can share the link. Yes, let me share it here, actually. Let me just share the link. Sorry. Yeah, this is the link to the presentation. I will share it for like 30 seconds. All good? Good to go. Okay, here. So we can see that it actually managed to find VMX, the last red line. You can see that VMX which indicates that my system is supporting virtualization by means of Intel CPU with the VMX flag. Do you have screen? Yes. So by chance that your system, if you cannot find any flags on these two, probably that one, it means that your virtualization features is disabled on the biosystem level. So you need to check whether it's enabled on your biosettings. Second is that your CPU doesn't support the virtualization extension. The third one is that because this command is only searching for these two flags. So if you are using a different processor, you might need to find a different flag for that and to search for it in order to check it's enabled. But yeah, and ensure that if the flag is not there, KVM is still could be run but the emulator would fall back to software virtualization, which is much slower. So for example, after we have checked the CPU support on our system, the next step is to actually install the related packages that enables the virtualization environment on your host machine. For example, I have these instructions for Red Hat Fedora or Sennoy system that you can actually install the virtualization group packages, for example. And yeah, and other systems like Ubuntu and Sennoy, it's pretty much similar packages that you need to enable on your host machine in order for KVM to work. And the next thing to check is that after we have installed all the required packages, so we need to enable the virtualization daemon library service, which is known as LeapWritD. So it's a server-side daemon and driver required to manage the virtualization capabilities of the KVM hypervisor. So here we have given two commands here is that we have, if you want to start the virtualization service, so we can system CTL start LeapWritD and if you want to enable it on boot, so we just add another extra command so enable LeapWritD. And one more step to verify that the KVM kernel modules are properly loaded. We can actually do LS modules and then grab for the KVM like AMD or Intel or if you use other processes, you have to check the related flux. Yeah, we can actually do this on my machine here. Let's see. Press mode. So if you can see on the screen here, yes, KVM Intel is there. For example. And next, this is much more for my own current testing for like, if we usually work a lot with KVM, it's a good idea to add, sorry, for the slides. I forgot about it. Yeah, is that better? That's good. So yeah, so if we work a lot on KVM using our local user account, so it's a good idea to actually append ourselves into the KVM and LeapRT groups so that we can create and manage virtual machines without the pseudo command. So it depends on your use case, but for me, for me to play around with KVM, this is much easier for me. Yeah, and for it to be recognized by the system. Yeah, log in and log out again. So yes. So yeah. And yeah. And one thing to know is that whenever you use the graphical user interface later on to create a virtual machine, if you don't have these groups that set up properly, usually you need to do pseudo or whatever privileges manual enter your privileges there. So so everything will be created as a privilege file system. So sometimes when you go back to your normal user, you cannot find the file system or cannot access the file system. So yeah, that could create some issues there. So another thing that we could do besides adding groups, append the groups, append ourselves to the groups to manage KVM. We also would like to append ourselves to the quick emulator configuration. So we actually append ourselves to the LIP virtual group and also we we start the LIP O2D so that the LIP O2D can recognize the quick emulator's recent changes. And yes the second task is that we manage KVM with the command line interface if everyone on the audience have set up their KVM support or follow along can we proceed to the next task? Yeah you still have you can follow along but just be mindful of the typical sudo versus non-sudo execution. Yes, I guess so. Yeah, yeah, yeah, yeah. Yes, I'll give yes. I can say at all did you mean this one? The second command? There are another group named the LIP O2D DNSMAR LIP O2D dash QMU QMU Yeah, which Linux distribution are you using? Okay, okay. I'm using Fedora so it might differs a bit but maybe you could check the yeah, I guess the documentation has that. I'm sorry. But why not if it would be the use of? Yeah, because yeah but this is it's good to have but if you don't have it's not the end of the world. Is this easier for you to play around with KVM as your local user? It has the installation when well? Sure. So so the next task is that we want to manage KVM using the common interface. So I chose this Debian example because it's I guess it's the lightest. I'm not sure. Disclaimer, I don't know whether it reaches lightest and reaches heaviest but it's quite quick to run on my system. My system is quite with comes with limited resources. Yeah, let's see. Let's turn on the terminal and we can install it from command line. You can see the terminal and there's a lot of flags here. So but don't be overwhelmed by it if you're the first time see that. It's pretty well documented in the word dash install that dash dash help or the main pages. So it's quite clear for most of it like for example if I want to use the word install command to install a virtual machine I can actually give it a name OS variant Debian 11 description how many virtual CPUs I want to give it how many RAMs I want to give it locations network bridge and graphics and so forth and one extra thing or two extra things that here the second last line no reboot and no auto console is that to indicate that whenever the installation is progressing I don't want it to automatically reboot so that I want to see the status of the installation for example and no auto console which means that it doesn't pop up the console after this command is executed so usually when you run word install it would all pop up the console for you to view the virtual machine progress and the extra arguments are which means the extra the extra arguments is actually I need to read it out because it's a long description so this tells the kernel to use the TTYS0 or which means the first zero port with settings of 115 200 CPS no stop bits and eight data bits so it's a lot of information there so the zero port of the host and the target should be configured to match the speed and the speed the stop bits and the data bits so usually Minicom is used as the common zero communication program to access the console from the host ya, kita akan melihat itu dalam contohnya dalam perjalanan jadi ya mari kita menggunakan dan kita lihat jadi apa yang kernel ini buat sekarang adalah saya menggunakan dari net eksternal jika anda melihat itu saya menggunakan dari ftbdebin.org jadi ini seperti internet network installer jadi saya tidak perlu sebenarnya menggantikan ISO untuk sebenarnya menggunakan installasi dari tempat yang berlaku tetapi bagi itu kita mempunyai internet bandwidth jadi sekarang untuk kemudian yang kami ingin sebenarnya menghubungi pergerakan pergerakan jadi kami menggunakan pergerakan pergerakan jadi kami ingin menghubungi pergerakan pergerakan yang bermaksud penggantikan di tempat yang berlaku dan menunggu pergerakan 11 ya ini sedikit mudah tapi saya tidak mengharapkan kami menghubungi segala-galanya dengan pergerakan jadi ia sebenarnya menggantikan pergerakan ia hanya menggantikan pergerakan seperti pergerakan pergerakan dan menggunakan di tempat yang berlaku di tempat yang berlaku dan sekarang ia sebenarnya menggunakan pergerakan installasi dan saya tidak dapat melihat apa-apa dari sini jadi saya telah melakukan ini beberapa kali jadi jadi, sebenarnya anda tahu segala-galanya tempat yang berlaku tempat yang berlaku semua perkara ini ia sebenarnya dapat menghubungi kami akan menghubungi itu pada akhirnya kerana ini sedikit berlaku jadi sebenarnya kami dapat menghubungi pergerakan installasi tanpa saya menghubungi setiap pergerakan saya ingin menghubungi pergerakan saya akan melihat saya membuat penggunaan lokasi ke permainan banyak konfigurasi ok, mari kita periksa ini tidak berlaku ia melakukan menghubungi ke pergerakan jadi ia sebenarnya menggabungi pergerakan pergerakan installasi dari tempat yang berlaku tempat yang berlaku seperti tempat yang berlaku anda tahu pergerakan linux pergerakan semua perkara ini sekarang ia menggabungi dari internet dan menggabungi di pergerakan jadi ini akan mengambil masa kita akan biarkan ia berlaku di setiap pergerakan iya oh ya, anda boleh menghubungi pergerakan network dan ia akan menggunakan pergerakan default terima kasih iya anda boleh berubah iya, anda boleh berubah untuk membuat pergerakan dan pergerakan OS anda boleh sebenarnya mari saya periksa pergerakan OS beri saya sekejap saya beri anda komentar yang saya rasa pergerakan berbeda ada pergerakan OS yang berbeda jadi mari saya cuba pergerakan system saya aha yang ini anda dapat melihat jadi jika kita melakukan pergerakan pergerakan minus-minus OS minus pergerakan jadi ia akan beri anda pergerakan pergerakan OS yang anda boleh sebenarnya mengambil sebagai parameter iya iya seperti yang anda lihat di sini banyak perkara iya iya, kita dapat di sana sekarang jika anda kembali ke pergerakan tidak okey, mari saya periksa ia datang ke dalam kemudian saya saya sepertinya anda ada ini mari saya periksa pergerakan ini dulu iya iya, okey sebelum kita dapat ke pergerakan itu jadi satu perkara yang mengalirkan dari pergerakan ini juga bagaimana kita mengalirkan pergerakan ini yang digunakan oleh pergerakan pergerakan jadi kita tidak meletakannya di sini jadi ia sebenarnya membuatnya menggunakan pergerakan dan ia akan juga digunakan melalui dokumentasi dari Quick Emulator dan ada beberapa sistem yang kita perlu mengalirkan dan apa yang ia sepatutnya mengalirkan bagaimana satu apa maksimal yang sepatutnya yang kita dapatkan untuk pergerakan pergerakan ini untuk mengalirkan bagi contoh tetapi kita tidak akan meletakannya hari ini untuk sebab masa jadi, tetapi anda tahu anda boleh sebenarnya mengalirkan diri anda sendiri pergerakan ini menggunakan pergerakan ini jadi anda sebenarnya boleh mengalirkan ini jika anda ingin membuat seperti parallel 4 atau 5 sama mesyuarat virtual menggunakan data yang sama bagi contoh iya anda dapat mesej ini, kan? Kim iya, anda dapat mesej ini, kan? iya anda dapat melihat pergerakan pergerakan ini adalah contoh berada di kanak-kanak saya dapat menunjukkan anda di sini jadi iya ini adalah bagaimana kita juga dapat menghidupi konsol serial untuk biar saya menghidupi pergerakan saya minta maaf jadi, ini juga mengalirkan kita untuk menghidupi mesajur konsol serial dari mesyuarat virtual yang bergerak jadi bagi contoh, di sini kita dapat menggunakan pergerakan pergerakan virtual konsol Debian 11 yang adalah nama pergerakan pergerakan pergerakan pergerakan virtual yang kita bergerak awal jadi, mari kita kembali di sana jadi, keadaan S-H konsol saya akan menggunakan jadi, anda dapat melihatnya ia sebenarnya mengalirkan mesajur mini-com dari mesyuarat virtual tapi sekarang ia tidak menghidupi apa-apa kerana ia bergerak dalam latihan mari kita periksa status ia masih menggunakan pergerakan kita perlu memilih pergerakan pergerakan jadi, saya akan memilih satu ini dan masih ia akan mengambil 5 minit atau 10 minit untuk menggunakan pergerakan pergerakan dan memperbaiki pergerakan iya kita akan menunggu sekejap sehingga kita akan menunggu sekejap sekejap ini semuanya bergerak baik baik kemudian, kita boleh sebenarnya saya akan menunggu sekejap untuk menggunakan pergerakan ia masih menggunakan pergerakan iya kita akan itu lanjut iya jadi sebelum kita menggunakan pergerakan virtual yang menyebabkan untuk sebenarnya keperluan KBM ada beberapa hal yang kita perlu tahu seperti pergerakan virtual menyebabkan pengetahuan dan penggantuan beberapa pergerakan virtual menyebabkan pengetahuan menghasilkan pergerakan virtual So the gas virtual machines usually have two types, transient and persistent. So transient would mean that transient gas or gas virtual machine, it will not survive reboot. So it's like a system that exists every model. It's not persistent. Dan a persistent virtual machine, it would survive reboot and exist until you actually manually deleted it. During the life cycle of a virtual machine, the virtualization daemon would actually categorize this gas virtual machine in any of the following states. Undefined, which means that the gas virtual machine has not been defined or created. So at this stage that leap virtualization would not be aware of any gas in this state and will not report about the gas virtual machine that has this undefined state. And the second is shut off, it's a self-explanatory. So the virtual machine is defined but not running. So it's turned off, there's no process running on the gas machine. It's just put in a state that it can be started again. Running, which means the gas virtual machine is active, has been defined properly and it's running. So the running state can be used by both transient and persistent state gas virtual machine. And pause would mean that the gas virtual machine execution on the hypervisor has been suspended or the state has been temporarily stored until it is resumed. So gas virtual machine that is in this state are not aware of they have been suspended and do not notice that the time have passed when they resumed. So we have to be aware of that. And save, it's quite similar to pause but the gas virtual machine configuration is saved into a persistent storage. For example, on your hard disk. And it's the same as the pause state that it doesn't know that it has been paused. So it doesn't know that the time has already passed when you actually restarted it. So these are some of the states that we need to be aware for the lifecycle of the virtual machine. Yes, I have a clear answer on that because I haven't tried it out myself. I'm so sorry. But if I encountered that situation, I would prefer to put it in a save state so that it could be resumed later on but I cannot confirm it at this point. And yes, we can also display the... Ya, this is more for debugging purpose so we can actually get the info of the virtualization library version and if you append the minus time as the day month so it's actually a useful argument that we can ask the day month to display the virtualization day month information too. So we can actually try that out actually. Let's see. Yes, you can see that here it has the last line is running hypervisor and then it has another extra information that it says that running against day month it wants zero. So it helps for you to debug sometimes. Yes, and let's go back to... Yes, and now we come to the stage of... we can actually connect to the hypervisor using the word SSH connect and give it a whole stem or the UI and optional arguments read only. So the most commonly used URIs are QIMU 3 slash system if the guest virtual machine is running under that domain or that UI it means that it... because slash-slash-slash system is owned by root group and the triple-slash session is usually unprivileged users like local users. So you just have to be aware of the differences when you try to root SSH list guest virtual machine sometimes that we cannot find our guest virtual machine using a local user because it was created using a privileged user such as root for example. So don't be worried if you cannot find your virtual machine if you have created or sometimes it's just to check whether are you running it against the correct UI. So this we have to just to be sure about. LXE is the local Linux container but we will not touch it in this example. So do you have a question? So to establish a session to connect your guest virtual machine with view as the local user so you can root SSH connect and click emulator using the triple-slash session. So this actually means that you are using virtual shell to connect to the session as a local user. And usually this connect and with the UI you can actually skip it when you use the root SSH command because it will get the default or the options that you already set it as a default value. So for example in my next slide, this slide you can see that I did not specify the connect argument there because I'm assuming that the root SSH would grab the default UI to use in this example but we can try this root SSH list or let me check whether the presentation yes, yes, it's still installing so we don't mind it so let's open the new root SSH we can try to use connect queue emu list all yeah I have to check how do we configure maybe I'm giving it the wrong command but yeah I might be wrong about the root SSH connect command I'll get back to that later on if I have the time so in the current slide yes, this one so if you want to list all the existing virtual machines that we are managing to our hypervisor or on our host machine we can actually do a root SSH list or if you just want to see the inactive ones you can pass like inactive see the SSH list let's help so there's some arguments here we can actually give it inactive to list inactive domains or give all list transients with snapshots, without snapshots for example and what kind of state they are in so yes and if you want to list the uuid or just the name or the id in the table format there are some options that you can always explore using the main pages or the help command let me check the root SSH connect command it's a root only this is built in command of the show okay okay, that's just to reconnect the hypervisor my bad and still wrong yes let's continue on to also we can display to get the information regarding our hypervisor hostname and sysinfo we can try that now hostname yeah this is my hostname sysinfo i'll put xml string to check why it's not fail to get maybe i need sudo i'm not sure yeah i need sudo yeah so this well sysinfo would actually get xml representation of your host system if you can see it yep and taking screenshots of virtual machine this might be helpful for some cases let's try this one you give it the domain you can actually specify the domain id which is like an integer id or the name in our case it's WN11 capital D or the UUID yep and if the guest virtual machine have multiple screens attached to it you can actually specify which screen that you want to take for the screenshot yep so it's save to display yes this is the screenshot that i have it's asking me to reboot so i'll reboot it yeah and if you can see in the top terminal you can see that once it reboot it doesn't actually reboot because i already specify in our installation instruction no reboot so it doesn't really actually reboot even though inside the guest virtual machine that we click reboot so in order to and if we check the status of the virtual machine again it's the state is shut off and let's say UUID yep and yeah that's how you get the UUID or ID i think do a table yeah ID is zero because it's not running yep in order to study again it's the next slide yes um yeah to study it again it's quite simple for SH start give it the identifier of the virtual machine you can pass in console and all the other optional arguments and for example console it will attach the terminal running versus to the domain console device for example this would be running on level 3 and pause for example and if this is supported by the KVM driver it actually start the guest machine from a pause state and auto destroy would mean that you want it to be automatically deleted after the guest virtual machine no it will be automatically destroyed when the virtual SH disconnects disconnects from the virtual machine yes and other other options you can go through the documentation there are tons of very good documentation online and let's see our let's try to study it again let's go back to this one and let's say virtual SH start WN 11 and then I don't press enter first I want to SSH connect no console yes console so I want you to see the console messages form the guest virtual machine doing boot and first virtual SH start WN 11 and then virtual console yes you can see the sorry yes I'm sorry for that you can see that immediately when I enter virtual SH start WN 11 and then when I use the virtual SH console WN 11 it will show me the console messages directly from the guest virtual machine inside my terminal okay let me yes it's running and if if I want to see the quick emulator screen yes as we were so you can see there it presents me the locking screen for the newly installed virtual machine that we have just run early on so if you enter the credentials according to your settings that you enter during the installation step you get to the desktop environment yes and let me go back to the presentation yes start we have seen it already so start we start the virtual machine that was already created earlier and currently is in inactive state for example shut off so if we want to configure a virtual machine to start automatically at boot we can actually use the auto start sub command of the virtual shell and this would this will automatically boots up the guest virtual machine every time the host machine boots up so if that's what you are looking for and reboot virtual machine we can actually try that actually let's see where is the root viewer so you can see partially yes and then show you the terminal let's see exit so so that it's being reboot let me check the status now it's running but yes it's running if you can see the yep so that's one way that you can interact with virtual machine if you want to reboot you can reboot using the virtual shell and there are a few reboot mode name that you can read in the documentation like for example in this command let me show you the slides again yeah so in this example I can actually pass in it CTL reboot mode for example so this is something extra depending on the time we just go through it verbally so we can actually save the guest virtual machine configuration as an XML file for various purposes yep so we can actually you save and then put in your guest virtual machine identifier and then the file name and then running is we have to explain this running and pause running would means that when the save occurs it will overwrite the state recorded in the save image to start the guest virtual machine as running and if we put in pause it means in the same way so it overwrites the save state that is recorded in the XML file to start the guest virtual machine as pause state virtual machine so that's what was define the documentation and define so if we want to define our guest VM by hand like from scratch XML we can actually do that you can actually using the define command I will not get into that I am not an expert in that and we can actually one thing we can actually also extract the guest XML file maybe for backups or for future analysis but let's try out this I haven't try it out myself so save image save image xml file to open this will okay this will actually require the virtual machine to be in a save state so because my machine is still running so I cannot run this and virtual shell save image edit it's also it will also indicate that when the guest virtual machine is save the resulting image would indicate that the virtual machine should be restored into running or pause state as the optional arguments so this one would it also would save the image edit file I will just list this for reference but I will not run that as an example and resuming maybe we could try this will actually resume let's try this one here you can see my state okay good let's try sh resume pause does anyone know how to pause it I haven't try it myself sorry but yeah there is a command to resume so I have assumed that it must have command to pause but I will look it up later but yeah so this yeah let's try that's true suspended thank you very much and you can see that when we suspend it's in pause state and we can actually resume the state it's running again thank you yes word viewer you mean it's not taking an XML file I can go back to the slides again let me show you this one you mean this one the XML file I think I mis explained we can actually define actually good question so the question was asked there was a question that was asked here that is there the difference between word sh and word sh create and word sh define let's see create it create a domain from an XML file create a domain and define sorry define yes so the difference what I understood from the documentation is that create would create the XML file and also start it automatically but define is just defining the XML file but that's it normal action is done against the XML file resume resume we have done that display host physical machine name interesting maybe we can try word sh dome info to get some information word sh dome info Dapien 11 for example ya it would actually show you some statistics regarding the guest virtual machine running underneath your hypervisor so we can see that the UID CPU time and those sorts of interesting information word sh dome ID is just to get the ID of the virtual machine so I guess this is one because I only have one running this is something extra which I cannot show you because I'm not running I'm not running a job but inside the virtual machine but usually when we run a guest virtual machine we run some tasks like maybe CICD pipeline running inside the guest virtual machine so this would actually pause or try to abort the job that is running inside the guest virtual machine and this would also list some information about the job I'm not sure this is running anything but we can try dome job info Dapien 11 ya there's no job inside the virtual machine ya so this is just some helper tools to translate the guest virtual machine between ID name and UUID so ya domain state if you want a single state yes yes if you can see here dome state running and ya shut now everyone must know how to shut KVM so the command is simple which will show shutdown and same as reboot you can give it the shutdown mode name and in this example ACPI mode so let's let's see this is our Dapien desktop running it's not running anything now so let's shut it down shutdown Dapien 11 so it's being shut down and if we list the state the state is back to shut off ya suspend ya I forgot about it and reset with this is like the you know the reset button that we have or you know we long press our laptop to force it to shut down I'm sorry I need to share the slide so yes shutdown we have covered suspend as we have used earlier to suspend and then to resume and then to reset and this is as I mentioned ya this is the same as we press the reset button in our old computers where we have this reset button or we long press on our laptop power button so this would actually sort of kill the power and we initialize the internal state so this would mean also there are risk of data loss if we use this command so just use this if you need to do so ya and stop running gas virtual machine to restart it later so this command saves destroy or stop running gas virtual machine so that it can be restarted from the same state at the later time it's a bit complex to explain here but so when it is used with word shell start command it is automatically started from this save point so in short it's like you want to save and destroy but you also want to sort of keep a part of it so that you can actually resurrect it in a later stage so to speak ya this is some extra commands that is dealing with listing, creating, applying and deleting a snapshot in managing virtual machine usually we want to take a snapshot to have a history of the changes in the gas virtual machine so this command would help us to actually do this first and yes undefined would actually mean that we undefined undefined and remove it completely so if it's if the virtual machine is active which means it's running when we run this command undefined it would mean that the virtual machine would transition from a persistent state to a transient state because the definition of the virtual machine has been undefined by a virtual shell but it's still running so whenever so when that execution ends or it shutdown so that would be gone so let's and and if we want to force gas virtual machine to stop immediately we can actually use would destroy command so this is like this is to mean a forced shutdown it's an ungraceful shutdown so data loss would be expected so in short we have various way of terminating virtual machine shutdown would mean that okay i send a signal to the gas virtual machine i want you to shut down properly take your time to do it but please do it everything gracefully and the other way is that you use the destroy sub command which like okay power off now and undefined which means that it would remove the definition of the gas virtual machine from virtual shell listing so it no longer recognized by the world ashesh command so yes this tree just have to be aware of and some other related commands is like a rule ashesh node info edit we could try that actually and node info let's exit this one let's do this one is it there okay good rule ashesh node info terbian 11 is it running yes i think we stop it earlier ya it's being shut off okay let's try rule ashesh edit them so if we go back to presentation you know rule ashesh edit remember that we can define virtual machine using the xml file so to edit you can actually use world ashesh edit so you can actually go through the xml file and to modify it manually so usually we don't need to do this manually by hand but it's good to know where you can find the configuration and to investigate what went wrong and with the ftop it's just to list the file system that is being used by the gas or by the hypervisor i assume let's try sorry fs to list fs display free size world top this would actually be similar to our top command when we run the top command on our localhost local machine so since that we already shut down our virtual machines nothing is running in the background and we have go through the virtualization dash viewer you see the graphical user interface of the gas virtual machine and the pool list all ashesh pool list all yes this would mean the list of pools that the virtual machine is used for organization you can set up multiple pools for for segregation purposes or organization but i haven't used it quite much so i would not go deep into that would install os wearing list so i guess we have experience here at the audience that it's also depending on your linux distribution whether it returns updated list or not and yeah i have few more examples like you can install ubuntu fedora or what sort from the network and also from iso image if you have and some of the troubles that i have not troubles but some of the issues that i experience is that sometimes it refuse to undefined and because the domain manage safe image exist so i actually have to use the manage safe remove to remove the image for the domain virtual machine and then only i can undefined so these are some things that we need to be aware of and sometimes the network virtualization network devices are not there it's because i'm not sure why but i did a restart of the virtualization services and when i do a bridge CTL show my example here so it works again so sometimes it's good to check whether a restart of the virtualization service helps or not because it just refreshes the virtualization configuration and in some linux installation you would probably the installation hangs at the bios screen with probing edd equals off to disable so it just hangs there so what we need to do is actually have to actually add another extra kernel arguments with edd equals off so that it would just bypass that edd checks so edd means that bios enhance this device services and this is the fail to get domain so we need to ensure that the specify storage pool has correct permissions and path we can actually try that just to show you pool.maxignal yes so if we do this pool.maxignal command it will actually list which path that restore our file system for our virtual machine for example in my context it's under my home actually local share read images and the permissions we have to also check that are we allowed to write and read from there so sometimes if we run as sudo against a different pool with a different file permission then it might create some issues for us yes get back to that here we go yes so yes if we encounter fail to get domain check that whether the storage pool have correct user permissions and the correct path are we loading it for referencing the correct path cannot access storage file from the QIMU command so same like the word SH append group so we have to append ourselves to the QIMU configuration into the proper groups and yes and sometimes if for example if we did do the sudo append groups sometimes to face like this example word SH net list or why I cannot see my default network which should be access on all services yep I have 2 minutes or 1 minute left so yes I don't have time to go through the graphical user but it's quite straight forward for the virtual machine manager I have some screenshots there so you can go through at your own free time yes I'm open for questions if anyone has some that I could answer yes yes the question was asked here is that the word install command and the word SH define XML it's just a different approach to create a definition for the guest virtual machine yes yes just just have to try it out I think the word SH install I'm sure that it pretty much translated to an XML file when you do that yeah when you install it will talk to the word SH and then will define that as an XML file in the background yeah I have some bonus task if you want to do it at home try to do preceding or kickstart you know skipping all the yeses no no thing on the installation process and try to assign a host USB to your guest virtual machine just for a test it's fun and thank you very much if there's no further questions yes, I appreciate everyone spending time here and I don't want to interrupt your lunch