{"id":37939,"date":"2019-10-31T22:20:41","date_gmt":"2019-10-31T19:20:41","guid":{"rendered":"https:\/\/prohoster.info\/blog\/obshhie-printsipy-raboty-qemu-kvm\/"},"modified":"2019-10-31T22:20:41","modified_gmt":"2019-10-31T19:20:41","slug":"obshhie-printsipy-raboty-qemu-kvm","status":"publish","type":"post","link":"https:\/\/prohoster.info\/sq\/blog\/administrirovanie\/obshhie-printsipy-raboty-qemu-kvm","title":{"rendered":"Principet e p\u00ebrgjithshme t\u00eb pun\u00ebs s\u00eb QEMU-KVM","gt_translate_keys":[{"key":"rendered","format":"text"}]},"content":{"rendered":"<p><img decoding=\"async\" alt=\"Principet e p\u00ebrgjithshme t\u00eb pun\u00ebs s\u00eb QEMU-KVM\" src=\"\/wp-content\/uploads\/2019\/09\/6619dbfb022d3fdb87159a33d4d27466.jpeg\" style=\"display:block;margin: 0 auto;\" \/><br \/>\n<br \/>\nKuptimi im aktual:<\/p>\n<h2>1) KVM<\/h2>\n<p>\nKVM (Kernel-based Virtual Machine) \u2013 nj\u00eb hipervizor (VMM \u2013 Menaxhuesi i Makinerive Virtuale), i cili funksionon si nj\u00eb modul n\u00eb OS Linux. Hipervizori \u00ebsht\u00eb i nevojsh\u00ebm p\u00ebr t\u00eb ekzekutuar ndonj\u00eb softuer n\u00eb nj\u00eb mjedis t\u00eb papar\u00eb (virtual) dhe n\u00eb t\u00eb nj\u00ebjt\u00ebn koh\u00eb t'i fsheh\u00eb k\u00ebtij softueri harduerin fizik real mbi t\u00eb cilin funksionon ky softuer. Hipervizori funksionon si nj\u00eb \"nd\u00ebrmjet\u00ebs\" midis harduerit fizik (host) dhe OS virtuale (mysafir).<\/p>\n<p>Duke qen\u00eb se KVM \u00ebsht\u00eb nj\u00eb modul standard i kernelit Linux, ai merr t\u00eb gjitha p\u00ebrfitimet nga b\u00ebrthama (puna me memorien, planifikuesi, etj.). Prandaj, n\u00eb fund t\u00eb fundit, t\u00eb gjitha k\u00ebto avantazhe arrihen edhe nga mysafir\u00ebt (pasi mysafir\u00ebt funksionojn\u00eb n\u00eb hipervizorin, i cili punon n\u00eb \/ n\u00eb b\u00ebrtham\u00ebn e OS Linux).<\/p>\n<p>KVM \u00ebsht\u00eb shum\u00eb i shpejt\u00eb, por vet\u00eb ai nuk mjafton p\u00ebr t\u00eb ekzekutuar nj\u00eb OS virtuale, pasi nevojitet gjithashtu emulimi i I\/O. P\u00ebr I\/O (procesori, disqet, rrjeti, video, PCI, USB, porte seriale, etj.) KVM p\u00ebrdor QEMU.<br \/>\n<noindex><a rel=\"nofollow\" name=\"habracut\"><\/a><\/noindex><\/p>\n<h2>2) QEMU<\/h2>\n<p>\nQEMU (Quick Emulator) \u2013 nj\u00eb emulator i pajisjeve t\u00eb ndryshme, i cili lejon ekzekutimin e sistemeve operative t\u00eb destinuara p\u00ebr nj\u00eb arkitektur\u00eb, n\u00eb nj\u00eb tjet\u00ebr (p.sh., ARM -&gt; x86). P\u00ebrve\u00e7 procesorit, QEMU emulon pajisje periferike t\u00eb ndryshme: kartela rrjeti, HDD, kartela video, PCI, USB etj.<\/p>\n<p>Kjo ndodh k\u00ebshtu:<\/p>\n<p>Udh\u00ebzimet \/ kodi binar (p.sh., ARM) konvertohen n\u00eb kod t\u00eb nd\u00ebrmjet\u00ebm platform\u00ebs, me ndihm\u00ebn e konvertuesit TCG (Tiny Code Generator) dhe pastaj ky kod binar i platform\u00ebs konvertohet n\u00eb udh\u00ebzime \/ kodin p\u00ebrkat\u00ebs (p.sh., x86).<\/p>\n<p>ARM -&gt; kod_i_nd\u00ebrmjet\u00ebm -&gt; x86<\/p>\n<p>N\u00eb thelb, ju mund t\u00eb ekzekutoni makinat virtuale n\u00eb QEMU n\u00eb \u00e7do host, madje edhe me modele t\u00eb vjetra procesor\u00ebsh q\u00eb nuk mb\u00ebshtesin Intel VT-x (Intel Virtualization Technology) \/ AMD SVM (AMD Secure Virtual Machine). Megjithat\u00eb, n\u00eb k\u00ebt\u00eb rast, kjo do t\u00eb funksionoj\u00eb mjaft ngadal\u00eb, pasi kodi binar q\u00eb ekzekutohet duhet t\u00eb rikompilohet n\u00eb fluks dy her\u00eb, duke p\u00ebrdorur TCG (TCG \u00ebsht\u00eb nj\u00eb kompilator Just-in-Time).<\/p>\n<p>Pra, vet\u00eb QEMU \u00ebsht\u00eb jasht\u00ebzakonisht i bukur, por punon shum\u00eb ngadal\u00eb.<\/p>\n<h2>3) Rrethet e mbrojtjes<\/h2>\n<p>\n<img decoding=\"async\" alt=\"Principet e p\u00ebrgjithshme t\u00eb pun\u00ebs s\u00eb QEMU-KVM\" src=\"\/wp-content\/uploads\/2019\/09\/01df130d94b54251f517f776c99009f6.jpeg\" style=\"display:block;margin: 0 auto;\" \/><br \/>\n<br \/>\nKodi programit binar n\u00eb procesor\u00eb funksionon jo thjesht k\u00ebshtu, por ndodhet n\u00eb nivele t\u00eb ndryshme (rrethe \/ Rrethet e Mbrojtjes) me nivele t\u00eb ndryshme aksesesh n\u00eb t\u00eb dh\u00ebna, nga m\u00eb privilegjiuese (Ring 0), deri te m\u00eb t\u00eb kufizuar, t\u00eb rregulluar dhe \"t\u00eb ngjeshur\" (Ring 3).<\/p>\n<p>Sistemi operativ (n\u00ebnd\u00ebrmarrja e OS) funksionon n\u00eb Ring 0 (modalitetin kernel) dhe mund t\u00eb b\u00ebj\u00eb \u00e7far\u00ebdo me \u00e7do t\u00eb dh\u00ebn\u00eb dhe pajisje. Aplikacionet e p\u00ebrdoruesve funksionojn\u00eb n\u00eb nivelin Ring 3 (modaliteti i p\u00ebrdoruesit) dhe nuk kan\u00eb t\u00eb drejt\u00eb t\u00eb b\u00ebjn\u00eb \u00e7far\u00eb t\u00eb duan, por \u00e7do her\u00eb duhet t\u00eb k\u00ebrkojn\u00eb akses p\u00ebr t\u00eb kryer nj\u00eb operacion (pra, aplikacionet e p\u00ebrdoruesve kan\u00eb qasje vet\u00ebm n\u00eb t\u00eb dh\u00ebnat e veta dhe nuk mund t\u00eb \"nd\u00ebrhyjn\u00eb\" n\u00eb \"sandkast\u00ebn\" e t\u00eb tjer\u00ebve). Ring 1 dhe 2 jan\u00eb p\u00ebr t'u p\u00ebrdorur nga drejtuesit.<\/p>\n<p>Para shpikjes s\u00eb Intel VT-x \/ AMD SVM, hipervizor\u00ebt punonin n\u00eb Ring 0, nd\u00ebrsa mysafir\u00ebt punonin n\u00eb Ring 1. Duke qen\u00eb se Ring 1 nuk kishte mjaft t\u00eb drejta p\u00ebr t\u00eb funksionuar normalisht sistemi operativ, me \u00e7do thirrje t\u00eb privilegjuar nga sistemi mysafir, hipervizorit i duhej t\u00eb modifikonte n\u00eb flak\u00eb k\u00ebt\u00eb thirrje dhe ta kryente at\u00eb n\u00eb Ring 0 (af\u00ebrsisht ashtu si\u00e7 b\u00ebn QEMU). Pra, kodi binar mysafir <b><i>NUK<\/i><\/b> ekzekutohej drejtp\u00ebrdrejt n\u00eb procesor, por \u00e7do her\u00eb kalonte disa modifikime nd\u00ebrmjet\u00ebsuese.<\/p>\n<p>Kostot kishin qen\u00eb t\u00eb m\u00ebdha dhe kjo ishte nj\u00eb problem i madh dhe at\u00ebher\u00eb prodhuesit e procesor\u00ebve, pa ndihm\u00ebn e nj\u00ebri-tjetrit, nxorr\u00ebn nj\u00eb set t\u00eb avancuar instrukcionesh (Intel VT-x \/ AMD SVM), q\u00eb lejojn\u00eb ekzekutimin e kodit t\u00eb sistemeve operative mysafir\u00eb <b><i>DREJT\u00cb<\/i><\/b> n\u00eb procesorin e hostit (duke kaluar t\u00eb gjitha fazat nd\u00ebrmjet\u00ebsuese t\u00eb kushtueshme, si\u00e7 ishin m\u00eb par\u00eb).<\/p>\n<p>Me shfaqjen e Intel VT-x \/ AMD SVM, u krijua nj\u00eb nivel t\u00eb ri t\u00eb ve\u00e7ant\u00eb Ring -1 (minus nj\u00eb). Tani, atje punon hipervizori, nd\u00ebrsa mysafir\u00ebt punojn\u00eb n\u00eb Ring 0 dhe marrin akses t\u00eb privilegjuar n\u00eb CPU.<\/p>\n<p>Pra, n\u00eb fund:<\/p>\n<ul>\n<li>hosti punon n\u00eb Ring 0<\/li>\n<li>mysafir\u00ebt punojn\u00eb n\u00eb Ring 0<\/li>\n<li>hipervizori punon n\u00eb Ring -1<\/li>\n<\/ul>\n<p><\/p>\n<h2>4) QEMU-KVM<\/h2>\n<p>\nKVM ofron qasje mysafir\u00ebve n\u00eb Ring 0 dhe p\u00ebrdor QEMU p\u00ebr t\u00eb emuluar I\/O (procesorin, disqet, rrjetin, videon, PCI, USB, portat seriale etj., q\u00eb \"shohin\" dhe me t\u00eb cilat punojn\u00eb mysafir\u00ebt).<\/p>\n<p>Prandaj QEMU-KVM (ose KVM-QEMU) \ud83d\ude42<\/p>\n<p><i>CREDITS<br \/>\n<noindex><a rel=\"nofollow\" href=\"https:\/\/www.ionos.com\">Imazhi p\u00ebr t\u00ebrheqjen e v\u00ebmendjes<\/a><\/noindex><br \/>\n<noindex><a rel=\"nofollow\" href=\"https:\/\/www.researchgate.net\/profile\/Roberto_Pietro\">Imazhi Rringjet e Mbrojtjes<\/a><\/noindex><\/i><\/p>\n<p><i>P.S. Teksti i k\u00ebtij artikulli fillimisht \u00ebsht\u00eb publikuar n\u00eb kanalin Telegram <noindex><a rel=\"nofollow\" href=\"https:\/\/t.me\/ru_voip\">@RU_Voip<\/a><\/noindex> si p\u00ebrgjigje p\u00ebr pyetjen e nj\u00eb prej an\u00ebtar\u00ebve t\u00eb kanalit.<\/p>\n<p>Shkruani n\u00eb komentet se n\u00eb cilat vende nuk e kuptoj sakt\u00eb tem\u00ebn ose n\u00ebse ka di\u00e7ka p\u00ebr t\u00eb shtuar.<\/p>\n<p>Faleminderit!<\/i><br \/>\n<br \/>Burimi: <a content=\"nofollow\" rel=\"nofollow\" href=\"https:\/\/habr.com\/ru\/post\/466549\/\">habr.com<\/a><\/p>","protected":false,"gt_translate_keys":[{"key":"rendered","format":"html"}]},"excerpt":{"rendered":"<p>\u041c\u043e\u0435 \u0442\u0435\u043a\u0443\u0449\u0435\u0435 \u043f\u043e\u043d\u0438\u043c\u0430\u043d\u0438\u0435: 1) KVM KVM (Kernel-based Virtual Machine) \u2013 \u0433\u0438\u043f\u0435\u0440\u0432\u0438\u0437\u043e\u0440 (VMM \u2013 Virtual Machine Manager), \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0449\u0438\u0439 \u0432 \u0432\u0438\u0434\u0435 \u043c\u043e\u0434\u0443\u043b\u044f \u043d\u0430 \u041e\u0421 Linux. \u0413\u0438\u043f\u0435\u0440\u0432\u0438\u0437\u043e\u0440 \u043d\u0443\u0436\u0435\u043d \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u043d\u0435\u043a\u0438\u0439 \u0441\u043e\u0444\u0442 \u0432 \u043d\u0435\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0439 (\u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0439) \u0441\u0440\u0435\u0434\u0435 \u0438 \u043f\u0440\u0438 \u044d\u0442\u043e\u043c, \u0441\u043a\u0440\u044b\u0432\u0430\u0442\u044c \u043e\u0442 \u044d\u0442\u043e\u0433\u043e \u0441\u043e\u0444\u0442\u0430 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0435 \u0444\u0438\u0437\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u0436\u0435\u043b\u0435\u0437\u043e, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u044d\u0442\u043e\u0442 \u0441\u043e\u0444\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442. \u0413\u0438\u043f\u0435\u0440\u0432\u0438\u0437\u043e\u0440 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0432 \u0440\u043e\u043b\u0438 \u00ab\u043f\u0440\u043e\u043a\u043b\u0430\u0434\u043a\u0438\u00bb [&hellip;]<\/p>\n","protected":false,"gt_translate_keys":[{"key":"rendered","format":"html"}]},"author":1,"featured_media":28470,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[688],"tags":[],"class_list":["post-37939","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-administrirovanie"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 5.0.1.1 - aioseo.com -->\n\t<meta name=\"description\" content=\"\u041c\u043e\u0435 \u0442\u0435\u043a\u0443\u0449\u0435\u0435 \u043f\u043e\u043d\u0438\u043c\u0430\u043d\u0438\u0435: 1) KVM KVM.\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"Yuri Gagarin\"\/>\n\t<link rel=\"canonical\" href=\"https:\/\/prohoster.info\/sq\/blog\/administrirovanie\/obshhie-printsipy-raboty-qemu-kvm\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 5.0.1.1\" \/>\n\t\t<meta property=\"og:locale\" content=\"sq_AL\" \/>\n\t\t<meta property=\"og:site_name\" content=\"ProHoster | \u041a\u0443\u043f\u0438\u0442\u044c \u043d\u0430\u0434\u0435\u0436\u043d\u044b\u0439 \u0445\u043e\u0441\u0442\u0438\u043d\u0433 \u0434\u043b\u044f \u0441\u0430\u0439\u0442\u043e\u0432 \u0441 \u0437\u0430\u0449\u0438\u0442\u043e\u0439 \u043e\u0442 DDoS, VPS VDS \u0441\u0435\u0440\u0432\u0435\u0440\u044b\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"\ud83e\udd47\u041e\u0431\u0449\u0438\u0435 \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u044b \u0440\u0430\u0431\u043e\u0442\u044b QEMU-KVM | ProHoster\" \/>\n\t\t<meta property=\"og:description\" content=\"\u041c\u043e\u0435 \u0442\u0435\u043a\u0443\u0449\u0435\u0435 \u043f\u043e\u043d\u0438\u043c\u0430\u043d\u0438\u0435: 1) KVM KVM.\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/prohoster.info\/sq\/blog\/administrirovanie\/obshhie-printsipy-raboty-qemu-kvm\" \/>\n\t\t<meta property=\"og:image\" content=\"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg\" \/>\n\t\t<meta property=\"og:image:secure_url\" content=\"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg\" \/>\n\t\t<meta property=\"og:image:width\" content=\"350\" \/>\n\t\t<meta property=\"og:image:height\" content=\"350\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2019-10-31T19:20:41+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2019-10-31T19:20:41+00:00\" \/>\n\t\t<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/prohoster\" \/>\n\t\t<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/prohoster\" \/>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"\ud83e\udd47Parimet e p\u00ebrgjithshme t\u00eb funksionimit t\u00eb QEMU-KVM | ProHoster","description":"Kuptimi im aktual: 1) KVM KVM.","canonical_url":"https:\/\/prohoster.info\/sq\/blog\/administrirovanie\/obshhie-printsipy-raboty-qemu-kvm","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":null,"og:locale":"sq_AL","og:site_name":"ProHoster | \u041a\u0443\u043f\u0438\u0442\u044c \u043d\u0430\u0434\u0435\u0436\u043d\u044b\u0439 \u0445\u043e\u0441\u0442\u0438\u043d\u0433 \u0434\u043b\u044f \u0441\u0430\u0439\u0442\u043e\u0432 \u0441 \u0437\u0430\u0449\u0438\u0442\u043e\u0439 \u043e\u0442 DDoS, VPS VDS \u0441\u0435\u0440\u0432\u0435\u0440\u044b","og:type":"article","og:title":"\ud83e\udd47\u041e\u0431\u0449\u0438\u0435 \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u044b \u0440\u0430\u0431\u043e\u0442\u044b QEMU-KVM | ProHoster","og:description":"\u041c\u043e\u0435 \u0442\u0435\u043a\u0443\u0449\u0435\u0435 \u043f\u043e\u043d\u0438\u043c\u0430\u043d\u0438\u0435: 1) KVM KVM.","og:url":"https:\/\/prohoster.info\/sq\/blog\/administrirovanie\/obshhie-printsipy-raboty-qemu-kvm","og:image":"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg","og:image:secure_url":"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg","og:image:width":350,"og:image:height":350,"article:published_time":"2019-10-31T19:20:41+00:00","article:modified_time":"2019-10-31T19:20:41+00:00","article:publisher":"https:\/\/www.facebook.com\/prohoster","article:author":"https:\/\/www.facebook.com\/prohoster"},"aioseo_meta_data":{"post_id":"37939","title":null,"description":null,"keywords":null,"keyphrases":null,"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":null,"og_custom_url":null,"og_article_section":null,"og_article_tags":null,"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"","isEnabled":true},"graphs":[]},"schema_type":null,"schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":null,"robots_max_videopreview":null,"robots_max_imagepreview":"large","priority":null,"frequency":null,"local_seo":null,"seo_analyzer_scan_date":"2026-01-23 19:51:19","breadcrumb_settings":null,"limit_modified_date":false,"reviewed_by":null,"ai":null,"created":"2021-03-01 01:18:22","updated":"2026-01-23 19:51:19","focus_keyword":null,"additional_keywords":null,"truseo_locale":null},"gt_translate_keys":[{"key":"link","format":"url"}],"_links":{"self":[{"href":"https:\/\/prohoster.info\/sq\/wp-json\/wp\/v2\/posts\/37939","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/prohoster.info\/sq\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/prohoster.info\/sq\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/prohoster.info\/sq\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/prohoster.info\/sq\/wp-json\/wp\/v2\/comments?post=37939"}],"version-history":[{"count":0,"href":"https:\/\/prohoster.info\/sq\/wp-json\/wp\/v2\/posts\/37939\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/prohoster.info\/sq\/wp-json\/wp\/v2\/media\/28470"}],"wp:attachment":[{"href":"https:\/\/prohoster.info\/sq\/wp-json\/wp\/v2\/media?parent=37939"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/prohoster.info\/sq\/wp-json\/wp\/v2\/categories?post=37939"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/prohoster.info\/sq\/wp-json\/wp\/v2\/tags?post=37939"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}