我已将5个虚拟磁盘连接到Citrix XenServer中的虚拟机。 VM安装了xs-tools。 最初它说,它不能添加这么多的磁盘。 我安装了xs-tools之后,让我添加所有的磁盘。
但/dev不显示所有的磁盘。 它显示了这些:
/dev/xvda /dev/xvdb /dev/xvdc /dev/cdrom
也许它受到IDE总线的限制? (3盘+光盘)如果是这样,如何更改虚拟机使用SCSI?
编辑: 根据文件:
2.6.3。 VM块设备
在PV Linux的情况下,块设备作为PV设备传递。 XenServer不会尝试模拟SCSI或IDE,而是以xvd *设备的forms在虚拟环境中提供更合适的界面。 也可以使用相同的机制获取sd *设备,其中VM内的PV驱动程序接pipeSCSI设备名称空间。 这是不可取的,所以最好在PV guest虚拟机上使用xvd *(这是Debian和RHEL的默认configuration)。
对于Windows或其他完全虚拟化的guest虚拟机,XenServer以hd *设备的forms模拟IDE总线。 使用Windows时,安装适用于虚拟机的Citrix Tools安装一个特殊的PV驱动程序,其工作方式类似于Linux,完全虚拟化环境除外。
不过,连接5个虚拟磁盘,我没有看到其他的xvd设备。
编辑#2 🙁附加请求信息)
主机:
XenServer 6.1 Linux version 2.6.32.43-0.4.1.xs1.6.10.777.170770xen (geeko@buildhost) (gcc version 4.1.2 20080704 (Red Hat 4.1.2-51)) #1 SMP Wed Apr 17 05:52:03 EDT 2013
客人机:
CentOS release 6.4 (Final) Linux version 2.6.32-358.6.2.el6.x86_64 ([email protected].centos.org) (gcc version 4.4.7 20120313 (Red Hat 4.4.7-3) (GCC) ) #1 SMP Thu May 16 20:59:36 UTC 2013
来宾机器上'fdisk -l'的输出:
请注意,超出前3个附件的磁盘不显示 – 应该有4个100GB的磁盘。 (XenCenter中总共显示5个磁盘 – 16GB,100GB,100GB,100GB,100GB)
Disk /dev/xvdb: 107.4 GB, 107374182400 bytes 255 heads, 63 sectors/track, 13054 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0xfb6c95b9 Device Boot Start End Blocks Id System /dev/xvdb1 1 13054 104856223+ 83 Linux Disk /dev/xvda: 17.2 GB, 17179869184 bytes 255 heads, 63 sectors/track, 2088 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x000e5f41 Device Boot Start End Blocks Id System /dev/xvda1 * 1 64 512000 83 Linux Partition 1 does not end on cylinder boundary. /dev/xvda2 64 2089 16264192 8e Linux LVM Disk /dev/xvdc: 107.4 GB, 107374182400 bytes 255 heads, 63 sectors/track, 13054 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0xed249ced Device Boot Start End Blocks Id System /dev/xvdc1 1 13054 104856223+ 83 Linux Disk /dev/mapper/vg_blue-lv_root: 14.6 GB, 14571012096 bytes 255 heads, 63 sectors/track, 1771 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x00000000 Disk /dev/mapper/vg_blue-lv_swap: 2080 MB, 2080374784 bytes 255 heads, 63 sectors/track, 252 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x00000000
我看到Linux版本说SMP。 来宾虚拟机不会在名称中显示“xen”。 不过,我已经运行了yum install kernel-xen 。 可能是一个线索?
这里同样的问题。 我想你会在/ var / log / messages中看到错误信息
blkfront: your disk configuration is incorrect, please use an xvd device instead
GUI中的磁盘是/ dev / hda,/ dev / hdb,/ dev / hdc,但是在RHEL <6上,它是/ dev / xvda / etc …如果将其命名为/ dev,则可以从cli手动添加磁盘/ xvd。
find这个: http ://forums.citrix.com/message.jspa?messageID=1692261检查阿尔伯特Czarnecki回答。
“就像我说的你的机器运行在HVM模式下,你必须运行命令并从HVM更改为PV:xe vm -param-set uuid = your_machine PV-bootloader = pygrub HVM-boot-policy =”“然后再次运行机。”
请检查https://www.linuxnet.ch/xenserver-howto-convert-hvm-to-pv-rhelsuse/
编辑:我试过了,现在所有的磁盘都可见,系统是PV。
快速总结(可能会有所不同):
xe vm-list name-label=SERVERNAME params=uuid uuid ( RO) : 2a596adf-ccf4-6469-cf89-702d723cfbb9 UUID=`xe vm-list name-label=SERVERNAME params=uuid | cut -d ":" -f 2`
检查PV或HVM
xe vm-param-list uuid=2a596adf-ccf4-6469-cf89-702d723cfbb9 | egrep "PV-bootloader|HVM-boot-policy" xe vm-param-list uuid=`echo ${UUID}` | egrep "PV-bootloader|HVM-boot-policy" HVM-boot-policy ( RW): BIOS order PV-bootloader ( RW): PV-bootloader-args ( RW):
设置PV:
xe vm-param-set uuid=2a596adf-ccf4-6469-cf89-702d723cfbb9 PV-bootloader=pygrub HVM-boot-policy="" xe vm-param-set uuid=`echo ${UUID}` PV-bootloader=pygrub HVM-boot-policy=""
重启后:
fdisk -l 2>/dev/null | grep xvd Disk /dev/xvdb: 51.5 GB, 51539607552 bytes Disk /dev/xvde: 1073 MB, 1073741824 bytes <------ YEAAAAAH "test disk 1GB visible for os" Disk /dev/xvda: 16.1 GB, 16106127360 bytes /dev/xvda1 * 1 13 102400 83 Linux /dev/xvda2 13 274 2097152 82 Linux swap / Solaris /dev/xvda3 274 1959 13528064 8e Linux LVM Disk /dev/xvdc: 1073 MB, 1073741824 bytes