In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
When using the xe command to add vdisk, you first need to understand the three concepts of SR,VDI, and VBD under xenserver. as shown below
Repository (SR)
Virtual Disk Image (VDI)
Physical Block Device (PBD)
Virtual Block Device (VBD)
The relationship between these terms is illustrated graphically below.
1、SR
A container named Repository (SR) is defined to describe a specific storage target where virtual disk images (VDI) are stored. SR is flexible with built-in support for locally attached IDE, SATA, SCSI and SAS drives and remotely attached iSCSI, NFS, SAS and Fibre Channel.
Use the xe command to see the following information, some of the display content is omitted
[root@xs-10 ~]# xe sr-list
[root@xs-10 ~]# xe sr-list name-label=xenserver
uuid ( RO) : 0554628e-448d-fbdf-4544-04cc4f390529
name-label ( RW): xenserver
name-description ( RW): iSCSI SR [172.20.10.107 (iqn.2007-10.uit.com:techtest.xenserver)]
host ( RO): xs-10.8
type ( RO): lvmoiscsi
content-type ( RO):
uuid ( RO) : c2b41896-467e-b936-6836-754eb22d36de
name-label ( RW): vmware vsphere
name-description ( RW): CIFS ISO Library [\\172.20.1.249\software\ISO\vmware vsphere]
host ( RO): xs-10.8
type ( RO): iso
content-type ( RO): iso
uuid ( RO) : 4188b1ee-76bc-10ed-dc15-6c7a236ce9aa
name-label ( RW): Ubuntu
name-description ( RW): CIFS ISO Library [\\172.20.1.249\software\ISO\linux\Ubuntu]
host ( RO): xs-10.8
type ( RO): iso
content-type ( RO): iso
Combined with graphics, it is not difficult to understand that the so-called SR is a storage repository, which stores a lot of ISO files, you can use these ISO files to store things, such as vmware vsphere, ubuntu these two SRs. Or as a repository for storing virtual machine files, such as xenserver SR. Next, we'll look at the next layer of SR called VDI.
2、VDI
Virtual disk images are storage abstractions exposed to VMs, and VDI is the basic unit of virtualized storage in XenServer.
Let's take a look at what VDI is in Ubuntu's SR repository, i.e. VDI is included in SR.
[root@xs-10 ~]# xe vdi-list sr-uuid=4188b1ee-76bc-10ed-dc15-6c7a236ce9aa
uuid ( RO) : 5b5bd9b4-b061-4e55-ab8f-a6e685358357
name-label ( RW): ubuntu-11.04-desktop-i386.iso
name-description ( RW):
sr-uuid ( RO): 4188b1ee-76bc-10ed-dc15-6c7a236ce9aa
virtual-size ( RO): 718583808
sharable ( RO): false
read-only ( RO): true
uuid ( RO) : a81d7dcc-27bb-45cc-8c8b-c761cb1f1a04
name-label ( RW): ubuntu-11.10-desktop-amd64.iso
name-description ( RW):
sr-uuid ( RO): 4188b1ee-76bc-10ed-dc15-6c7a236ce9aa
virtual-size ( RO): 731164672
sharable ( RO): false
read-only ( RO): true
uuid ( RO) : 98354aff-f259-4ba4-8617-fb53cc6c08b7
name-label ( RW): ubuntu-10.04.3-server-i386.iso
name-description ( RW):
sr-uuid ( RO): 4188b1ee-76bc-10ed-dc15-6c7a236ce9aa
virtual-size ( RO): 704217088
sharable ( RO): false
read-only ( RO): true
Partially omitted...
ubuntu This SR contains VDI screenshots as follows
And xenserver this SR below contains the following VDI
You can see VDI. It is not difficult to see from the screenshot that the so-called VDI is the ISO file inside or the hard disk file of the virtual machine. Below we continue with VBD.
3、VBD
Virtual block devices are connector objects (similar to PBDs described above) that can be used to map between VDI and VMs. VBD can also be used to fine-tune parameters such as QoS (Quality of Service), statistics, and steerability for a given VDI.
The VDI described above is just some ISO files or hard disk files of a virtual machine, which are worthless if put together alone. As described, VBD is used to map between VDI and VM, and VDI alone would not work without this layer of mapping.
Use the xe command to see which VBDs are contained in the host "UCA-VM-10.24". First, check the UUID number of UCA-VM-10.24.
[root@xs-10 ~]# xe vm-list name-label=UCA-VM-10.24
uuid ( RO) : 89577946-f487-76a6-387e-86daaca15bef
name-label ( RW): UCA-VM-10.24
power-state ( RO): halted
check back
[root@xs-10 ~]# xe vbd-list vm-uuid=89577946-f487-76a6-387e-86daaca15bef
uuid ( RO) : a798413b-df47-9fb5-4b4d-56539a26eaf2
vm-uuid ( RO): 89577946-f487-76a6-387e-86daaca15bef
vm-name-label ( RO): UCA-VM-10.24
vdi-uuid ( RO): 34fc2c1c-a3aa-43c7-95e4-b8bf6603e52f
empty ( RO): false
device ( RO): hda
uuid ( RO) : 5a702417-e40e-ac62-c282-9b89bf8cb7b6
vm-uuid ( RO): 89577946-f487-76a6-387e-86daaca15bef
vm-name-label ( RO): UCA-VM-10.24
vdi-uuid ( RO):
empty ( RO): true
device ( RO): hdd
uuid ( RO) : 07fe6b36-c836-d99e-e3ea-8b8eda2fe134
vm-uuid ( RO): 89577946-f487-76a6-387e-86daaca15bef
vm-name-label ( RO): UCA-VM-10.24
vdi-uuid ( RO): 56c1b396-4776-4b43-ba8f-42870669055e
empty ( RO): false
device ( RO): hdc
uuid ( RO) : 49d4e02d-f7e6-ec4a-235e-16bcddb64a99
vm-uuid ( RO): 89577946-f487-76a6-387e-86daaca15bef
vm-name-label ( RO): UCA-VM-10.24
vdi-uuid ( RO): 6ee51222-6ae4-4614-b337-1b22bf340098
empty ( RO): false
device ( RO): hdb
As you can see, the VBD above is a mapping of VDI and the UCA-VM-10.24 virtual machine from Section 2. That is to say, if I attach the VDI of disk1 in the above figure to another host such as SQL Server, then VDI will remain unchanged, and when you use xe vbd-list to view the host UCA-VM-10.24, you will find that there is one VBD missing, and the SQL Server host will have one more VBD.
Knowing the principle above, it is easy to add virtual disk next. The steps are very simple:
1. Create a new vdi under a certain SR, named disk3, which is actually the hard disk file for creating the virtual machine.
xe vdi-create name-label=disk3 type=user sr-uuid=0554628e-448d-fbdf-4544-04cc4f390529 virtual-size=4GiB
5b4dfa6a-17f0-4207-b7f2-9d205f4517a9--UUID of new VDI
2. Use the newly obtained vdi number to create a new vbd, which is actually a mapping between the hard disk file created in the previous step and the virtual machine.
[root@xs-10 ~]# xe vbd-create vdi-uuid=5b4dfa6a-17f0-4207-b7f2-9d205f4517a9 device=5 vm-uuid=89577946-f487-76a6-387e-86daaca15bef
9bcad328-4006-fb95-eea8-87de94bf0ff8
3, will create the vbd plug can be.
[root@xs-10 ~]# xe vbd-plug uuid=9bcad328-4006-fb95-eea8-87de94bf0ff8
You attempted an operation on a VM which requires PV drivers to be installed but the drivers were not detected.
vm: 89577946-f487-76a6-387e-86daaca15bef (UCA-VM-10.24)
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.