JetPack 4.X Install with a VM (Solved)

I have successfully installed JetPack 4.0 Developer Preview (31.0.1) using an Ubuntu 16.04 virtual machine onto the Xavier. In my case the VM was running on my MacBook using VirtualBox.

My setup:
Macbook Pro: (Retina, 15-inch, Mid 2014)
OS: 10.13.6
Virtual Box: 5.2.18 r124319 using latest Guest Additions update (5.2.18)
VM OS: Ubuntu 16.04.5 (64 bit)

  1. Make sure your VM is up to date. Initially I had a problem of the JetPack 4.0 Components Manager choking with the install of OpenCV 3.3.1 onto my Ubuntu host. This was because I had an old openCV repository that was coming back not found. Bottom like make sure you can do sudo apt-get update successfully. I also did sudo apt-get upgrade.

  2. Within your VM settings my USB controller was set to USB 3.0 (xHCI) Controller and I had both a NVIDIA Linux for Tegra[0001] and NVIDIA Corp. APX USB Device Filters.

  3. My host connection was via WiFi to the router and from the router ethernet to the Xavier ethernet. Use the USB-C connection on the Xavier front panel. The front panel is considered the side with the LED and expansion header. At some point you will lose the USB connection, but that is okay. You will do the loading in two parts.

  4. From your VM host execute ./JetPack-L4T-4.0-linux-s64_b188.run

  5. Proceed through the steps. You will come across the screen which asks you to put your Xavier into Recovery mode. To verify you are in Recovery Mode from the VM you should be able to ping the IP address of your Xavier. Verify your NVIDIA Corp APX USB has a check mark. The Xavier itself will have a blank screen, but the ping will work.

  6. At some point you will see Making system.img…
    I did temporarily lose the USB connection, but just reselected NVIDIA Corp APX and verified the ping. You have time as it takes > 5 minutes to build the system.img.

  7. Everything will load successfully and the Xavier will auto reboot. The desktop will come up. However back on the VM the script will be trying to identify the IP address of the Xavier but won’t be able to establish the connection. Go ahead and quit out of the script. At this point JetPack has been installed but the other packages (VisionWorks, CUDA Toolkit, cuDNN Package, Tensor RT, OpenCV, and Multimedia API did not.

  8. There is hope…always believe.

  9. Rerun the JetPack-L4T-4.0-linux-x64_b188.run script

  10. This time instead of doing a Full install do a Custom.

  11. Go to “Flash OS Image to Target” and select the action to be “no action”

  12. Now only the steps listed under “Install on Target” will be executed.

  13. When you select “Next” you will be prompted to enter in the IP address of the Xavier along with user (nvidia) and password (nvidia). You can just do ifconfig on your Xavier to see what your IP address is.

  14. Now the script will load the rest of the software (VisionWorks Pack, CUDA Toolkit, CUDA Samples, TensorRT, etc, onto the Xavier.

  15. All is well in your Jetson world.

  16. Verify your JetPack install using the script Jim from JetsonHacks made:
    git clone https://github.com/jetsonhacks/jetsonUtilities.git
    cd jetsonUtilities/
    ./jetsonInfo.py

Results:
NVIDIA Jetson UNKNOWN
L4T 31.0.1 [ JetPack UNKNOWN]
Board: t186ref
Ubuntu 18.04 LTS
Kernel Version: 4.9.108-tegra
CUDA 10.0.117

Have fun,
Andrew Baker




Confirmed JetPack 4.1 installed successfully using the above procedure.

The only difference was step #6. I did not have to quit out of the script. The script asked me to manually enter my IP address after Jetson rebooted.

Results:
NVIDIA Jetson UNKNOWN
L4T 31.0.2 [ JetPack UNKNOWN ]
Board: t186ref
Ubuntu 18.04 LTS
Kernel Version: 4.9.108-tegra
CUDA 10.0.117

Easier just to dual boot the mac IMO.

I make sure the architecture on the host and device are both aarch64
^^ Host should have amd64[32bit VM wont work] and the device is rather aarch64.
For your error, see reference : https://askubuntu.com/questions/648555/bash-program-cannot-execute-binary-file-exec-format-error
It is likely that you are executing a binary designed for a different processor instruction set.

I’m trying to use a VM as well, but having problems following these instructions. The first challenge is step (3)

  1. From your VM host execute ./JetPack-L4T-4.0-linux-s64_b188.run

Where did you find this script?

An automation of creating a guest VM for macOS using VirtualBox + Vagrant + Ansible to run the NVIDIA SDK manager including

a) automatically building a (custom) kernel and rootfs for Xaviers supporting Kubernetes
b) flashing the Xavier from the CLI
c) headless OEM setup of the Xavier after flashing

… can be found here: https://github.com/helmuthva/jetson/tree/master/workflow/guest

Have a look at https://github.com/helmuthva/jetson for the bigger picture.

The procedure is basically:

  1. make bootstrap-environment # Install required tools on Mac
  2. make guest-sdk-manager-download # Download NVIDIA SDK manager
  3. make guest-build # Provision guest VM and build of kernel and rootfs
  4. make guest-flash # Flash Xavier
  5. make oem-setup # Trigger headless oem-setup on Xavier
  6. make setup-access-secure # Setup passwordless SSH access to Xavier
  7. make provision # Provision additional services on Xavier (and join a K8s cluster)

Basic knowledge of Ansible is assumed.

Successfully installed JetPack on the VM host machine (Ubuntu 18.04 LTS), but when I try to run code on the Jetson Xavier after building it on the host machine, I get Exec Format Error. I make sure the architecture on the host and device are both aarch64. Not sure where I’m going wrong.

Anyone tried VM on Windows 10 PC and succeeded ? I mean instllation and flashing AGX ?

I am also getting the flashing error through VM which is been installed on virtualBox. I did all the first 3 steps given by @AerialRoboticsGuru @HelmutHofferVonAnkershoff for Jetson 4.4 and in Step 5 : when i do sudo ./flash.sh jetson-xavier mmcblk0p1 after running for a while it throws error

Writing partition APP with system.img
Command tegradevflash_v2 -pt flash.xml.bin --create
Flashing failed t186ref

Please suggest how I can fix it…
I am getting same error while installing through sdk manager.