XenServer在安装好之后会自动创建VG,所以只需要创建个逻辑卷(类比windows的C、D、E分区),将逻辑卷作为iso镜像库就行,下面是具体过程。
2.查看VG name(如果没有自动创建的,可以去查找一下如何创建)
[root@xenserver1 ~]# vgdisplay
--- Volume group ---
VG Name VG_example
......
......
3.创建逻辑卷,我这里分了30g
[root@xenserver1 ~]# lvcreate -L 30G -n iso_image VG_example
Logical volume "iso_image" created.
4.在逻辑卷上创建文件系统
[root@xenserver1 ~]# mkfs.ext3 /dev/VG_example/iso_image
5.挂载
[root@xenserver1 ~]# mkdir /iso_image
[root@xenserver1 ~]# mount /dev/VG_example/iso_image /iso_image/
6.创建镜像库,完成
[root@xenserver1 ~]# xe sr-create name-label=ISO_Image type=iso device-config:location=/iso_image device-config:legacy_mode=true content-type=iso