srvk / DiViMe

ACLEW Diarization Virtual Machine
Apache License 2.0
32 stars 9 forks source link

Symlink issue as both admin and non-admin user #134

Open marisacasillas opened 5 years ago

marisacasillas commented 5 years ago

System: Windows 10 Enterprise Intel core i5-6300U CPU @ 2.4GHz RAM usable: 7.89 GB/9 GB

I was (I think) able to install everything (Vagrant 2.2.4, VirtualBox 6.0.8, the Vagrant plugins; ran vagrant up successfully), but now I have run into multiple problems running the installation test.

  1. I didn't have a network connection inside the VM. I was able to get one by pasting the following into the DiViMe/Vagrantfile vbox.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]. That gave me a network connection, from which the VM was able to download the test files. However,

  2. Now I am running into issues with symlinks. Specifically, I get a protocol error every time the VM tries to run a test. I checked out the tip here, which suggested I try running the terminal with admin credentials. I did the following:

  3. First I opened a new Powershell instance as admin (right click > Run as administrator) and then navigated to DiViMe.

    
    PS C:\Users> cd .\marcas\Documents\GitHub\DiViMe\
    PS C:\Users\marcas\Documents\GitHub\DiViMe> ls
    
    Directory: C:\Users\marcas\Documents\GitHub\DiViMe

Mode LastWriteTime Length Name


d----- 7/11/2019 2:43 AM .idea d----- 7/11/2019 4:44 AM .vagrant d----- 7/11/2019 2:43 AM conf d----- 7/15/2019 6:05 AM data d----- 7/15/2019 4:11 AM docs d----- 7/11/2019 2:43 AM example-logs d----- 7/15/2019 5:42 AM launcher d----- 7/11/2019 2:43 AM utils -a---- 7/11/2019 2:43 AM 800 .gitignore -a---- 4/5/2019 7:22 AM 660030560 Anaconda2-2019.03-Linux-x86_64.sh -a---- 7/11/2019 2:43 AM 11558 LICENSE -a---- 9/16/2017 3:55 AM 1495757900 MCR_R2017b_glnxa64_installer.zip -a---- 7/11/2019 2:43 AM 669 README.md -a---- 7/15/2019 6:05 AM 4386 Vagrantfile


4. Then I tried to run the machine with `vagrant ssh`, but I ran into a user ID error.
``` console
PS C:\Users\marcas\Documents\GitHub\DiViMe> vagrant ssh
==> vagrant: A new version of Vagrant is available: 2.2.5 (installed version: 2.2.4)!
==> vagrant: To upgrade visit: https://www.vagrantup.com/downloads.html

The VirtualBox VM was created with a user that doesn't match the
current user running Vagrant. VirtualBox requires that the same user
be used to manage the VM that was created. Please re-run Vagrant with
that user. This is not a Vagrant issue.

The UID used to create the VM was: 6978
Your UID is: 0
  1. I changed the user ID to match the admin ID like this in Notepad++.

  2. I tried running vagrant ssh again (then vagrant up), with the following output:

    
    PS C:\Users\marcas\Documents\GitHub\DiViMe> vagrant ssh
    VM must be created before running this command. Run `vagrant up` first.
    PS C:\Users\marcas\Documents\GitHub\DiViMe> vagrant up
    Bringing machine 'default' up with 'virtualbox' provider...
    ==> default: Box 'ubuntu/trusty64' could not be found. Attempting to find and install...
    default: Box Provider: virtualbox
    default: Box Version: >= 0
    ==> default: Loading metadata for box 'ubuntu/trusty64'
    default: URL: https://vagrantcloud.com/ubuntu/trusty64
    ==> default: Adding box 'ubuntu/trusty64' (v20190429.0.1) for provider: virtualbox
    default: Downloading: https://vagrantcloud.com/ubuntu/boxes/trusty64/versions/20190429.0.1/providers/virtualbox.box
    default: Download redirected to host: cloud-images.ubuntu.com
    default:
    ==> default: Successfully added box 'ubuntu/trusty64' (v20190429.0.1) for 'virtualbox'!
    ==> default: Importing base box 'ubuntu/trusty64'...
    ==> default: Matching MAC address for NAT networking...
    ==> default: Checking if box 'ubuntu/trusty64' version '20190429.0.1' is up to date...
    ==> default: Setting the name of the VM: DiViMe_default_1563136878470_4913
    ==> default: Clearing any previously set forwarded ports...
    ==> default: Fixed port collision for 22 => 2222. Now on port 2200.
    Vagrant is currently configured to create VirtualBox synced folders with
    the `SharedFoldersEnableSymlinksCreate` option enabled. If the Vagrant
    guest is not trusted, you may want to disable this option. For more
    information on this option, please refer to the VirtualBox manual:
    
    https://www.virtualbox.org/manual/ch04.html#sharedfolders

This option can be disabled globally with an environment variable:

VAGRANT_DISABLE_VBOXSYMLINKCREATE=1

or on a per folder basis within the Vagrantfile:

config.vm.synced_folder '/host/path', '/guest/path', SharedFoldersEnableSymlinksCreate: false ==> default: Clearing any previously set network interfaces... ==> default: Preparing network interfaces based on configuration... default: Adapter 1: nat default: Adapter 2: hostonly default: Adapter 3: hostonly default: Adapter 4: hostonly default: Adapter 5: hostonly default: Adapter 6: hostonly default: Adapter 7: hostonly default: Adapter 8: hostonly default: Adapter 9: hostonly default: Adapter 10: hostonly default: Adapter 11: hostonly default: Adapter 12: hostonly default: Adapter 13: hostonly There was an error while executing VBoxManage, a CLI used by Vagrant for controlling VirtualBox. The command and stderr is shown below.

Command: ["modifyvm", "e3abaddd-f105-4fd9-905c-529c7093fac9", "--nic1", "nat", "--nic2", "hostonly", "--hostonlyadapter2", "VirtualBox Host-Only Ethernet Adapter", "--cable connected2", "on", "--nic3", "hostonly", "--hostonlyadapter3", "VirtualBox Host-Only Ethernet Adapter", "--cableconnected3", "on", "--nic4", "hostonly", "--hostonlyadapter4 ", "VirtualBox Host-Only Ethernet Adapter", "--cableconnected4", "on", "--nic5", "hostonly", "--hostonlyadapter5", "VirtualBox Host-Only Ethernet Adapter", "--cableconnecte d5", "on", "--nic6", "hostonly", "--hostonlyadapter6", "VirtualBox Host-Only Ethernet Adapter", "--cableconnected6", "on", "--nic7", "hostonly", "--hostonlyadapter7", "Virt ualBox Host-Only Ethernet Adapter", "--cableconnected7", "on", "--nic8", "hostonly", "--hostonlyadapter8", "VirtualBox Host-Only Ethernet Adapter", "--cableconnected8", "on ", "--nic9", "hostonly", "--hostonlyadapter9", "VirtualBox Host-Only Ethernet Adapter", "--cableconnected9", "on", "--nic10", "hostonly", "--hostonlyadapter10", "VirtualBox Host-Only Ethernet Adapter", "--cableconnected10", "on", "--nic11", "hostonly", "--hostonlyadapter11", "VirtualBox Host-Only Ethernet Adapter", "--cableconnected11", "on", "--nic12", "hostonly", "--hostonlyadapter12", "VirtualBox Host-Only Ethernet Adapter", "--cableconnected12", "on", "--nic13", "hostonly", "--hostonlyadapter13", "VirtualBo x Host-Only Ethernet Adapter", "--cableconnected13", "on"]

Stderr: VBoxManage.exe: error: Invalid NIC number 9 VBoxManage.exe: error: Invalid NIC number 9 VBoxManage.exe: error: Invalid NIC number 9 VBoxManage.exe: error: Invalid NIC number 10 VBoxManage.exe: error: Invalid NIC number 10 VBoxManage.exe: error: Invalid NIC number 10 VBoxManage.exe: error: Invalid NIC number 11 VBoxManage.exe: error: Invalid NIC number 11 VBoxManage.exe: error: Invalid NIC number 11 VBoxManage.exe: error: Invalid NIC number 12 VBoxManage.exe: error: Invalid NIC number 12 VBoxManage.exe: error: Invalid NIC number 12 VBoxManage.exe: error: Invalid NIC number 13 VBoxManage.exe: error: Invalid NIC number 13 VBoxManage.exe: error: Invalid NIC number 13



So now, as a non-admin I get protocol errors when I install everything but try to run the test files and as an admin I can't seem to even get past `vagrant up`.

Help?
marisacasillas commented 5 years ago

@fmetze? i can't move forward on this without a bit of advice from someone.

sarpu commented 5 years ago

Could you try this?

marisacasillas commented 5 years ago

In my installed version of VirtualBox, this solution seems to have already been implemented, so I don't think it's the source of the problem, i.e. max_network_adapters is already set to 8, which is the posted solution.

marisacasillas commented 5 years ago

Hi all! This is still an issue, now encountered by a tutorial participant. See their test output attached here. Please jump in if you have a solution.

failed_to_create_symbolic_link.txt

sarpu commented 5 years ago

The launcher/test.sh: /home/vagrant/utils/sum-rttm.sh: /bin/bash^M: bad interpreter: No such file or directory line is interesting. Could you install dos2unix on the VM, and run it for all the scripts in the launcher folder? So: sudo apt-get install dos2unix And then, something like below in the launcher folder. find . -name *.sh |xargs dos2unix I think this is the issue.

marisacasillas commented 5 years ago

Oh right, I didn't catch that, thanks! I'll pass that on to the tutorial participant.

FYI: On my own version of this issue, the line endings were already fixed. So my original issue still remains.

marisacasillas commented 5 years ago

Participant confirms he also already fixed the line endings problem!

Symbolic link problem remains an issue; other suggestions, @fmetze @sarpu ?