2011-04-08, 17:21
Hi Everyone!
I have been trying to SAN boot VBox for the past few weeks. Now that I figure out how to get everything work. Here are the steps:
1. Set up iSCSI Target with your server:
1.1. Install iSCSI Enterprise Target to Server:
Assuming your server IP is 192.168.1.1.
See, http://iscsitarget.sourceforge.net/ for instructions.
1.2. Make a RAW disk image (8GB):
1.3. Add iSCSI Target by editing /etc/iet/ietd.conf:
1.4. Restart IET service:
2. Install Virtualbox:
See, http://www.virtualbox.org/.
3. Install Fedora 14 into iSCSI Target using Virtualbox:
3.1. Compile iPXE to get an image. I use floppy image (ipxe.dsk) and believe that CD/DVD (ipxe.iso) image should work equally well.
3.2. Prepare a iPXE boot script file (install.ipxe). It should look like:
3.3. Boot VBox with ipxe.dsk and press CTRL_B for manual boot. In command line, key in:
This should connect your VBox with the iSCSI Target and load BFO. Follow the instructions on the screen. You should be able to install Fedora 14 into the iSCSI target.
4. Boot from the iSCSI target using VBox:
Once you are done with the installation, you can use the same iPXE image to SAN boot from the iSCSI target. I created another iPXE script file which looks like:
After bringing up command line, you can type:
After a while, you should be able to SAN boot your Virtualbox using the newly installed Fedora Linux over the Internet. The speed may be slow, but it works! Kudos to the iPXE project!
5. Notes:
5.1. I choose Fedora because its installer supports iSCSI installation. Other distros should work, but haven't tried any. I would be interested in hearing any of your experiences.
5.2. I still cannot boot the same iSCSI target using different VMs. Any suggestions are welcomed!
I have been trying to SAN boot VBox for the past few weeks. Now that I figure out how to get everything work. Here are the steps:
1. Set up iSCSI Target with your server:
1.1. Install iSCSI Enterprise Target to Server:
Assuming your server IP is 192.168.1.1.
See, http://iscsitarget.sourceforge.net/ for instructions.
1.2. Make a RAW disk image (8GB):
Code:
# dd if=/dev/zero of =/directory/of/target/disk.img bs=1M count=0 seek=8196
1.3. Add iSCSI Target by editing /etc/iet/ietd.conf:
Code:
Target iqn.2011-03.com.domain:disk.img
Lun 0 Path=/directory/of/target/disk.img,Type=fileio
1.4. Restart IET service:
Code:
# service iscsi-target restart
2. Install Virtualbox:
See, http://www.virtualbox.org/.
3. Install Fedora 14 into iSCSI Target using Virtualbox:
3.1. Compile iPXE to get an image. I use floppy image (ipxe.dsk) and believe that CD/DVD (ipxe.iso) image should work equally well.
3.2. Prepare a iPXE boot script file (install.ipxe). It should look like:
Code:
#!ipxe
set initiator-iqn iqn.2011-04.com.domain:vbox.initiator
set iscsi-target iscsi:domain.com::::iqn.2011-03.com.domain:disk.img
set root-path ${iscsi-target}
set skip-san-boot 1
set keep-san 1
sanboot ${root-path} ||
# Use BFO to install
set base-url http://fedora.mirrors.pair.com/linux/releases/14/Fedora/i386/os/images
kernel ${base-url}/pxeboot/vmlinuz stage2=${base}/install.img
initrd ${base-url}/pxeboot/initrd.img
boot
3.3. Boot VBox with ipxe.dsk and press CTRL_B for manual boot. In command line, key in:
Code:
iPXE> dhcp
iPXE> chain http://domain.com/install.ipxe
4. Boot from the iSCSI target using VBox:
Once you are done with the installation, you can use the same iPXE image to SAN boot from the iSCSI target. I created another iPXE script file which looks like:
Code:
#!ipxe
set initiator-iqn iqn.2011-04.com.domain:vbox.initiator
set iscsi-target iscsi:domain.com::::iqn.2011-03.com.domain:disk.img
set root-path ${iscsi-target}
sanboot ${root-path} ||
Code:
iPXE> dhcp
iPXE> chain http://domain.com/boot.ipxe
5. Notes:
5.1. I choose Fedora because its installer supports iSCSI installation. Other distros should work, but haven't tried any. I would be interested in hearing any of your experiences.
5.2. I still cannot boot the same iSCSI target using different VMs. Any suggestions are welcomed!