XEN PV Guest的创建

XEN PV Guest的创建

需要先安装xen-tools
apt-get install xen-tools

使用xen-create-image命令创建虚拟机

xen-create-image --hostname = ubuntu1 --size = 3Gb --memory = 512mb --arch = i386 --kernel = /boot/vmlinuz- 2.6.18.8 -xen --initrd = /boot/initrd.img- 2.6.18.8 -xen0 --dist = hardy --swap = 1gb --dhcp --role = udev --dir = /etc/xen --force

但总会出现类似下面的错误:

I: Retrieving Release
E: Failed getting release file http://ftp.us.debian.org/debian/dists/lenny/Release

Copying files from new installation to host.
Copying files from /tmp/jUrDxM_Km2/var/cache/apt/archives -> /var/cache/apt/archives
Done
Done
The installation of the new system has failed.

The system is missing the common file: /bin/ls
Done
System installation failed.  Aborting

这是因为镜像地址是不正确的:http://ftp.us.debian.org/debian/dists/lenny/Release

在/etc/xen-tools/xen-tools.conf中有mirror的备选值,当然也可以在xen-create-image命令中加入mirror参数。

通过mirror参数的值和dist参数的值拼成一个url。但配置文件中提供的说明却不一定正确,例如有关dist参数,以ubuntu为例:

在http://archive.ubuntu.com/ubuntu/dists/ 下,目前存在dapper、hardy、intrepid、jaunty、karmic、lucid等子目录,但配置文件中声称ubuntu系统仅支持edgy、feisty、dapper

 

故此处在实际使用的时候需要灵活处理。

 

xen-create-image会创建虚拟机镜像文件和配置文件。启动虚拟机仍需要使用xm create <配置文件>。

posted on 2010-09-09 10:50 Roger W 阅读(...) 评论(...) 编辑 收藏

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值