Download Vagrant Box

0 views
Skip to first unread message

Gaby Zenz

unread,
Aug 5, 2024, 10:04:10 AM8/5/24
to scapitnolow
withthe goal of sharing everything in the PlayApps directory (multiple projects) with the VM. When I launch the VM and ssh in I see the directory /Shared and I can cd into it, but when I try to list the contents with ls -al I'm getting the following error:

Ran additional scenarios which confirm that renaming a vagrant project's parent directory while the VM is suspended causes this permissions problem; however, if you completely shut down the VM with vagrant halt your are free to rename.


First attempted fix was running vagrant suspend, renaming the parent directory back to its original value, then running vagrant up. Unfortunately that trashed the entire vagrant VM and it's stuck in vagrant pergatory - won't fully boot or shutdown.


So, the correct fix is to exit all vagrant ssh shells, run vagrant halt (not suspend) to make sure it's OFF (not asleep), and revert any recent renames to parent directories. Then vagrant up and see if you can get into /vagrant! After that, if you want to rename your folders just vagrant halt, rename, and vagrant up.


I've experienced the same issue several times now - though not while renaming the parent directory or moving the Vagrantfile but when just creating or renaming files at host. As this happens very infrequently for unknown reasons I was not able to reproduce this deliberately.


Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.


Hi! I've been following along with the videos and everything works fine until I get to the step where you're supposed to enter "vagrant ssh". Nothing happens. I just move to a new line in Cmder. I've searched around for an answer, but haven't seen anything that addresses this exact issue. Anyone have any ideas?


It works! After all these months, I came back to the Rails Development Track and started working in my normal Command Prompt window without thinking. That's the only thing that I changed and I've been able to follow along with the videos. Still not sure why it didn't work when I was using Cmder, but maybe anyone else having this issue can try just using the Command Prompt instead.


Aisha, do you get any response from Vagrant? Can you type "vagrant -v"? I'm not sure how it works in Windows exactly but in the Vagrant Documentation it says "If it is not found, please try logging out and logging back in to your system (this is particularly necessary sometimes for Windows)."


It's definitely installed. (I get Vagrant 1.3.5 and everything before that step seems to work.) I've shut down the VM and started it up again, closed and reopened the cmder window, restarted my computer... still nothing.


Edit: No, I didn't run vagrant init because it wasn't listed in the video. My understanding is that I shouldn't need to run that command since Treehouse provides you with a pre-made vagrantfile. Should I be setting up my own virtual machine?


Sorry about the size! I matched everything up, though. I cut lines in half so I wouldn't omit any by accident. Unless there are two identical lines somewhere, that's everything. Under that "Invoking SSH" line is just the prompt.


The only port opened up on Vagrant is 8080 meaning no SSL The problem is that while Sugar works fine on port 80 it requests all its fonts and graphics on HTTPS.





This is a normal Sugar Call, note it goes to HTTP as it should





While this is a font call attempting to be called on HTTPS



I cant find a reason why it would be on HTTPS, my config.php is fine. Nothing in the .htaccess file would do it.



So I thought I would just enable SSL. Pretty easy, done it a thousand times. I create the certificate and create the virtual host and nothing. Can not connect. I have a feeling this is a vagrant thing but I cant find anything that matches.


# BEGIN SUGARCRM RESTRICTIONS# Fix mimetype for logo.svg (SP-1395)AddType image/svg+xml .svgAddType application/json .jsonAddType application/javascript .js Options +FollowSymLinks RewriteEngine On RewriteBase /sugar/sugarent1000ex.loc/ RewriteRule (?i)\.git - [F] RewriteRule (?i)\.log$ - [F] RewriteRule (?i)^bin/ - [F] RewriteRule (?i)^cache/diagnostic/ - [F] RewriteRule (?i)^composer\.(jsonlock)$ - [F]...


Based on this selected correct answer below, I've added this bash script "$HOME/bin/stop-vagrant.sh". So now I have something that can safely begin a stop of all vagrant VMs that I might have turned on yet forgotten about in a session.


The other answer is great for handling Virtualbox, but Vagrant features its own mechanisms for handling Virtual Machines, and as was mentioned in one of the comments, it supports more than just VirtualBox, just VMWare at the moment, but who knows later!


I'm trying to use the inline script feature in the Vagrantfile to automate installation of a few things in my default box, you can view the Vagrantfile here. Otherwise the Vagrantfile settings are unchanged from the defaults.


Things I've tried:

-> Exiting the vm, running "vagrant halt", and spinning it back up again, in hopes of fixing any $PATH issues automatically. No change in behavior.

-> Mucking around with changing users in the Vagrantfile, specifically adding a "sudo su" command before downloading the Rust install script with the curl command. No change in behavior. Not shown in the example Vagrantfile.


Be aware that PATH issues may require manual fixing anyways. rustup does attempt to take care of this for you, but IIRC the file it modifies is only read on login shells, and IMO it doesn't really have any business touching that file to begin with. The binaries you need will be in $HOME/.cargo/bin.


The SSH command responded with a non-zero exit status. Vagrant

assumes that this means the command failed. The output for this command

should be in the log above. Please read the output to determine what

went wrong.


The EOF must be the first, and only, thing on the line in the bash script. Even trailing whitespace is forbidden. Your case is made slightly more complicated by the fact that you're doing this from inside a ruby heredoc.


Some of the vagrant birds found in Michigan that were discussed in the December 2021 Birds and Coffee Chat are the Roseate spoonbill (Spanish name: Esptula rosada), Little blue heron (Spanish name: Garceta azul), Cattle egret (Spanish name: Garcilla bueyera), Ash throated flycatcher (Spanish name: Copetn cenizo), and Royal tern (Spanish name: Charrn real americano). I invite you to check out eBird and explore common Michigan birds as well as vagrants. My personal favorite is the Roseate spoonbill, other than looking like a beautiful dinosaur, they have vibrant red and pink feathers, kind of like a flamingo. And like flamingos, they get their color from little organisms they eat found in shallow waters that contain carotenoids, a pigment also present in food humans eat like carrots and pumpkins.


It is amazing to think that a bird that lives mostly in Latin America and Southeastern US, and such an important species for pre-Columbian cultures has been seen in Michigan. For the Aztecs, the feathers from spoonbills were used to decorate objects, headdresses and shields like the one in the Museum of Ethnology in Vienna.


But what is so exciting about vagrant birds? Well, for me, the excitement can feel like seeing a brown bear in Michigan. It is always fun to see new species! Have you ever seen a vagrant bird? Would you like to learn more? Consider being part of the online Out of Bounds Birds: Migration and Vagrancy program that starts on January 25th. Please share with us and visit the Kellogg Bird Sanctuary! Who knows what the next vagrant bird will be!


Over the next year, Vagrant 2.3 and 2.4 will not break compatibility promises of Vagrantfiles or plugin interfaces. Vagrant 3.0 will introduce new methods for configuration but retain tooling for continued compatibility of Vagrantfiles. This includes detection for Ruby Vagrantfiles and installation of compatibility helpers to minimize interruptions to user workflow. While we don't yet have specific timeframes, we will announce our plans for these new versions of Vagrant as they solidify over the next few months.


The new architecture will allow you to run Vagrant on a remote host and secure actions on the machine. You will be able to install Vagrant on a resource-intensive machine and interact with it on a thin client, which will allow sharing of one Vagrant environment among multiple team members.


Vagrant runs as a user process that requires acceptance from a user to run privileged actions. You can work around request and acceptance on POSIX platforms using a sudoers file to define each Vagrant command with escalated privileges. Unfortunately, you need to update this file any time you change the privileged Vagrant commands. On Windows systems, you cannot use a sudoers file. Instead, you must confirm a User Account Control (UAC) prompt, which makes it difficult to run Vagrant in a headless context. Vagrant 3.0 will enable a privileged service to execute known and trusted commands from Vagrant and its plugins without the need for direct user interaction.


In addition to finer control of trusted commands, you will be able to use controls to prevent automatic evaluation of Ruby-based Vagrantfiles. You will also be able to write configuration in HashiCorp Configuration Language (HCL) to limit the potential for mistakes or risk arising from dynamic configuration. This prevents arbitrary code execution inline in Vagrantfiles.


Currently, you can reference only your own local configuration of Vagrant. Different users on the same system do not have access to the same configuration. A new, server-based approach will allow for management of a global Vagrant configuration, which you can also store in a database. This will fix long-running issues where provider-specific information results in lost configuration settings. Lost settings can result in unexpected and unintended system modifications.

3a8082e126
Reply all
Reply to author
Forward
0 new messages