![尝试在 Xen 上创建 ElementaryOS PV 客户机](https://linux22.com/image/625482/%E5%B0%9D%E8%AF%95%E5%9C%A8%20Xen%20%E4%B8%8A%E5%88%9B%E5%BB%BA%20ElementaryOS%20PV%20%E5%AE%A2%E6%88%B7%E6%9C%BA.png)
为了测试目的,我尝试在我的服务器上安装 ElementaryOS 作为 pv guest。
Elementary OS 是 Ubuntu Precise 的一个分支。Elementary 不提供 PV 支持,但是我可以从以下位置获取相应的 ubuntu 映像:
[镜像]/ubuntu/dists/precise/main/installer-amd64/current/images/netboot/xen/initrd.gz [镜像]/ubuntu/dists/precise/main/installer-amd64/current/images/netboot/xen/vmlinuz
这是我的 elementaryOS.cfg 的副本
name = "elementary"
kernel = "/home/curios/elementary/vmlinuz"
ramdisk = "/home/curios/elementary/initrd.gz"
memory = "1024"
disk = [ "phy:/dev/vg0/elementary,sda1,w", "file:/home/curios/elementary/elementaryos-stable-amd64.20130810.iso,sdb,r" ]
vif = ['bridge=xenbr0']
on_reboot = 'destroy'
on_poweroff = 'destroy'
到目前为止一切正常,但我刚刚收到以下令我担心的错误。有人能帮我检查一下我的 cfg 并确保我已正确设置所有设置吗?
┌────────────────────────┤ [!!] Partition disks ├─────────────────────────┐
│ │
│ Error informing the kernel about modifications to partition │
│ /dev/xvda1p1 -- Invalid argument. This means Linux won't know about │
│ any changes you made to /dev/xvda1p1 until you reboot -- so you │
│ shouldn't mount it or use it in any way before rebooting. │
│ │
│ ERROR!!! │
│ │
│ Ignore │
│ Cancel │
│ │
│ <Go Back> │
│ │
└─────────────────────────────────────────────────────────────────────────┘
当然,我可以将 elementaryOS 安装为 HVM 客户机,但这更具挑战性。
谢谢你的帮助和建议
答案1
原始帖子:Xen 项目邮件列表http://goo.gl/nDsyo5
Looks like you're mapping the LV as xvda1. Don't do that if you're
using OS installer. Map it as xvda instead.
You should only map block devices as (xv/s/h)da1 if you're using tools
like debootstrap/yum or doing manual copy from an existing system.
Also if you want to use ext4 as "/", don't forget to have a separate
/boot with ext3 since like Mark said, by default Centos' pygrub
doesn't support ext4.
--
Fajar
就我而言,我在 filename.cfg 中将 xvda1 更改为 xvda(参见示例):
disk = [
'phy:/dev/vgxen/calculus-root,xvda,w'
]