https://github.com/eoli3n/vagrant-pxe
A vagrant PXE client/server environment with libvirt provider.
https://github.com/eoli3n/vagrant-pxe
libvirt-provider pxe-client pxe-server vagrant virtualbox-provider
Last synced: about 1 year ago
JSON representation
A vagrant PXE client/server environment with libvirt provider.
- Host: GitHub
- URL: https://github.com/eoli3n/vagrant-pxe
- Owner: eoli3n
- License: mit
- Created: 2017-01-12T13:52:03.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2020-11-27T08:28:31.000Z (over 5 years ago)
- Last Synced: 2025-03-28T11:21:34.814Z (about 1 year ago)
- Topics: libvirt-provider, pxe-client, pxe-server, vagrant, virtualbox-provider
- Homepage:
- Size: 1.12 MB
- Stars: 60
- Watchers: 2
- Forks: 21
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Vagrant PXE test environment
A vagrant PXE client/server environment which supports legacy and UEFI boot with iPXE.
It is designed to learn and test cloning solutions, nfsroot, ipxe, auto install etc...
Default pxe configuration loads ipxe in UEFI mode and start ubuntu installer over nfsroot.
### Prepare
Install qemu, libvirt, OVMF, nfsd, vagrant-libvirt
```
# For archlinux
pacman -S vagrant libvirt qemu ovmf virt-manager
sudo gpasswd -a $USER libvirt
systemctl start libvirtd
vagrant plugin install vagrant-libvirt
# choose libvirt in menu
```
### VMs
| | Server | Client |
|------|-----------------------|-----------------------|
| OS | Debian 10 | No box |
| CPU | 1 | 1 |
| RAM | 1024 | 2048 |
| eth0 | Management network | Gateway to internet |
| eth1 | Private network "pxe" | Private network "pxe" |
### Run
Run server with
```
$ vagrant up
$ vagrant ssh server
```
To run client, which has ``autostart off``
Note: If you want to test a legacy client boot, comment ``libvirt.firmware`` line in [Vagrantfile](Vagrantfile).
```
$ vagrant up client
```
Then open ``virt-manager`` to see your pxe client booting.
Before the install ends, uncheck NIC in VM boot order configuration to avoid install loop on reboot.
### Clean
```
vagrant destroy -f
```
**Refs**
- http://www.syslinux.org/wiki/index.php?title=PXELINUX
- https://help.ubuntu.com/community/DisklessUbuntuHowto
- https://github.com/vagrant-libvirt/vagrant-libvirt#no-box-and-pxe-boot
- https://github.com/stephenrlouie/PXE-Boot-VM/
- https://ipxe.org
Note: check ``pxelinux`` branch to see a simple pxelinux exemple.