Problem
The memory allocation failed during the vagrant up --provision
1 2 3 4 5 6 7 8 9 |
==> default: virtual memory exhausted: Cannot allocate memory ==> default: make[3]: ==> default: *** [virtio_net.o] Error 1 ==> default: make[2]: *** [librte_vhost] Error 2 ==> default: make[1]: *** [lib] Error 2 ==> default: make: *** [all] Error 2 ==> default: modprobe: FATAL: Module uio not found. ==> default: modprobe: FATAL: Module uio_pci_generic not found. ==> default: insmod: ERROR: could not insert module /home/vagrant/gatekeeper/dependencies/dpdk/build/kmod/igb_uio.ko: Unknown symbol in module |
Approach
1. As we are using the cloud image from vagrant, the kernel contains the minimal dependencies, therefore, some modules required are missing.
I will append the linux-generic
to the provision.sh to ensure the modules uio
and uio_pci_generic
are corrected configured.
Result: The following two lines are removed from the error log this time
1 2 3 |
==> default: modprobe: FATAL: Module uio not found. ==> default: modprobe: FATAL: Module uio_pci_generic not found. ==> default: insmod: ERROR: could not insert module /home/vagrant/gatekeeper/dependencies/dpdk/build/kmod/igb_uio.ko: Unknown symbol in module |
2. In order to deal with the virtual memory allocation, I would like to simply increase the memory assigned without setup for swap space
I will be increasing the memory allocated for the vagrant from vb.memory = 2048
to vb.memory = 4096
Result: The following two lines are removed from the error log this time
1 2 3 4 5 6 |
==> default: virtual memory exhausted: Cannot allocate memory ==> default: make[3]: ==> default: *** [virtio_net.o] Error 1 ==> default: make[2]: *** [librte_vhost] Error 2 ==> default: make[1]: *** [lib] Error 2 ==> default: make: *** [all] Error 2 |
Conclusion
It is due to the missing modules in the cloud image and the insufficient memory allocated for the vagrant.