xenCenter create and mount the hard drive image library

Note that each restart is required to activate LV disk, and mount the iso image
a, activate lv disk
lvchange -ay # inactive so as to allow the use of activated
vgscan # scan all disk volume group to get information
all the volume group vg vgchange -ay # activation system
two,
Mount / local_iso # mount to the image memory lv / local_iso  

correspondence relationship preparation of VI / dev / fstab
/ dev / VG_XenStorage-b156323a-4b64-5b5c-dea7-fc38dc426982 / local_iso / local_iso ext3 Defaults 0




two, XENSERVER create a local store
1, the query local disk   
CAT / proc / Partitions
2, lists the devices       
LL / dev / disk / by-the above mentioned id
3, delete LV         
lvremove / dev / VG_XenStorage-4593e2b5-361e-9348-0773-b912e758a191 / MGT
4, delete VG         
vgremove -4593e2b5-361e-9348-0773-VG_XenStorage b912e758a191
5, to create the PV         
the pvcreate / dev / cciss / c0d0p3
6, create a disk   
sr-create content-type = user device-config xe: device = / dev / cciss / c0d0p3 name-label = "Local Storage" shared = false type = lvm




three, XENSERVER delete the locally stored
1.
Run the following commands to determine SR of the UUID:
. XE SR-List-label name = <the the name of the SR>
2. run the following commands to determine a corresponding PBD of the UUID:
XE-List SR-PBD UUID = <the UUID of the SR>
3. unloading the PDB
XE PBD = UUID -unplug <the UUID of the PBD>
4. remove the SR
XE-SR forget UUID = <the UUID of the SR>

four, iso create local library
1, with a log to xenserver "vgdisplay" view volume group information XenCenter or ssh, and the VG name record
2, created on ISO VG used to store the LV (logical volume), and allocation size and name, I think 20G is enough to give him the name of it called local_iso      
#lvcreate -L 20G -n local_iso -f648889e-43d3-84cc-VG_XenStorage 724e-9ee3ddf967b0
3, format the newly created LV     
Mkfs.ext3 # / dev / VG_XenStorage-f648889e-43d3-84cc-724e-9ee3ddf967b0 / local_iso
4, create a local mount directory    
#mkdir / local_iso
5, is set to automatically mount a logical volume just created by editing / etc / fstab    
# VI / etc / fstab    
in / etc / fstab Lane add this line / dev / VG_XenStorage-ba809113-0584-d4e8-274d-e2e03e972490 / local_iso / local_iso ext3 Defaults 0 0
. 6, using the mount command to mount the logical volume    
#mount / local_iso
. 7 with wget download tool to download files on the Internet to ISO / local_iso directory
#cd / root / local_iso /
# wget -c http://mirror.stanford.edu/yum/pub/centos/5.8/isos/x86_64/CentOS -x86_64-bin--5.8 DVD-1of2.iso
8, created SR using the xe command    
#xe sr-create name-label = "local_iso" type = iso device-config: location = / local_iso device-config: legacy_mode = true content -type = iso
9, xenCenter connection to xenserver will find more than a iso_image local store, if iso_image there are no just download the ISO file, then update the look then use the following command     
# xe-Mount-ISO-SR / local_iso
# xe-toolstack-restart
the OK , it's done, like this time to install the VM can be used local_iso in the ISO file to mount this time is not normal after the restart xe-toolstack should need to use the next mount mount view with df -h command   
#mount / local_iso  
then using df -h will be able to see when you mount the iso CD iso relatively small, then it may not be so troublesome, directly xenserver system directory to put iso, but because xenserver installed by default only the system disk 4G this method is only suitable for small-capacity iso image file.
#mkdir / systemba-ISO
#xe the Create SR-name-label = "local_iso" of the type Device = ISO-config: LOCATION = / local_iso Device-config: legacy_mode = to true Content of the type = ISO-
# xe-toolstack-restart
new success , there will be a store called systemba-iso in XenCenter.

Upload a connection server SSH Secure File Transfer Client find systemba-ios image file to a folder

Guess you like

Origin www.cnblogs.com/guizjiang/p/11461651.html