W3tTr3y's blog

A personal technology focused blog

Kickstarting CentOS in Virtualbox

This is actually something I’ve been meaning to do for awhile. With using Vagrant so much and having a tool that creates base boxes for it, I’ve let it sit on the back burner.

I’m trying to work on normalizing log data into a common informaiton model (CIM) for compliance with our security framework.


The NAT DHCP server provides a boot file name of the form vmname.pxe if the directory TFTP exists in the directory where the user's VirtualBox.xml file is kept.

So where is VirtualBox.xml? I’ve found some links saying under Linux its ~/.config/VirtualBox but that doesn’t help on my Mac.

$ find . -name VirtualBox.xml -print ./Library/VirtualBox/VirtualBox.xml

(setup port forward from localhost 2222 to the vm on 22) ssh user@localhost -p 2222 yum install syslinux cd ~/Library/VirtualBox scp -P 2222 wtriest@localhost:/usr/share/syslinux/{pxelinux.0,menu.c32,memdisk,mboot.c32,chain.c32} .

mkdir pxelinux.cfg

mkdir -p images/centos/x86_64/7.0

Assuming you have the cd mounted in the virtual machine at /media/cdrom

scp -P 2222 wtriest@localhost:/media/cdrom/images/pxeboot/{vmlinuz,initrd.img} .

ln -s pxelinux.0 Centos-7-Test.pxe