from:https://wiki.debian.org/PyGrub

Using pyGRUB on Wheezy to boot a domU kernel

Using pyGRUB from xen-utils-4.0, each domU can boot with its own kernel instead of using the dom0 kernel, which makes life easier for updates and multi distribution Xeninstalls. You need to have first a working domU. The domU FileSystem needs to be ext[234].

On the dom0

  • You need to have the system partition as the first partition listed in your domU.cfg disklist.

Config snippet:

  1. root = '/dev/xvda2 ro'
  2. disk = [
  3. 'phy:/dev/vg05/test2.openforce.com-disk,xvda2,w',
  4. 'phy:/dev/vg05/test2.openforce.com-swap,xvda1,w',
  5. ]

On the domU

  • Make sure /etc/fstab refers to the mount points /dev/xvda{1,2}

  • Install a standard linux-image-amd64 kernel (since Xen support is in mainline Linux since Linux 2.6.37)

  1. mkdir /boot/grub
  2. apt-get install linux-image-amd64

You don't need to install grub, you just need to create a simple grub config file which will be read by pygrub on the Dom0.

  • Create first /boot/grub/menu.lst based on the content of /boot/.

  1. cat > /boot/grub/menu.lst << EOF
  2.  
  3. default 0
  4. timeout 2
  5.  
  6. title Debian GNU/Linux
  7. root (hd0,0)
  8. kernel /vmlinuz root=/dev/xvda2 ro
  9. initrd /initrd.img
  10.  
  11. title Debian GNU/Linux (recovery mode)
  12. root (hd0,0)
  13. kernel /vmlinuz root=/dev/xvda2 ro single
  14. initrd /initrd.img
  15.  
  16. EOF

On the dom0

  • Check that grub was properly installed on the domU with
  1. /usr/lib/xen-default/bin/pygrub /dev/vg02/my_domU-disk

which should great with the familiar grub menu, and then abort

  • Replace the kernel and ramdisk parameters in the domU config file with the following line.

  1. bootloader = '/usr/lib/xen-default/bin/pygrub'

PyGrub的更多相关文章

  1. 在 CentOS 上安装和配置 OpenNebula

    转自:http://www.aikaiyuan.com/4889.html 我们提到的云计算一般有三种类型:软件即服务(Software as a Service, SaaS),平台即服务(Platf ...

  2. libvirtsAPI

    mongodb远程服务器连接 mongo -uroot -p321 master.puppet.org:27017/admin

  3. xen之基本搭建

    1. 前言 所需包: kernel-xen xen xen-libs (xen依赖包) xen_runtime (xen依赖包) 以上xen包需要版本号一致,例如4.1.3版本,这里使用xm接口管理工 ...

  4. virsh VMI deploy data serial xml

    <domain type='kvm' xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'>        <name> ...

  5. xen虚拟机操作整理

    1,登陆物理机器 2,查看物理机建立虚拟机的列表 root:~ # xm li Name ID Mem VCPUs State Time(s) Domain-0 0 49450 8 r----- 52 ...

  6. xen虚拟机(Centos6.6)的创建和扩容

    好久没来更博了,从这篇开始,我准备好好梳理一下Hadoop的那些"事".本人技术渣一枚,只是本着知识共享的原则,希望将我所掌握的知识分享出来.若文中有错误的地方,欢迎大家告知我,我 ...

  7. 实验六:通过grub程序引导本地磁盘内核启动系统(busybox)

    实验名称: 通过grub程序引导本地磁盘内核启动系统(busybox) 实验环境: 理论上,该实验只需要配置好xen环境即可,但是,我们的xen环境安装在centOS7上,但是我们又是使用的kerne ...

  8. 实验七:Xen环境下cirrOS的安装配置

    实验名称: Xen环境下cirrOS的安装配置 实验环境: 这里的cirrOS和实验六中的busybox的启动方式相同,唯一的区别就是我们使用的cirrOS镜像中,已经包含了根文件系统.内核文件以及r ...

  9. centos6.7环境半虚拟化软件xen及xm配置工具使用详解

    1.xen软件的安装及配置 环境准备: ①操作系统:centos6.7(注意最好使用centos6.7,centos6.5无法使用xen的图形化界面创建操作系统) ②调整虚拟机配置,内存4G(推荐2G ...

随机推荐

  1. Lua编程

    lua编程大杂烩.博客其他方面也不错.先记录.http://www.cnblogs.com/stephen-liu74/category/360139.html

  2. BZOJ - 3196 Tyvj 1730 二逼平衡树 (线段树套treap)

    题目链接 区间线段树套treap,空间复杂度$O(nlogn)$,时间复杂度除了查询区间k大是$O(log^3n)$以外都是$O(log^2n)$的. (据说线段树套线段树.树状数组套线段树也能过?) ...

  3. BZOJ - 2460 :元素 (贪心&线性基)

    相传,在远古时期,位于西方大陆的 Magic Land 上,人们已经掌握了用魔法矿石炼制法杖的技术.那时人们就认识到,一个法杖的法力取决于使用的矿石.一般地,矿石越多则法力越强,但物极必反:有时,人们 ...

  4. Spring IOC容器的初始化-(二)BeanDefinition的载入和解析

    前言 1.在讲BeanDefinition的载入和解析之前,我们先来看看什么是BeanDefinition. Bean对象在Spring中是以BeanDefinition来描述的,也就是说在Sprin ...

  5. Django工程目录结构优化

    1.我看到这篇文章,写的不错,在此复制了一份,防止以后找不到! 感谢作者的翻译--->原文的链接:http://www.loonapp.com/blog/11/ 如果原文存在,请打开原文件阅读 ...

  6. angular中的 input select 值绑定无效,以及多出一个空白选项问题

    问题: <!-- 问题标签 --> <select ng-model="sortType"> <option value="1"& ...

  7. setContentHuggingPriority和setContentCompressionResistancePriority的使用

    当两个UILabel并排显示时,如何设置约束,让 leftLB 和 rightLB 正常显示就很重要了. 方案1:左右两个Label的宽度相同,则约束设置如下: //添加标题约束,左边的label [ ...

  8. React组件性能优化总结

    性能优化的思路 影响网页性能最大的因素是浏览器的重排(repaint)和重绘(reflow). React的Virtual DOM就是尽可能地减少浏览器的重排和重绘. 从React渲染过程来看,如何防 ...

  9. Linux安装微信

    地址:http://www.toutiao.com/i6362126617556288001/#6649976-tsina-1-90079-4471e2b057b5019ad452c722f04bba ...

  10. 使用nagios插件 check_mysql_health 过程中遇到的error

    使用nagios插件 check_mysql_health 过程中遇到的error 1.如果在运行监控mysql插件的时候遇到了error安装以下依赖包就可以解决: yum install perl- ...