Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have a linux guest and that is my server. I also have created another guest as the client with no disk.

I want to know, which network type and adapter is correct? NAT or Internal Network? AMD or Intel chips?

According to the manual,

PXE booting is now supported in NAT mode. 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. It is the responsibility of the 
user to provide vmname.pxe

What is the content of vmname.pxe? it is an empty file?

Virtualbox is running on Windows 7 and I have installed One linux (scientific linux 6.3 which is similar to redhat and centos 6) as a server and another diskless linux as THE client.

On the server, I have installed tftp related files.

# ls /var/lib/tftpboot/ -R
/var/lib/tftpboot/:
menu.c32  pxelinux.0  pxelinux.cfg  sl6

/var/lib/tftpboot/pxelinux.cfg:
default

/var/lib/tftpboot/sl6:
initrd.img  vmlinuz


# cat /var/lib/tftpboot/pxelinux.cfg/default 
timeout 100
default menu.c32
menu title ########## PXE Boot Menu ##########
label 1
   menu label ^1) Install Scientific Linux 6
   kernel sl6/vmlinuz
   append initrd=sl6/initrd.img method=http://10.0.2.51/sl6 devfs=nomount
label 2
  menu label ^2) Boot from local drive
  localboot 
share|improve this question
    
What is the linux server VM supposed to do? Elaborate on your setup. –  fuero Aug 2 at 2:08
    
It is Scientific linux (similar to redhat and centos). See the updated post –  mahmood Aug 2 at 2:13
    
In this case, you don't need VirtualBox' built-in PXE feature at all. Assign a secondary NIC with "host only" or "internal" networking to server and client, and bind the DHCP server to listen at the second interface. –  fuero Aug 2 at 2:22
2  
    
Regarding the network adapter, should I use the same network type and adapter in both VMs (server & client)? –  mahmood Aug 2 at 2:26

1 Answer 1

Update:

After clarification, not using VirtualBox' built-in PXE feature at all seems the way to go. Assign a secondary NIC with "host only" or "internal" networking to server and client, and bind the DHCP server to listen at the second interface. Do not use Intel cards for the second interface: PXE Booting Virtualbox guests in internal networking mode?

Answer to VirtualBox NAT and PXE:

vmname.pxe contains the code your VM runs after downloading it, the so called NBP (Network Bootstrap Program)

See Wikipedia for further info on PXE.

I'm quoting an example using PXELinux:

  1. get tftp-hpa installed. (you don’t need the daemon. just the program)

  2. set up the pxe directory root.

    mkdir $HOME/.VirtualBox/TFTP mkdir $HOME/.VirtualBox/TFTP/pxelinux.cfg

  3. Copy pxelinux.0 to $HOME/.VirtualBox/TFTP and make symbolic link to pxelinux.0 named .pxe.

  4. copy kernel and perhaps initrd to $HOME/.VirtualBox/TFTP

  5. edit $HOME/.VirtualBox/TFTP/pxelinux.cfg/default, sample:

    LABEL linux KERNEL vmlinuz APPEND root=/dev/sdxY

Source: http://thegnar.org/sync/?p=68

share|improve this answer
    
NO it doesn't work for me. I will create a new post and notify you here –  mahmood Aug 2 at 2:31
    
I suggest salvaging this post. Just saying "NO, doesn't work" isn't information people can help you with. –  fuero Aug 2 at 2:34
    
I appreciate your help. But I am struggling with this problem for two days. Your solution is welcomed serverfault.com/questions/617362/… –  mahmood Aug 2 at 2:47

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.