我想使用xen virt-install
命令
我正在使用kickstart并将其放入http://192.168.1.8/centos/kickstart.cfg
中
并将Centos 6.5放入http://192.168.1.8/centos/os/
使用
[root@CentOS ~]# dd if=/dev/zero of=/var/lib/xen/images/vserver.img bs=1M count=4000
[root@CentOS ~]# virt-install -p -n vserver -r 512 -f /var/lib/xen/images/vserver.img -l http://192.168.1.8/centos/os -x ks=http://192.168.1.8/centos/kickstart.cfg -w bridge:xenbr0 --vcpus=1
结果
Starting install...
ERROR Could not find an installable distribution at 'http://192.168.1.8/centos/os'
The location must be the root directory of an install tree.
Domain installation does not appear to have been successful.
If it was, you can restart your domain by running:
virsh --connect xen:/// start vserver
otherwise, please restart your installation.
答案 0 :(得分:2)
需要.treeinfo文件,
vi /var/www/html/centos/os/.treeinfo
并添加以下行:
[general]
family = CentOS
timestamp = 1341518023.56
variant =
totaldiscs = 1
version = 6.5
discnum = 1
packagedir =
arch = i386
[images-i386]
initrd = images/pxeboot/initrd.img
[images-xen]
initrd = isolinux/initrd.img
kernel = isolinux/vmlinuz
[stage2]
mainimage = images/install.img
不要直接从浏览器复制,先用键盘书写或先将其复制到文本文件中,以便删除任何特殊字符。
最终给予Apache文件所有权:
chown -R apache:apache /var/www/html/*
在virt-install命令中,将CentOS(URL)添加为字符串
并使用--bridge=xenbr0
代替bridge:xenbr0
[root@CentOS ~]# virt-install -p -n vserver -r 512 -f /var/lib/xen/images/vserver.img -l "http://192.168.1.8/centos/os" -x -w --bridge=xenbr0 --vcpus=1
P.S:如果您使用64位版本到x86_64
,请更改拱门字段