Giter Site home page Giter Site logo

Comments (2)

zhenik avatar zhenik commented on July 4, 2024 1

How to resolve

Do not use sudo. Follow documentation

Potential problems and how to deal with them

Problem 1 - User cannot stop running VM

Step 1 Stop running VMs

Stop all running VMs which were run with sudo.

Option 1 (if vagrant cli does not work, go to option2)

  1. sudo vagrant global-status (check list)
  2. sudo vagrant destroy -f <vm_id> (stop and destroy vm)

Option 2 (using vboxmanage cli)

You might need use sudo, due that previously started VMs are running under root user

  1. vboxmanage list vms (check list)
  2. sudo vboxmanage startvm <vm_id> --type emergencystop (force stop)
  3. sudo vboxmanage unregistervm --delete <vm_id> (remove vm)
  4. sudo vboxmanage list vms (check list)

Step 2 Clean cache

  1. vagrant global-status --prune (clean cache)
  2. vagrant global-status (check list. No running VMs is aim)

Problem 2 - Incorrect box ownership

Previously downloaded box lies under root ownership.

  1. ll -la /home/<your-user>/.vagrant.d/boxes/fredrikhgrelland-VAGRANTSLASH-hashistack/0.6.1/virtualbox/ (example)
    Log example
zhenik@u1804i-0286:~$ ll -la /home/zhenik/.vagrant.d/boxes/fredrikhgrelland-VAGRANTSLASH-hashistack/0.6.1/virtualbox/
total 1128708
drwxr-xr-x 3 root root       4096 okt.  26 11:14 ./
drwxr-xr-x 3 root root       4096 okt.  26 11:13 ../
-rw-r--r-- 1 root root 1155758080 okt.  26 11:13 box-disk001.vmdk
-rwx------ 1 root root       6841 okt.  26 11:13 box.ovf*
-rw-r--r-- 1 root root          0 okt.  26 12:21 box_update_check
drwxr-xr-x 2 root root       4096 okt.  26 11:13 include/
-rw-r--r-- 1 root root         36 okt.  26 11:14 master_id
-rw-r--r-- 1 root root         25 okt.  26 11:13 metadata.json
-rw-r--r-- 1 root root        505 okt.  26 11:13 Vagrantfile

Option 1 (change ownership)

  1. Change recursively ownership to dirs and files /home/<your-user>/.vagrant.d/boxes/
    sudo chown -R <user> <directory> (change user ownership)
    sudo chgrp -R <group> <directory> (change group ownership)

Option 2 (delete boxes and download again without sudo)

Remove all boxes via vagrant cli

  1. vagrant box list (box list)
  2. sudo vagrant box remove fredrikhgrelland/hashistack --box-version 0.6.1 (eksempel)
  3. make up (download box with correct ownership)

from terraform-nomad-trino.

zhenik avatar zhenik commented on July 4, 2024

The problem was that users run some make commands with sudo.

from terraform-nomad-trino.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.