如何更改xVM上PV guest的内核启动参数

PV guest一般直接boot进入系统,而没有grub menu的过程。但有的时候需要给PV guest的内核增加一些启动参数,比如:

1. 增加-v, -kd等内核调试参数

2. 增加console等串口输出工具

3. 选择不同的内核进行启动

等等。

下面就是一例。

During 'pkg image-update' a zfs snapshot of the root filesystem
was created and then a zfs clone was created from that snapshot.
The clone is given a suffix of a '-1' or '-2', etc. Then the
clone is promoted so it is now on the mainline of the filesystem.

After a couple of 'pkg image-update's you'll see
rpool/ROOT/opensolaris
rpool/ROOT/opensolaris-1
rpool/ROOT/opensolaris-2
with -2 being the current boot filesystem.

To boot one of the other clones, you'll need to add
a bootloader_args entry to your domain definition for the
zfs filesystems that you want to boot.

% virsh dumpxml <domU> > domain.xml

Edit domain.xml adding this line after the <bootloader> line with the
zfs clone filesystem to boot:
<bootloader_args>--args="-B zfs-bootfs=rpool/ROOT/opensolaris"</bootloader_args>

% virsh define domain.xml

Then you'll be able to boot that domU using that zfs filesystem clone.

This is equivalent to running the grub command 'bootfs' to select
the current zfs boot filesystem to use.

To revert back, just remove the bootloader_args line from the
domain.xml file and run 'virsh define domain.xml'.

你可能感兴趣的:(xml)