Running XNAT in a Vagrant Virtual Machine

106 views
Skip to first unread message

Arthur Goldberg

unread,
Jan 5, 2022, 7:12:19 PM1/5/22
to xnat_discussion
Hello

I'm new to XNAT. Following Running XNAT in a Vagrant Virtual Machine, I tried the quick approach, using Vagrant. I installed VirtualBox & Vagrant. VirtualBox runs and shows XNAT:
VB.jpg
See my log below. These appear to be errors, but I'm uncertain what to do about them:
Error 1:
   grep: local.yaml: No such file or directory

Error 2:
   The IP address configured for the host-only network is not within the
   allowed ranges. Please update the address used to be within the allowed
   ranges and run the command again.

     Address: 10.1.1.17
     Ranges: 192.168.56.0/21

   Valid ranges can be modified in the /etc/vbox/networks.conf file. For
   more information including valid format see:

     https://www.virtualbox.org/manual/ch06.html#network_hostonly

E.g., the file /etc/vbox/networks.conf does not exist.

How do I make XNAT work please?

OK environment: macOS 11.6 (20G165)

Thanks
Arthur

Terminal log:
[gitOnMyLaptopLocal/sc_repos]$ git clone --branch master https://bitbucket.org/xnatdev/xnat-vagrant.git && cd xnat-vagrant && ./run xnat setup
Cloning into 'xnat-vagrant'...
remote: Enumerating objects: 2022, done.
remote: Counting objects: 100% (2022/2022), done.
remote: Compressing objects: 100% (1718/1718), done.
remote: Total 2022 (delta 1445), reused 427 (delta 277), pack-reused 0
Receiving objects: 100% (2022/2022), 7.66 MiB | 3.11 MiB/s, done.
Resolving deltas: 100% (1445/1445), done.

XNAT Vagrant...

Using VirtualBox 6.1.30r148432
Using Vagrant 2.2.19

Currently running VirtualBox VMs:
------------------------------------------------------------

------------------------------------------------------------


Starting XNAT build using 'configs/xnat-release' config...

grep: local.yaml: No such file or directory

Downloading from configured URL: https://api.bitbucket.org/2.0/repositories/xnatdev/xnat-web/downloads/xnat-web-1.8.3.war
Downloading: https://api.bitbucket.org/2.0/repositories/xnatdev/xnat-web/downloads/xnat-web-1.8.3.war
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100  157M  100  157M    0     0  11.6M      0  0:00:13  0:00:13 --:--:-- 13.0M
/Users/arthur_at_sinai/gitOnMyLaptopLocal/sc_repos/xnat-vagrant/configs/xnat-release

Starting XNAT build...

Provisioning VM with specified user...

[ up ]

Loading existing configuration from /Users/arthur_at_sinai/gitOnMyLaptopLocal/sc_repos/xnat-vagrant/configs/xnat-release/.work/vars.yaml...
Bringing machine 'xnat-release' up with 'virtualbox' provider...
==> xnat-release: Box 'nrgxnat/xnatstack-ubuntu2004' could not be found. Attempting to find and install...
    xnat-release: Box Provider: virtualbox
    xnat-release: Box Version: >= 0
==> xnat-release: Loading metadata for box 'nrgxnat/xnatstack-ubuntu2004'
    xnat-release: URL: https://vagrantcloud.com/nrgxnat/xnatstack-ubuntu2004
==> xnat-release: Adding box 'nrgxnat/xnatstack-ubuntu2004' (v1.0.4) for provider: virtualbox
    xnat-release: Downloading: https://vagrantcloud.com/nrgxnat/boxes/xnatstack-ubuntu2004/versions/1.0.4/providers/virtualbox.box
    xnat-release: Calculating and comparing box checksum...
==> xnat-release: Successfully added box 'nrgxnat/xnatstack-ubuntu2004' (v1.0.4) for 'virtualbox'!
==> xnat-release: Importing base box 'nrgxnat/xnatstack-ubuntu2004'...
==> xnat-release: Matching MAC address for NAT networking...
==> xnat-release: Checking if box 'nrgxnat/xnatstack-ubuntu2004' version '1.0.4' is up to date...
==> xnat-release: Setting the name of the VM: xnat-release
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
==> xnat-release: Clearing any previously set network interfaces...
The IP address configured for the host-only network is not within the
allowed ranges. Please update the address used to be within the allowed
ranges and run the command again.

  Address: 10.1.1.17
  Ranges: 192.168.56.0/21

Valid ranges can be modified in the /etc/vbox/networks.conf file. For
more information including valid format see:

  https://www.virtualbox.org/manual/ch06.html#network_hostonly

Reloading VM to configure folder sharing...

[ reload ]

Loading existing configuration from /Users/arthur_at_sinai/gitOnMyLaptopLocal/sc_repos/xnat-vagrant/configs/xnat-release/.work/vars.yaml...
==> xnat-release: Checking if box 'nrgxnat/xnatstack-ubuntu2004' version '1.0.4' is up to date...
==> xnat-release: Clearing any previously set network interfaces...
The IP address configured for the host-only network is not within the
allowed ranges. Please update the address used to be within the allowed
ranges and run the command again.

  Address: 10.1.1.17
  Ranges: 192.168.56.0/21

Valid ranges can be modified in the /etc/vbox/networks.conf file. For
more information including valid format see:

  https://www.virtualbox.org/manual/ch06.html#network_hostonly

Running build provision to build and deploy XNAT on the VM...

[ provision --provision-with build ]

Loading existing configuration from /Users/arthur_at_sinai/gitOnMyLaptopLocal/sc_repos/xnat-vagrant/configs/xnat-release/.work/vars.yaml...
==> xnat-release: VM is not currently running. Please, first bring it up with `vagrant up` then run this command.
./.vagrant/machines/xnat-release/virtualbox/index_uuid -> ./.work/index_uuid

Provisioning completed.
[sc_repos/xnat-vagrant]$ vagrant up
A Vagrant environment or target machine is required to run this
command. Run `vagrant init` to create a new Vagrant environment. Or,
get an ID of a target machine from `vagrant global-status` to run
this command on. A final option is to change to a directory with a
Vagrantfile and to try again.
[sc_repos/xnat-vagrant]$ git clone --branch master https://bitbucket.org/xnatdev/xnat-vagrant.git && cd xnat-vagrant && ./run xnat setup
[sc_repos/xnat-vagrant]$ ./run xnat setup

XNAT Vagrant...

Using VirtualBox 6.1.30r148432
Using Vagrant 2.2.19

Currently running VirtualBox VMs:
------------------------------------------------------------

------------------------------------------------------------


The 'xnat-release' VM is running...


Starting XNAT build using 'configs/xnat-release' config...

The folder .work, which is used to store variables and configurations for use in building and managing your VM,
already exists. Do you want to delete this folder and build your VM strictly from the values in your configuration
files or re-use the cached configuration information?

Press Y to delete the cache folder, N to keep it, or X to cancel )
Deleting the folder .work...
VM already created...

Herrick, Rick

unread,
Jan 5, 2022, 7:25:54 PM1/5/22
to xnat_di...@googlegroups.com

I’ll start with the second issue first. This is due to a change in VirtualBox which I described in this earlier post. The next update of XNAT Vagrant will have the default IP addresses changed to fit within the restricted range VirtualBox now supports.

 

In the meantime, you can fix this issue at the same time as you fix your second issue. Some script is trying to search the file local.yaml but that file doesn’t exist. I’m not sure why that’s happening because the only references I find to it test for existence before trying to access it, but adding a local.yaml to the configuration you’re running should fix the problem, and adding a local.yaml file in your configuration is how you fix the IP address issue.

 

Go to the folder for the configuration you’re trying to run. For example, if you’re running xnat-release, go to configs/xnat-release.

 

Create a file named local.yaml.

 

Add the following text:

 

vm_ip: 192.168.56.101

 

Save the file.

 

Try running your VM again.

 

-- 

Rick Herrick

XNAT Architect/Developer

Computational Imaging Laboratory

Washington University School of Medicine

 

 

From: xnat_di...@googlegroups.com <xnat_di...@googlegroups.com> on behalf of Arthur Goldberg <artgo...@gmail.com>
Date: Wednesday, January 5, 2022 at 6:12 PM
To: xnat_discussion <xnat_di...@googlegroups.com>
Subject: [XNAT Discussion] Running XNAT in a Vagrant Virtual Machine

* External Email - Caution *

Hello

 

I'm new to XNAT. Following Running XNAT in a Vagrant Virtual Machine, I tried the quick approach, using Vagrant. I installed VirtualBox & Vagrant. VirtualBox runs and shows XNAT:

--
You received this message because you are subscribed to the Google Groups "xnat_discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to xnat_discussi...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/xnat_discussion/bd095c55-21ec-4539-b8fe-4705c4850382n%40googlegroups.com.

 


The materials in this message are private and may contain Protected Healthcare Information or other information of a sensitive nature. If you are not the intended recipient, be advised that any unauthorized use, disclosure, copying or the taking of any action in reliance on the contents of this information is strictly prohibited. If you have received this email in error, please immediately notify the sender via telephone or return mail.

Reply all
Reply to author
Forward
0 new messages