PYNQ SD Card build environment

Hello there,
I am creating a build environment following the documentation instruction here.
Everything is fine and apparently without errors to the end of step 4. vagrant reload.
Now I must install the xilinx tools… I must install them on the guest VM, shall I?
But how to access the VM?
As Ubuntu, vagrant or guest? And what password? I didn’t enter any password during the set up…

Can anyone help me ?
Best regards

1 Like

Hi Guido,
Yes, you need to install the Xilinx tools to the guest VM.

The username/password should be vagrant



Thanks. I still don’t have administrator rights on the machine… but sudo seems to work. Next one is: I am installing Vivado 2018.3… I stripped everything out but still requires 22GB (sic!), and the VM is only roughly 8GB. What shall I do? I thought the vagrant thing would dimension the VM with the required amount of disk, wouldn’t it?

Best regards

The admin permission is normal for Ubuntu. Just use sudo as needed.

If you stop the VM, in VirtualBox you should be able to increase the size of the disk.

It should only allocate space on your host disk as the space is used up on the disk in the VM. E.g. if you allocate 40GB and are only using 20GB, it should only take up ~20GB on your host disk, and will grow as needed when you use more space in the VM. However, you can’t reduce the size of the disk.


The default vagrant setup file allocates 100GB, which should be enough for installing all xilinx tools. So you would probably use the original vagrant file provided on the github.

Maybe I wasn’t clear: I used the vagrant setup!

By the way, just for reference:

  • the main disk (Computer) is 10GB
  • the pynq shared subfolder is 54GB
  • the other disk (cidata) need admin authentication to be mounted
    So the only place I can install the vivado behemoth is the shared folder… it seems, though, that I am running into path length problems there.

Looking at the VM settings, there is a 100GB disk.

So I am now trying to install vivado into /sdbuild

Vivado in /sdbuild… Success!
Now Petalinux… not enough disk space to save the 6.8GB in the standard home/vagrant/Downloads folder (it does say so only after few GB and hours…)!
Change Firefox save folder to /sdbuild/Xilinx/Downloads… no permission to write into it(at least it say so immediately)!
Resolving to download the file in windows and moving it to pynq shared folder…
Such a pain!

Finally got the Petalinux installer in the VM…
Log file follows, given it’s not possibleto attach files to board messages:

vagrant@ubuntu-xenial:/sdbuild$ ./ ./Xilinx/Petalinux
INFO: Checking installation environment requirements…
INFO: Checking free disk space
INFO: Checking installed tools
INFO: Checking installed development libraries
ERROR: You are missing these development libraries required by PetaLinux:

  • zlib1g:i386

Please install them with your operating system package manager, and try again
WARNING: Please install required packages.

Please refer to the PetaLinux Tools Installation Guide.

Check the troubleshooting guide at the end of that manual, and if you are
unable to resolve the issue please contact customer support with file:

So zlib1g:i386 is missing, so long for the vagrant environment setup… but let’s try to install it manually!
Oh no!!!
vagrant@ubuntu-xenial:/sdbuild$ sudo apt-get install zlib1g:i386
Reading package lists… Done
Building dependency tree
Reading state information… Done
Package zlib1g:i386 is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package ‘zlib1g:i386’ has no installation candidate

$ sudo dpkg --add-architecture i386
$ sudo apt update
before running
$ sudo apt-get install -y zlib1g:i386

And, after a little chmod’ing around folders, I seem to have succeeded!
Now “Building the Image”…

Unfortunately installing vBox Additions 6.06.61 killed the VM… tbh, the Prepare the Building Environment procedure with vagrant seems needing some tweaks will be updated based on comments from users. In the next release we expect a more stable version.

I still don’t get it how you end up with not-enough space errors. The vagrant setup file should work… I tested it.

You probably had the huge install files already in your host. In fact, with hindsight, is much better download with the host and use the shared folder to exchange files between host and guest. I now believe Vagrant setup works, though not 100% smoothly, as shown above; it must be specified clearly it is necessary ALWAYS to start the VM with “vagrant reload”: if the VM is started manually from the VBOX GUI it doesn’t get up. Additionally, the VM needs guest additions for bigger displays and for bidirectional clipboard, I blinded myself to run command in the tiny terminal of he VM screen. Best regards

The instructions are documented here: PYNQ SD Card image — Python productivity for Zynq (Pynq)

But you are right about the guest additions. Those are standard VM plugins so we did not mention in our documents. We can add some instructions for that in the documentation (feel free to add by yourself if you feel comfortable).

OK. I have tried the vagrant flow, so right now I have an idea of what you talked about. Pardon me for this because I have not run it for a long time. Let me summarize, maybe for other users as well:

  1. You need vbox guest additions for bigger display + bidirectional clipboard. For bidirectional clipboad you can enable them in virtual box settings.

  2. You need vagrant reload in your host machine terminal to start up the VM. Otherwise vagrant won’t work properly. Important!

  3. If you do item 2, shared folder will be /pynq on your pynq_vm; on your host machine, the shared folder is pointing to the location where you run vagrant up initially. Use this shared folder to move files around between your host machine and your pynq_vm.

  4. Please don’t install packages or run make in /pynq, even though it may contain all the files from github. /pynq is just a small shared folder.

  5. The 100GB disk is located at /sdbuild. Install Xilinx tools here. Run the sdbuild make process in this folder as well. The best practice is to clone the PYNQ repository here. For example,

cd /sdbuild
git clone --recursive pynq-git
cd pynq-git/sdbuild

Hope this will help other users. I will try to include this in the docs.

1 Like