My Manjaro Linux QEMU build takes forever to do download packages or anything connection related

Builder: QEMU
Box OS: Manjaro Linux

Relevant files:
Build file
Main provisioner

My logs:
Build attempt
Build attempt with pacman-mirrors

My problem:

It seems to me that for this particular setup packer has a problem with anything connection related.
It’s currently stuck on retrieving packages. It doesn’t do anything after that.
I also notice that TCP handshakes fail, or sometimes the boot commands take 10+ seconds for downloads.

Solved: too little memory, which raises another question.