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:

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

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)

mkdir /boot/grub
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/.

cat > /boot/grub/menu.lst << EOF

default         0
timeout 2 title Debian GNU/Linux
root (hd0,0)
kernel /vmlinuz root=/dev/xvda2 ro
initrd /initrd.img title Debian GNU/Linux (recovery mode)
root (hd0,0)
kernel /vmlinuz root=/dev/xvda2 ro single
initrd /initrd.img EOF

On the dom0

  • Check that grub was properly installed on the domU with
/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.

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. C#操作带名称空间的xml

    以前操作xml一般用下面这种方式: 好处是XDocument 能使用linq xmlPath = “path”; XDocument myXDoc = XDocument.Load(xmlPath); ...

  2. JQuery 提示用户名密码不为空

    $(document).ready(function(){                  //HTML()替换   HTML函数         //append()追加  :input = :t ...

  3. C# chart控件运用

    为了弄一个实时数据显示的窗口,最近一周时间都耗在这个控件上了,属性有点多(下面列的是一些常用的) 后来干脆写代码把他们封装起来,各个chart直接来调用它,省得到属性里面去设置. chart内的一些元 ...

  4. Socket通信简单实例(WCF调用Socket)

    服务端: 控制台程序监听 /// <summary> /// Server /// </summary> class Program { static Socket serve ...

  5. [原]zeromq框架测试报告

    一.环境: 服务器:linux 4核 16G 虚拟机 1台 客户端:linux 4核 16G 2000台(模拟) 数据包大小:1036字节 二.参数设置: ulimit -n 65536 服务端处理线 ...

  6. vscode: Visual Studio Code 常用快捷键【轉】

    主命令框 F1 或 Ctrl+Shift+P: 打开命令面板.在打开的输入框内,可以输入任何命令,例如: 按一下 Backspace 会进入到 Ctrl+P 模式 在 Ctrl+P 下输入 >  ...

  7. file_put_contents以及file_get_contents的用法与在使用过程中遇到的问题(PHP学习)

    对数据的操作最基本的是增删改查,file_put_contents以及file_get_contents是对文件里的数据进行存入与取出. 先上代码: <?php $str = 'hello wo ...

  8. PL/SQL 训练04--事务

    --pl/sql通过SQL和ORACLE数据库紧密的整合在一起--在pl/sql中可以执行任何操作语句(DML语句),包括INSERT,UPDATE,DELETE,MERGE,也包括查询语句--可否执 ...

  9. nandflash裸机程序分析

    它包含7个文件: head.S init.c main.c Makefile nand.c nand.lds 我们之前的程序都是在nandflash的前4k放代码,上电后自动拷贝到SRAM中,之后将S ...

  10. Linux - apache 服务

    暂时关闭 iptables 防火墙 [root@sch01ar ~]# systemctl stop iptables.service 暂时关闭 firewall 防火墙 [root@sch01ar ...