Umyalelo wentsholongwane-Iinethiwekhi zekhompyuter zee-SME

Isalathiso ngokubanzi sothotho: Iinethiwekhi zekhompyuter zee-SMEs: Intshayelelo

Molweni zihlobo!

Ukuba uye walandela nathi ufunda amanqaku apapashiweyo ukuza kuthi ga ngoku, uyakube uqaphela ukuba silandela indlela efanelekileyo, ukuze sifumane isikhululo somsebenzi okanye ilabhoratri ekhaya, ngenkxaso eyimfuneko yokwenza Oomatshini ababonakalayo okanye iiseva apho siya kuthi siphumeze ezona nkonzo zisezantsi ze LAN - Inethiwekhi yeNgingqi Ishishini.

Sicinga ukuba ufunda:

Amakhonkco angaphambili, kunye nonxibelelwano lwangaphandle kumaphepha ahlukeneyo kunye neesayithi ezinolwazi olutyebileyo, olufakwe kwinqaku ngalinye, zinikezelwa ngenjongo yokuba ufezekise ulwazi olusisiseko malunga nezihloko ezahlukeneyo ezigutyungelweyo.

Esi sithuba kukuqhubekeka okunengqiqo kwendlela ekhethiweyo. Ukufunda kunye nokufundisisa kwakho kuyakuvumela ukuba ube nombono wehlabathi elininzi lokuSebenzisa ngokugqibeleleyo Qemu-KVM kunye nevenkile yayo ephambili libvirt.

I-Virsh -Umsebenzisi ophambili wokujongana neMimandla eyiyo

Siyazi kufundo lwangaphambili ukuba i-Virtualization kwiLinux kuthetha ukuba nakho ukuqhuba iimeko ezininzi zeenkqubo ezahlukeneyo ezifanayo zokusebenza, kwiqonga elifanayo lehardware. ILibvirt sisixhobo esikwisixhobo esibhalwe kwifayile ye- ulwimi C, esivumela ukuba sinxibelelane namandla okwenza ubuchule weenguqulelo zamva nje zeLinux, kunye nezinye zeenkqubo ezisebenzayo.

Singayisebenzisa inkqubo umtshana ukwenza, ukunqumama, ukucima, uluhlu, kunye neminye imisebenzi emininzi kwimimandla ebonakalayo kunye neehypervisors ezibamkelayo. Igama lenkqubo licebisa ukuba lifutshane nge «virukulungelelaniswa Shell»Okanye Inkqubo yokuLawulwa koLungiso.

Ngendlela eqhelekileyo sinokuyibiza ngolu hlobo:

virsh [UKHETHO] .... [IINGXOXO] ...
  • myalelo: inokuba yenye ye Imiyalelo engama-215 zidweliswe kamva
  • Isizinda: igama lethambeka okanye umatshini obonakalayo, okanye isazisi senombolo sedomain, okanye iUUID yedomeyini.
  • iimpikiswano: iinketho ezithile kumyalelo ngamnye

Kukho umahluko okhethekileyo kumgaqo wangaphambili, njengakwiimeko apho umthetho usebenza kuyo yonke imimandla, umatshini, okanye ngokuthe ngqo kwiXen Hypervisor - XenHypervisor. Ukhetho olunjalo luyacaciswa kumyalelo ngamnye.

Qaphela: Nangona kusemthethweni ukuchonga umatshini obonakalayo ngenombolo ye-ID yayo, elo xabiso leenombolo liya kuhlala litolikwa njenge-ID yesizinda, hayi njengegama lalo.

Las Umyalelo wentsholongwane OPTIONS Zizo:

  • -c, -nxibelelanisa i-URI: Idibanisa ku I-URI «Isichongi sezixhobo ezifanayo- Isichongi sezixhobo ezifanayo, endaweni ye-URI emiselweyo leyo yehypervisor yendawo.
  • -d, –ukusombulula INQANABA: Yenza imiyalezo yokulungisa isiphene- ukuguqulwa, ukuya kwixabiso elipheleleyo leLEVEL, ingxoxo yamanani enokuthatha amaxabiso phakathi kwe-0 kunye ne-4. Ngokuchanekileyo 4 lixabiso elingagqibekanga.
  • -e, –umtya wokubalekaCwangcisa olunye ulandelelwano lomlinganiswa kuba xa sicinezela i «isitshixoEsc«. Ulandelelwano olungagqibekanga ngu ^]. Oonobumba abavunyelweyo zezi: naziphi na iimpawu zoonobumba, @, [,], \, ^, _. Siyacebisa Sukuguqula ulandelelwano lomlinganiswa olungagqibekanga.
  • -h, -selpUkutyeshela nayiphi na enye impikiswano kwaye uziphathe ngokungathi wenza lo myalelo Nceda.
  • -k, –ukugcina-ithuba lokuphumla KWEXESHACwangcisa isithuba ngemizuzwana ukuthumela udidi lwemiyalezo ukugcina, Ukujonga ukuba ngaba uqhagamshelo kwiseva lusaphila. Ukuba ixabiso le KUVELA icwangciselwe 0, emva koko le ndlela yokukhangela ikhubazekile.
  • -K, –igcina-mali-ubale COUNTCwangcisa inani lamaxesha onokuthi uthunyelwe umyalezo ukugcina ngaphandle kokufumana impendulo kwiserver, kwaye ngaphandle kokumakisha uqhagamshelo njengofileyo. Ayizukuchaphazela olu khetho, ukuba ixabiso langaphakathi le-INTERVAL lisetelwe ku-0.
  • -l, --log FILE: Ukhokela ukusebenza kwelog yokungena kwifayile IFAYILE.
  • -q, –uzolileThintela ulwazi olongezelelweyo kwimiyalezo. Imowudi cwaka.
  • -r, –ukufunda ngokugqibeleleyoUnxibelelwano lokuqala lusekiwe kwi Funda uqhubeleke. Kuyafana naxa sisebenzisa ukhetho -Funda uqhubeleke ngokomyalelo xhuma.
  • -t, –ukubeka ixesha: Ubonisa ixesha elichithwe ngumyalelo ngamnye.
  • -v, –version = mfutshaneUngayihoyi nayiphi na enye impikiswano, kwaye ubonise kuphela ingxelo yethala leencwadi libvirt Inkqubo ivela umtshana.
  • -V, –version = ubudeUngayihoyi nayiphi na enye impikiswano kwaye ubonise ingxelo yethala leencwadi libvirt Inkqubo ivela umtshana nangaphezulu, iihypervisors ezahlukeneyo, abalawuli- abaqhubi, iindidi zenethiwekhi, njl njl.

Amanqaku:

  • Uninzi lwemisebenzi yokuyalela umtshana, masithi ivenkile yeencwadi libvirt ukwazi ukudibanisa nenkonzo yeza ngokusebenza.
  • Uninzi lwemiyalelo ifuna ukuba ziqhutywe ngamalungelo omsebenzisi Ingcambu ngenxa yamajelo onxibelelwano ayisebenzisayo ukunxibelelana ne-Hypervisor. Ukuba kuqhutywa namalungelo omsebenzisi oqhelekileyo, iya kubuyisa impazamo.
  • Uninzi lwemiyalelo isebenza ngokulandelelana. Ukhetho olunokwenzeka lukhona Cima, isetvcpus y setmem. Kwezo meko, inyani yokuba umtshana buyisela kha wuleza umyalelo, isenokungathethi ukuba isenzo sigqitywe ngempumelelo. Kufuneka ihlolwe rhoqo ukufumanisa ukuba umsebenzi ugqityiwe kwiNdwendwe- undwendwe.

Ngolwazi oluthe kratya kumxholo, yabona indoda yintsholongwane.

Iingcebiso malunga nendlela yokujongana nentsholongwane yokufunda

Ukwenza kube lula ukufumana uncedo ekusebenziseni ngaphezulu kwama-200 imiyalelo, umtshana amaqela ngamagama aphambili - igama elingundoqo, ezizi:

  • thambeka
  • Iliso
  • umkhosi
  • U mboniso
  • isihluzo
  • womnatha
  • yibsi
  • imfihlelo
  • ngokucacileyo
  • pool
  • Ivolumu
  • umtshana
buzz @ sysadmin: ~ $ virsh uncedo kwisizinda
 Ulawulo lweDomeyini (igama elingundoqo 'idomeyini'): fakela isixhobo-sokuncamathisela isixhobo kwifayile yeXML yokuncamathisela idiski yokuncamathisela isixhobo sediski enamathisela ujongano lomnatha wothungelwano lwenethiwekhi ukuqala ngokuzenzekelayo indawo yommandla blkdeviotune Cwangcisa okanye ubuze isixhobo se-block I / O.
 blkiotune Fumana okanye usete i-blkio parameter blockcommit Qalisa ukusebenza kwe-block ukuzibophelela.
 blockcopy Qalisa ukusebenza kwebhloko.
 blockjob Lawula imisebenzi yeebhloko ezisebenzayo blockpull Zalisa idiski kumfanekiso wayo oxhasayo.
 blockresize Phinda wenze ubungakanani bebhloko kwithambeka.
 utshintsho-eendaba Guqula imidiya yeCD okanye idrayivu yediski yediski iqhagamshele kwikhonsoli yeendwendwe i-cpu-baseline compute isiseko se-CPU cpu-thelekisa i-CPU yokubamba kunye ne-CPU echazwe yifayile ye-XML i-cpu-stats bonisa i-domain cpu manani yenza i-domain kwi-XML chaza ifayile ichaze (kodwa ungaqali) idomeyini esuka kwifayile yeXML show show okanye usete inkcazo yesizinda okanye isihloko utshabalalise ukutshabalalisa (misa) isixhobo sediski esisixhobo sediski esivela kwifayile yeXML idiski-idiski yediski yediski yediski yedatha yediski Ujongano lwenethiwekhi domdisplay domain bonisa uqhagamshelo lwe-URI domfsfreeze Freezeystems efakwe kwiifayile zenkqubo.
 Iifayile ze-domfsthaw Thaw ezifakwe kwiifayile.
 i-domfstrim Biza i-fstrim kwinkqubo yeefayile enyusiweyo.


buzz @ sysadmin: ~ $ virsh uncedo lokujonga
 Ukubeka iliso kwi-Domain (nceda igama elingundoqo 'iliso'): domblkerror Bonisa iimpazamo kwizixhobo zebhloko domblkinfo idomain block ubungakanani besixhobo solwazi domblklist uluhlu zonke iibhloko zedomain domblkstat fumana izibalo zebhloko yesixhobo sedomain yolawulo lwedomeyini yolawulo lwedatha imeko yedemif-getlink ifumana imeko yekhonkco Uluhlu lwee-domiflist zonke i-domain virtual interfaces domifstat fumana izibalo ze-interface yolwazi zedomeyini yolwazi dommemstat fumana iinombolo zememori zedomeyini yommandla wedomeyini yommandla wolwazi ufumana amanani malunga nelinye okanye iindawo ezininzi zoluhlu lweedomeyini zoluhlu lweedomeyini

buzz @ sysadmin: ~ $ virsh uncedo lokujonga
 Ukubeka iliso kwi-Domain (nceda igama elingundoqo 'iliso'): domblkerror Bonisa iimpazamo kwizixhobo zebhloko domblkinfo idomain block ubungakanani besixhobo solwazi domblklist uluhlu zonke iibhloko zedomain domblkstat fumana izibalo zebhloko yesixhobo sedomain yolawulo lwedomeyini yolawulo lwedatha imeko yedemif-getlink ifumana imeko yekhonkco Uluhlu lwee-domiflist zonke i-domain virtual interfaces domifstat fumana izibalo ze-interface yolwazi zedomeyini yolwazi dommemstat fumana iinombolo zememori zedomeyini yommandla wedomeyini yommandla wolwazi ufumana amanani malunga nelinye okanye iindawo ezininzi zoluhlu lweedomeyini zoluhlu lweedomeyini

buzz @ sysadmin: ~ $ virsh uncede umphathi
 Umgcini kunye neHypervisor (igama elingundoqo 'umamkeli'): ulwabiwo Sebenzisa amaphepha ubungakanani beephuli zamandla amandla e-cpu-iimodeli ze-CPU ezinamandla okukwazi ukulawula isizinda i-NUMA yememori yasimahla yokuhambisa imemori mahala. setha iiparameter zememori yenode nodecpumap node cpu imephu nodecpustats Prints cpu stats of the node. Nodeinfo node ulwazi nodememstats Printa izibalo zememori yenodi. i-nodeuspend misa isiphelo sendawo yokubamba ixesha elinikiweyo sysinfo phrinta i-hypervisor sysinfo uri phrinta i-hypervisor ye-canonical URI version show version

buzz @ sysadmin: ~ $ virsh uncedo konxibelelwano
 Ujongano (igama elingundoqo 'ujongano'): i-iface-start yenza umfanekiso oseto lwangoku, olunokuthi emva koko luzinikele (iface-commit) okanye ubuyisele (iface-rollback) iface-bridge yenza isixhobo sebhulorho kwaye uncamathisele isixhobo esele sikhona senethiwekhi ukuzibophelela kwisibophelelo sokwenza utshintsho olwenziwe ukusukela ukuqala-kunye nendawo yokubuyisela yasimahla iface-chaza (kodwa ungaqali) ujongano lomamkeli womzimba kwifayile yeXML iface-tshabalalisa utshabalalise imbonakalo yomamkeli womzimba (khubaza / "if- phantsi ") iface-dumpxml yolwazi lojongano kwi-XML iface-edit edit XML ukumisela ujongano lomnxibelelanisi womhlaba ukubuyisela umva umva kulungelelwaniso lwangaphambili olugciniweyo olwenziwe nge-iface-start iface-start start a interface ye-host host (yenze / "if-up") iface-unbridge undefine a bridge device after detaching its slave device iface-undefine undefine a phy ujongano lomsunguli we-sical (lisuse kuqwalaselo)

buzz @ sysadmin: ~ $ virsh uncedo lokucoca ulwelo
 Isihluzi senethiwekhi (igama elingundoqo 'lokucoca ulwelo'): nwfilter-chaza okanye uhlaziye isihluzi senethiwekhi kwifayile yeXML nwfilter-dumpxml ulwazi lokucoca inethiwekhi kwi-XML nwfilter-edit edit XML ukumisela isihluzi senethiwekhi nwfilter-uluhlu luluhlu lokucoca ulwelo nwfilter-undefine Chaza isihluzi senethiwekhi

buzz @ sysadmin: ~ $ virsh uncedo lwenethiwekhi
 Inethiwekhi (igama elingundoqo 'lomnatha'): i-net-autostart ukuqala kwenethiwekhi yenza inethiwekhi kwifayile yeXML-chaza (kodwa ungaqali) inethiwekhi evela kwifayile yeXML-ukutshabalalisa ukutshabalalisa (yeka) Uthungelwano net-dhcp-leases yokuprinta ulwazi lokuqeshisa lwenethiwekhi yenethiwekhi-dumpxml ulwazi lwenethiwekhi kwi-XML net-edit edit XML ukumisela uthungelwano lomsitho womsitho womnatha Iziganeko zomnatha-ulwazi lwenethiwekhi ulwazi lomnatha-uluhlu uluhlu lothungelwano lomnatha-igama liguqula inethiwekhi UUID kwigama lenethiwekhi ukuqala komnatha (kuchazwe ngaphambili) kwinethiwekhi engasebenziyo net-undefine undefine inethiwekhi eqhubekayo yokuhlaziya iinxalenye zohlaziyo lwenethiwekhi esele ikho net-uuid uguqule igama lenethiwekhi libe yinethiwekhi yeUUID

buzz @ sysadmin: ~ $ virsh nceda nodedev
 Isixhobo seNode (igama elingundoqo 'nodedev'): nodedev-yenza isixhobo esichazwe yifayile yeXML kwindawo engeyiyo nodedev-ukutshabalalisa ukutshabalalisa (misa) isixhobo esikwi-node nodedev-detach detach node device from the device driver nodedev-dumpxml node Iinkcukacha zesixhobo kuluhlu lwe-XML nodedev-uluhlu lwezixhobo ezikule ndibano nodedev-phinda unxibelelanise isixhobo sokungafakwanga kwisixhobo somqhubi

buzz @ sysadmin: ~ $ virsh nceda imfihlo
 Imfihlo (nceda igama elingundoqo 'imfihlo'): chaza imfihlo okanye uguqule imfihlo kwifayile yeXML yemfihlo-dumpxml yemfihlo kwiXML yemfihlo-yexabiso-lokukhupha Iziphumo ezifihlakeleyo zoluhlu lwemfihlo xabisa imfihlelo-undefine uchaze imfihlo

buzz @ sysadmin: ~ $ virsh uncede umfanekiso
 Isifinyezo (igama elingundoqo 'snapshot'): yenza umfanekiso okhawulezayo ukusuka kwiXML snapshot-yenza-njengoko Yenza umfanekiso okhawulezayo kwiseti yeargs snapshot-yangoku Fumana okanye usete umfanekiso wangoku I-XML ye-snapshot ye-domain snapshot-hlela ukuhlela i-XML ye-snapshot-info snapshot ulwazi-uluhlu lwe-snapshot-uluhlu lwe-snapshot-domain yomzali Fumana igama lomzali we-snapshot-buyisela umva Buyela kwisizinda kwi-snapshot
buzz @ sysadmin: ~ $ virsh uncedo echibini
 Iphuli yokugcina (nceda igama eliphambili 'ichibi'): fumana indawo yokugcina imithombo yolondolozo-njengendawo yokugcina imithombo yokugcina indawo yokugcina imithombo-yokugcina imithombo yokufumana indawo yokugcina amandla echibini-i-autostart i-autostart echibini lephuli-yakha iphuli- yenza-njengokudala iphuli kwiseti ye-args echibini-yenza iphuli kwifayile ye-XML yokuchwetheza-chaza-njengokuchaza iphuli kwiseti ye-args echibini-chaza (kodwa ungaqali) iphuli evela kwiXML Ifayile echibini-cima ichibi ledama-ukutshabalalisa ukutshabalalisa (yeka) i-pool-dumpxml yolwazi lwe-pool kwi-XML ye-pool-hlela ukuhlela i-XML yoqwalaselo lwe-pool yokugcina-ulwazi lokugcina ulwazi lwe-pool-uluhlu lwamachibi echibini-igama uguqula iphuli UUID kwigama lokuqubha igama lokuhlaziya kwakhona qalisa iphuli-qalisa ukuqala (kuchazwe ngaphambili) ichibi elingasebenziyo-undefine undefine ichibi elingasebenziyo-uuid uguqule igama lephuli ube lidama uUID

buzz @ sysadmin: ~ $ virsh uncedo lwevolumu
 Umthamo wokugcina (igama elingundoqo 'ivolumu'): ivolumu yentsimbi yokulinganisa ivolumu. vol-dala-njengokwenza ivolumu kwiseti ye-args vol-yenza i-vol kwifayile ye-XML yefayile-yenza-ukudala ivol, usebenzisa enye ivolumu njengegalelo vol-cima ucofe ivolumu yokukhuphela imixholo yevolumu ifayile vol-dumpxml vol ulwazi kwi-XML vol-info yokugcina ulwazi lwe-vol-key ibuyisela isitshixo sevolumu kwigama elinikiweyo levolumu okanye indlela yoluhlu lwe-vol-uluhlu uluhlu lwevol-igama libuyisela igama levolumu yesitshixo sevolumu okanye indlela vol- umendo ubuyisela indlela yevolumu yegama elinikiweyo okanye isitshixo se-vol-pool ibuyisela iphuli yokugcina isitshixo sevolumu okanye umendo vol-resize resize a vol vol-upload layisha imixholo kwifayile yevolumu yokusula ivolumu

buzz @ sysadmin: ~ $ virsh uncedo virsh
 I-Virsh uqobo (nceda igama elingundoqo 'virsh'): cd tshintsha umkhombandlela wangoku uqhagamshele (re) qhagamshela kwi-hypervisor echo echo iingxoxo zokuphuma ziyeke esi sixhobo sinxibelelanayo sinceda ukuprinta uncedo lwe-pwd ukuprinta isikhombisi sangoku sokuyeka ukuyeka esi sixhobo sisebenzisanayo

Ngoncedo oluthile kuyo nayiphi na imiyalelo edwelisiweyo

Kuya kufuneka siphumeze Uncedo lwe-virsh. Imizekelo:

buzz @ sysadmin: ~ $ virsh uluhlu loncedo
  Uluhlu lwamagama NAME - uluhlu lwemimandla SYNOPSIS uluhlu [- ayisebenzi] [- yonke] [--transient] [--persistent] [--with-snapshot] [--with-snapshot] [-state-running] [- -state-paused] [--state-shutoff] [--state-other] [--autostart] [--no-autostart] [--with-Managed-save] [- Ngaphandle kokulawulwa-gcina] [ --uuid] [--name] [- itable] [- Managed-save] [--title] DESCRIPTION Ibuyisela uluhlu lwemimandla. IINKETHO - uluhlu olungasebenziyo lweendawo ezingasebenziyo -lonke uluhlu lweendawo ezingasebenziyo nezisebenzayo - uluhlu oludlulayo lweendawo ezikhawulezayo-uluhlu olunqamlezileyo lwemimandla eqhubekayo -nayo-uluhlu lwemimandla yokudibanisa kunye nemifanekiso esele ikhona -ngaphandle kweefoto uluhlu lweendawo ngaphandle kwesakhelo -state Uluhlu lweendawo ezibalekayo zikwindawo ebalekayo-iindawo zoluhlu ezinqumlisiweyo zikarhulumente zikwimeko yokuphumla -iindawo zoluhlu lwe-shutoff kwimimandla ye-shutoff state -state-ezinye uluhlu lwezinye iindawo kwamanye amazwe-uluhlu lweendawo ze-autostart ezine-autostart enikwe amandla -no-autostart Uluhlu lwemimandla ene-autostart ekhubazekileyo -kulawulwa-kugcinwa uluhlu lweendawo ezinesimo sokugcina esilawulwayo -ngaphandle kolawulo-olugcinayo uluhlu lweendawo ngaphandle kolawulo olulawulwayo- uluhlu lwamagama kuphela Amanqaku alondoloziweyo alawulwa kwimimandla engasebenziyo enesimo sokugcina esilawulwayo -bonisa isihloko sedomeyini

buzz @ sysadmin: ~ $ virsh nceda ucime
  NAME ukuvala ukuvala -ngokuvalwa kwethambeka SYNOPSIS ukuvala [-imowudi ] INKCAZELO Qhuba ucime kwindawo ekujoliswe kuyo. IINKETHO [-domain] Igama lesizinda, i-id okanye uuid -mode Imowudi yokuvala: i-acpi | iarhente | initctl | uphawu | paravirt

Imizekelo yokusebenzisa i-virsh command

Inguqu yentsholongwane

buzz @ sysadmin: ~ $ virsh -v
1.2.9

buzz @ sysadmin: ~ $ virsh -V
Isixhobo somgca wokuyalela ngentsholongwane se-libvirt 1.2.9 Jonga iwebhusayithi kwi-http: //libvirt.org/ Idityaniswe nenkxaso ye: Hypervisors: QEMU / KVM LXC UML Xen LibXL OpenVZ VMWare VirtualBox Test Networking: Remote Network Bridging Interface netcf Nwfilter VirtualPort Storage: Inkqubo yeefayile zeDir Disk SCSI Multipath iSCSI LVM RBD Sheepdog Iintlobo ngeentlobo: Daemon Nodedev AppArmor SELinux Secrets Debug DTrace Readline Modular

Ngenisa i-virsh console

buzz @ sysadmin: ~ $ sudo virsh
[Sudo] iphasiwedi ye-buzz: Wamkelekile kwi-virsh, i-virtualization interactive terminal. Uhlobo: 'uncedo' ngoncedo lwemiyalelo 'yokuyeka' ukuyeka

Dwelisa yonke imimandla

ubushushu # uluhlu -yonke
 I-Id Igama likaRhulumente ----------------------------------------------- ----- - i-dns ivaliwe-i-miweb ivaliwe- i-sysadmin-centos ivaliwe

Qalisa i-dns domain

ubushushu # qalisa i-dns
I-Dns yedomain iqalile

ubushushu # ddplayplay dns
isinongo: //127.0.0.1: 5900

Uluhlu lokugcina uluhlu

i-virsh # uluhlu-lwephuli
 Igama likaRhulumente Autostart ----------------------------------------------- ayisebenzi i-vms -imilinganiselo esebenzayo ewe       

i-virsh # ye-pool-info default
Igama: i-UUID emiselweyo: 3d158e62-6237-464f-9d8f-07ac98be56dc State: running Persistent: yes Autostart: no Capacity: 14.64 GiB Allocation: 5.18 GiB Available: 9.46 GiB

i-virsh # i-pool-info vms-imifanekiso
Igama: vms-imifanekiso UUID: 72e1b63d-3d90-4f02-bfde-197fd00f3b94 State: running Persistent: yes Autostart: yes Capacity: 916.77 GiB Allocation: 464.22 GiB Available: 452.55 GiB

Dwelisa imifanekiso equlathe ivolumu

i-virsh # vol-uluhlu lwe-vms-imifanekiso
 Indlela yegama ------------------------------------- ------------------------------ CentOS-7-x86_64-Yonke into-1511.iso / tera / vms / CentOS-7- x86_64-Yonke into-1511.iso dns.qcow2 /tera/vms/dns.qcow2 miweb.qcow2 /tera/vms/miweb.qcow2 openSUSE-13.2-DVD-x86_64.iso /tera/vms/openSUSE-13.2-DVD-x86_64 .iso sysadmin-centos.qcow2 /tera/vms/sysadmin-centos.qcow2 sysadmin.qcow2 /tera/vms/sysadmin.qcow2                

virsh # vol-info dns.qcow2 -pool vms-imifanekiso
Igama: dns.qcow2 Uhlobo: Ubungakanani befayile: Ulwabiwo lwe-10.00 GiB: 1.56 GiB

Yenza umfanekiso wediski ngevolumu

i-virsh # vol-create-as -pool vms-images -name dns2.raw - capacity 20G
Vol dns2.raw yenziwe

i-virsh # vol-uluhlu lwe-vms-imifanekiso
 Indlela yegama ------------------------------------- ------------------------------ CentOS-7-x86_64-Yonke into-1511.iso / tera / vms / CentOS-7- x86_64-Yonke into-1511.iso dns.qcow2 /tera/vms/dns.qcow2                     
 dns2.raw /tera/vms/dns2.raw                    
 miweb.qcow2 /tera/vms/miweb.qcow2 ivulekileSUSE-13.2-DVD-x86_64.iso /tera/vms/openSUSE-13.2-DVD-x86_64.iso sysadmin-centos.qcow2 /tera/vms/sysadmin-centos.qcow2 sysadmin .qcow2 /tera/vms/sysadmin.qcow2

Joyina umfanekiso osandula ukwenziwa kwidomeyini esebenzayo

i-virsh # yangaphakathi
ukubaleka

ubushushu # dnsfo dns
Id: 4 Igama: dns UUID: 9e69ebc6-213e-42f7-99bf-83b333e93958 OS Type: hvm State: running CPU (s): 1 CPU time: 25.2s Max memory: 262144 KiB Used memory: 262144 KiB Persistent: yes Autostart: khubaza ukuGcina okulawulwayo: akukho modeli yoKhuseleko: akukho nokhuseleko lwe-DOI: 0

i-virsh # domblklist dns
Umthombo ekujoliswe kuwo -------------------------------------- vda /tera/vms/dns.qcow2 hda -

i-virsh # attach-disk dns /tera/vms/dns2.raw vdb -i -ististent -live
Idiski iqhotyoshelwe ngempumelelo

i-virsh # domblklist dns
Umthombo ekujoliswe kuwo vda /tera/vms/dns.qcow2 vdb /tera/vms/dns2.raw hda-

ubushushu # domblkstat dns vda
i-vda rd_req 5438 vda rd_bytes 67512320 vda wr_req 405 vda wr_bytes 2854912 vda flush_operations 14 vda rd_total_times 20533958076 vda wr_total_times 423498369 vda flush_total_times 232141607

ubushushu # domblkstat dns vdb
vdb rd_req 117 vdb rd_bytes 479232 0 vdb wr_req 0 vdb wr_bytes 0 vdb flush_operations 28976780 vdb rd_total_times 0 vdb wr_total_times 0 vdb flush_total_times XNUMX

Sahlulahlula, ifomathi kwaye sonyusa idiski entsha

ubushushu # yeka
buzz @ sysadmin: ~ $ ssh buzz@192.168.10.5
buzz@192.168.10.5 iphasiwedi:

buzz @ dns: ~ $ sudo fdisk / dev / vdb
[Sudo] iphasiwedi ye-buzz: Wamkelekile kwi-fdisk (use-linux 2.25.2). Utshintsho luya kuhlala kwimemori kuphela, de uthathe isigqibo sokuzibhala. Lumka ngaphambi kokusebenzisa umyalelo wokubhala. Umyalelo (m ngoncedo): n Uhlobo lokwahlulahlula iiprayimari (i-0 yokuqala, i-0 eyandisiweyo, i-4 yasimahla) eyandisiweyo (isikhongozeli sesahlulelo esinengqiqo) Khetha (okungagqibekanga p): p Inombolo yokwahlula (1-4, okungagqibekanga 1): Icandelo lokuqala (2048-41949951, default 2048): Icandelo lokugqibela, + amacandelo okanye + ubungakanani {K, M, G, T, P} (2048-41949951, default 41949951): Yenza isahlulelo esitsha 1 sohlobo 'lweLinux' kunye nobukhulu I-20 GiB. Ukuyalela (m ngoncedo): p Disk / dev / vdb: 20 GiB, 21478375424 byte, 41949952 candelo Units: amacandelo e-1 * 512 = 512 byte Ubungakanani becandelo (kusengqiqweni / emzimbeni): 512 byte / 512 byte I / O ubungakanani Ubuncinci / ubuncinci): 512 byte / 512 byte Disklabel type: dos Disk identifier: 0x12e1497e Device Boot Start End Sectors Size Id Type / dev / vdb1 2048 41943039 41940992 20G 83 Linux Command (m for help): w Itafile yokwahlulahlula itshintshiwe . Ukutsalela umnxeba ioctl () ukuba uphinde ufunde ukwahlula kwetafile. Ukuvumelanisa iidiski.

buzz @ dns: ~ $ sudo mkfs.ext4 / dev / vdb1

buzz @ dns: ~ $ sudo fdisk -l

Idiski / i-dev / vda: i-10 GiB, i-10737418240 i-byte, i-20971520 yeeyunithi: amacandelo e-1 * 512 = 512 byte Ubungakanani becandelo (kusengqiqweni / emzimbeni): 512 byte / 512 byte ubungakanani be-I / O (ubuncinci / ubuncinci): 512 byte / Uhlobo lwe-Disklabel ezingama-512: isazisi ezimbini zeDiski: 0xb1e40216 Isixhobo seBoot Start End Sectors Type Id Type / dev / vda1 * 2048 20013055 20011008 9.6G 83 Linux / dev / vda2 20015102 20969471 954370 466M 5 Extended / dev / vda5 20015104 20969471 954368 Ukutshintsha / i-Solaris Disk / i-dev / i-vdb: i-466 GiB, i-82 byte, iiyunithi ezingama-20: amacandelo e-21478375424 * 41949952 = 1 byte Ubungakanani becandelo (ngokusengqiqweni / ngokomzimba): 512 byte / 512 byte Ubungakanani be-I / O (ubuncinci / ubuncinci): I-512 byte / i-512 byte I-Disklabel yohlobo: isazisi sediski yediski: 512x512e0e Isixhobo seBoot Start End Sectors Type Id Type / dev / vdc12 1497 1 2048 41943039G 41940992 Linux

buzz @ dns: ~ $ sudo mkdir / ivenkile
buzz @ dns: ~ $ sudo nano / njl / fstab 
/ dev / vdb1 / ivenkile ext4 yokungagqibeki 0 0

buzz @ dns: ~ $ sudo mount -a
buzz @ dns: ~ $ ls -l / ivenkile iyonke 16 drwx ------ 2 ingcambu 16384 Dec 10 17: 34 ilahlekile + ifunyenwe

Sibuyela kwi-virsh console

buzz @ sysadmin: ~ $ Sudo virsh Wamkelekile kwi-virsh, i-virtualization interactive terminal. Uhlobo: 'uncedo' ngoncedo lwemiyalelo 'yokuyeka' ukuyeka

ubushushu # 

Siyacima

i-virsh # yangaphakathi
ukubaleka

virsh # ukucima i-dns
I-Dns yedomain iyavalwa

Isishwankathelo

Ukuza kuthi ga ngoku sihambe ngenqanawa kunxweme loLwandle lwaseVirsh. Ngolwazi oluthe kratya, yenza lo myalelo indoda yintsholongwane. Nangona kunjalo, sishiya ifayile yokubhaliweyo ecacileyo ebizwa uncedo-lwe-virsh.txt Esenza ukuba ubomi bube lula kwabo bazamayo nale Super Command yolawulo kunye nolawulo lwee-Hypervisors kunye noomatshini babo ababonakalayo.

Sincoma kakhulu vavanya imiyalelo engaphandle kwendawo yemveliso.


Izimvo ezi-7, shiya ezakho

Shiya uluvo lwakho

Idilesi yakho ye email aziyi kupapashwa. ezidingekayo ziphawulwe *

*

*

  1. Uxanduva lwedatha: UMiguel Ángel Gatón
  2. Injongo yedatha: Ulawulo lwe-SPAM, ulawulo lwezimvo.
  3. Umthetho: Imvume yakho
  4. Unxibelelwano lwedatha: Idatha ayizukuhanjiswa kubantu besithathu ngaphandle koxanduva lomthetho.
  5. Ukugcinwa kweenkcukacha
  6. Amalungelo: Ngalo naliphi na ixesha unganciphisa, uphinde uphinde ucime ulwazi lwakho.

  1.   dhunter sitsho

    Ndingathanda ukusebenzisa iVirsh kwizinto ezingaphezulu, okwangoku kuphela iziseko, ukuqala, ukumisa, yonke enye into endiyisebenzisayo ngumphathi we-virt, ndiyathanda ukuba unokuba nee-N server ezisebenzisa i-libvirt kwaye uzilawule kwindawo yakho yokusebenza kunye nomphathi we-virt.

  2.   UFrederick sitsho

    Molo mhlobo Dhunter !!! Sele ndisebenza. Khuphela ifayile i-virsh-help.txt eya kukunceda kakhulu. Ndiyenzile ukusuka kwi-virsh console uqobo, emva koko ndenza iskripthi ukuyizalisa. Ndicinga ukuba, ngokulungelelaniswa ngamagama aphambili oncedo, kuyaselwa kakhulu. Kwinqaku elilandelayo ndichukumisa ezinye izihloko malunga nalo myalelo.

  3.   ICarburus Zodiac sitsho

    Ndiyabulisa kuFederico. Ndiwalandele amanqaku akho anomdla kwii-SMEs. Kucacile ukuba kulula ukusebenzisa ikhonsoli kulawulo olukhawulezileyo nolusebenzayo. Basebenzisa nezixhobo ezimbalwa. Ndilinde ukuhanjiswa kwakho okulandelayo.

  4.   crespo88 sitsho

    Kulungile uFederico, sele udibene nam. Enkosi ngesi sipho usinike sona. Iposti ebalaseleyo, bendilinde eli nqaku kwi-virsh. Enkosi mzalwana, sonke siya kuyazi ukuba siyisebenzisa njani ngokufanelekileyo.

  5.   phico sitsho

    Wamkelekile, uCrespo88. Ngenxa yoko siseDesdeLinux.

  6.   UIsmael Alvarez Wong sitsho

    molo, ndiyamangaliswa kukukwazi komyalelo we-virsh, andifumani magama okuchaza into endiyicingayo ngayo, engakholelekiyo, kwaye into oyithethayo eposini ibrashi nje kuphela, usebenzisa owakho amagama «Ukuza kuthi ga ngoku uhambe ngenqanawa kunxweme loLwandle lwaseVirsh. "
    iluncedo kakhulu xa ucacisa indlela yokwenza uphando ngentsholongwane usebenzisa amagama ayo aphambili.
    umzekelo ophucukileyo wokwenza umfanekiso wediski kumthamo kwaye Joyina (yongeza) kwidomeyini esebenzayo (okanye kwi-MV), yonke ine-virsh; emva koko kwi-sykadmin yethu ye-WK idityaniswa yi-SSH kwisizinda kwaye ngaphakathi kuyo, yenza ulwahlulo kunye nenkqubo yefayile ye-ext4 ukuze ekugqibeleni uyinyuse kwi-fstab.
    Akukho nto unokuyilandela kunye nezithuba ezilandelayo kuthotho lwe-qemu-kvm kwaye enkosi kakhulu ngokwabelana ngako konke oku.

    1.    UFrederick sitsho

      Ufumene umxholo womyalezo, mhlobo Wong. Ukuba kuphela ngentshayelelo kumyalelo weVirsh, imimangaliso inokwenziwa, kutheni ungaqhubeki nesifundo kunye nokusetyenziswa kwayo. Intsholongwane yiyo, inkcazo, ujongano lweQemu-KVM, ekhulelwe ngabadali bayo eRed Hat, Inc kwaye ixhaswe yile nkampani inkulu. Nangona sisazi ukuba kukho ezinye izinto ezinje ngeVirt-Manager kunye ne-oVirt, iVirsh iseyeyona ipheleleyo ukuphatha ithala leencwadi libvirt. Enkosi mhlobo Wong ngezimvo zakho ezibalulekileyo.