RHEL 6.6 on xhyve

  • 投稿日:
  • by
  • カテゴリ:

Here's the installation script for RHEL 6.6 on xhyve. You need to extract the vmlinuz and the initrd.img from /images/pxeboot/ directory in the installation DVD image.

#!/bin/sh

KERNEL="rhel66/vmlinuz"
INITRD="rhel66/initrd.img"
CMDLINE="console=ttyS0 acpi=off sshd=1 vnc vncpassword=yourpasswd"

MEM="-m 1G"
#SMP="-c 2"
NET="-s 2:0,virtio-net"
IMG_CD="-s 3,ahci-cd,/path/to/rhel-server-6.6-x86_64-dvd.iso"
IMG_HDD="-s 4,virtio-blk,rhel66/hdd.img"
PCI_DEV="-s 0:0,hostbridge -s 31,lpc"
LPC_DEV="-l com1,stdio"

build/xhyve $MEM $SMP $PCI_DEV $LPC_DEV $NET $IMG_CD $IMG_HDD -f kexec,$KERNEL,$INITRD,"$CMDLINE"

You need to scp the initramfs, the vmlinuz and the grub.cfg from the installed RHEL 6.6 to Mac OS X at the end of installation sequence. So, I passed the 'sshd=1' param to the kernel. And here's the booting script for RHEL 6.6.

#!/bin/sh

KERNEL="rhel66/boot/vmlinuz-2.6.32-504.el6.x86_64"
INITRD="rhel66/boot/initramfs-2.6.32-504.el6.x86_64.img"
CMDLINE="BOOT_IMAGE=/vmlinuz-2.6.32-504.el6.x86_64 ro root=/dev/mapper/VolGroup-lv_root rd_NO_LUKS LANG=en_US.UTF-8 rd_NO_MD  KEYTABLE=us rd_LVM_LV=VolGroup/lv_swap acpi=off console=ttyS0 crashkernel=auto rd_LVM_LV=VolGroup/lv_root SYSFONT=latarcyrheb-sun16 rd_NO_DM"

MEM="-m 1G"
SMP="-c 2"
NET="-s 2:0,virtio-net"
IMG_HDD="-s 4,virtio-blk,rhel66/hdd.img"
PCI_DEV="-s 0:0,hostbridge -s 31,lpc"
LPC_DEV="-l com1,stdio"
UUID="-U ED92A783-625C-4A0F-B385-9F560A75FF75"

build/xhyve $MEM $SMP $PCI_DEV $LPC_DEV $NET $IMG_CD $IMG_HDD $UUID -f kexec,$KERNEL,$INITRD,"$CMDLINE"

The kernel parameters are from grub.cfg. You can use 'uuidgen' command on Mac OS X to be used for 'UUID' in the script. Enjoy!