I create a VM(ubuntu16.04) on my Win10 and compile onos by the following command in shared folder .
$ export ONOS_ROOT=/media/sf_EC/onos
$ source $ONOS_ROOT/tools/dev/bash_profile
$ ./tools/build/onos-buck run onos-local -- debug clean
I found the bug which is related permission (omit some error and show the last 5 line )
File "/media/sf_EC/onos/bin/buck/programs/buck.py", line 71, in <module>
File "/media/sf_EC/onos/bin/buck/programs/buck.py", line 67, in main
File "/media/sf_EC/onos/bin/buck/programs/tracing.py", line 113, in write_to_dir
File "/media/sf_EC/onos/bin/buck/programs/tracing.py", line 28, in create_symlink
OSError: [Errno 1] Operation not permitted
I had added my user(jack) to the vboxsf group and reboot it and confirmed by following command.
$ sudo usermod -a -G vboxsf jack
$ cat /etc/group | grep "vboxsf"
shows:
vboxsf:x:999:jack
I have been searching for a long time on the Internet, but it was no use for me. Please help or try to give some ideas how to compile onos in vm shared folder.
One of the problems could be that you are using buck to build the controller. Buck is not used anymore, instead, we use Bazel to build ONOS.
If for any reason, you need to use buck and a fairly old version of ONOS, then your issue seems to be related to permissions. It might be that you cloned, or installed some tools with admin privileges and now, when building, you can not do it as regular user and need to do it as "sudo".
Still, I would clone the latest version and follow the instructions from the ONOS wiki.