Closed y1y123 closed 4 years ago
Is Nexus a linux distro? If you install sshfs then any distro should work assuming that /usr/bin/sshfs
exists. What error message are you seeing?
@y1y123 - When you say nexus do you mean google nexus tablet or nexus repository manager?
Is Nexus a linux distro? If you install sshfs then any distro should work assuming that
/usr/bin/sshfs
exists. What error message are you seeing?
Thanks, appreciate your response. Yes, Nexus (Cisco data center switches) is a Linux distro but it identifies itself as nexus, it has ID=nexus in /etc/os-release file. For my testing, I changed ID=linux in os-release file and it worked fine but I can't commit this change in official release for customers.
@y1y123 - When you say nexus do you mean google nexus tablet or nexus repository manager?
Nope, I was referring to nexus is Cisco Data Center switch operating system. It is essentially linux only but customised by Cisco.
@y1y123 - When you say nexus do you mean google nexus tablet or nexus repository manager?
Nope, I was referring to nexus is Cisco Data Center switch operating system. It is essentially linux only but customised by Cisco.
Ok, well I appreciate your response, I still cannot understand how this correlates to the vagrant-sshfs plugin. Given my experience with Cisco I cannot imagine them providing such a virtual environment without additional licensing costs and fees and I'm not sure why they would unless you are attending some sort of training course. But then again, I don't understand your use case(s). Perhaps you could share more details about your environment and use cases of how this relates to Vagrant.
vagrant-sshfs
do you have installed?I think @y1y123 is asking for vagrant-sshfs to identify Nexus as linux and just use that. Unfortunately our hands are tied here as the code that detects these things is in Vagrant upstream. @y1y123 I think you'd need to add a guest type upstream and then we could add support for it to vagrant-sshfs. Here is where I would start: https://github.com/hashicorp/vagrant/tree/master/plugins/guests
Thanks for your response and pointer. I will add a new guest type for nexus in upstream and then try sshfs.
On Wednesday, 8 July, 2020, 01:40:48 am IST, Dusty Mabe <notifications@github.com> wrote:
I think @y1y123 is asking for vagrant-sshfs to identify Nexus as linux and just use that. Unfortunately our hands are tied here as the code that detects these things is in Vagrant upstream. @y1y123 I think you'd need to add a guest type upstream and then we could add support for it to vagrant-sshfs. Here is where I would start: https://github.com/hashicorp/vagrant/tree/master/plugins/guests
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.
@y1y123 - I'm still not convinced that you are actually using Vagrant. Is there any chance you can show us your Vagrantfile and at minumum please provide the information I requested? I hope I'm not being to harsh, I'm just trying to help as best as I can and I'm not always the best communicator.
@y1y123 - When you say nexus do you mean google nexus tablet or nexus repository manager?
Nope, I was referring to nexus is Cisco Data Center switch operating system. It is essentially linux only but customised by Cisco.
Ok, well I appreciate your response, I still cannot understand how this correlates to the vagrant-sshfs plugin. Given my experience with Cisco I cannot imagine them providing such a virtual environment without additional licensing costs and fees and I'm not sure why they would unless you are attending some sort of training course. But then again, I don't understand your use case(s). Perhaps you could share more details about your environment and use cases of how this relates to Vagrant.
- What does your Vagrantfile look like?
- What host OS are you using Windows, Linux, Unix or MacOs?
- What version of
vagrant-sshfs
do you have installed?- Please provide a copy and or documentation that shows the license for Nexus. I don't want to get into the middle of a legal battle for telling you to make changes to a proprietary piece of hardware/software.
- Please provide any extra details and or screen shots of how you are using the plugin and what your expected behavior to be is including any error messages that you get while using this plugin is extremely helpful for us.
As pointed out by Dusty Maybe, I need to add guest detection and capability plugin for nexus but just to answer your questions, my Vagrantfile is quite simple and this is how it looks like.
config.vm.box_url = "sshfs_nexus9300v.9.4.1.IJB9.0.159.box" config.ssh.insert_key = false config.vm.synced_folder "/Users/y1y123/N9Kv", "test", type: "sshfs
My host is MAC OS Catalina 10.15.5 Vagrant 2.2.7 The vagrant box for CIsco Nexus can be downloaded from this link. I believe, there are no restrictions for downloading the box. https://software.cisco.com/download/home/286312239/type/282088129/release/9.3(4)
Hi @y1y123,
Thank you so much for the detailed info, that helps a lot.
Please upgrade to Vagrant 2.2.9
Vagrant has it has been a mess since >= 2.2.5 and < 2.2.9. I was finally able to help fix the final problem in 2.2.9.
Otherwise, I'll try and download the box file you provided and see if I cannot setup a test environment. Thanks again for providing this info.
Indeed the error is caused from Vagrant not able to detect Nexus as a proper linux guest. You'll need to work with Vagrant to add the new guest capability. I originally thought I could get this working in my test environment but all my attempts failed and I couldn't ever log into the nexus VM. I'm just not that motivated to try and troubleshoot why it doesn't work. I apologize.
I downloaded the Vagrantbox that you provided and tried it out but I can never actually get Vagrant to login.
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Importing base box 'nexus/9'...
==> default: Matching MAC address for NAT networking...
==> default: Setting the name of the VM: nexus_default_1594743437958_91171
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
default: Adapter 1: nat
==> default: Forwarding ports...
default: 22 (guest) => 2222 (host) (adapter 1)
==> default: Booting VM...
==> default: Waiting for machine to boot. This may take a few minutes...
default: SSH address: 127.0.0.1:2222
default: SSH username: vagrant
default: SSH auth method: private key
I also tried to access the console via the VirtualBox GUI and the VM appears to be booted but I cannot get to a login prompt. Ugh, and I cannot find any supporting documentation for this. I'm not sure I want to invest anymore time trying to get this working in my test environment.
Thanks Codylane, appreciate your continued support. I downloaded same box and it came up just fine (pls. see logs below) but I would request you to not spend more time on this. This is not an sshfs plugin issue. I was facing issue primarily because Nexus default shell is not bash (but it can be changed with config.ssh.shell = "run bash") and also because it is not seen as a valid linux distro by Vagrant. Writing a nexus plugin will help in override these but I am not pursuing sshfs based mount for now. Thanks to you and DustyMay again for looking into it.
y1y123@M official % vagrant init nexus9300v.9.3.4.box
A Vagrantfile
has been placed in this directory. You are now
ready to vagrant up
your first virtual environment! Please read
the comments in the Vagrantfile as well as documentation on
vagrantup.com
for more information on using Vagrant.
y1y123@M official % vagrant up Bringing machine 'default' up with 'virtualbox' provider... ==> default: Box 'nexus9300v.9.3.4.box' could not be found. Attempting to find and install... default: Box Provider: virtualbox default: Box Version: >= 0 ==> default: Box file was not detected as metadata. Adding it directly... ==> default: Adding box 'nexus9300v.9.3.4.box' (v0) for provider: virtualbox default: Unpacking necessary files from: file:///Users/y1y123/vagrant/official/nexus9300v.9.3.4.box ==> default: Successfully added box 'nexus9300v.9.3.4.box' (v0) for 'virtualbox'! ==> default: Importing base box 'nexus9300v.9.3.4.box'... ==> default: Matching MAC address for NAT networking... ==> default: Setting the name of the VM: official_default_1594746486205_45856 ==> default: Clearing any previously set network interfaces... ==> default: Preparing network interfaces based on configuration... default: Adapter 1: nat ==> default: Forwarding ports... default: 22 (guest) => 2222 (host) (adapter 1) ==> default: Booting VM... ==> default: Waiting for machine to boot. This may take a few minutes... default: SSH address: 127.0.0.1:2222 default: SSH username: vagrant default: SSH auth method: private key The configured shell (config.ssh.shell) is invalid and unable to properly execute commands. The most common cause for this is using a shell that is unavailable on the system. Please verify you're using the full path to the shell and that the shell is executable by the SSH user. y1y123@M official % vagrant ssh
Cisco NX-OS Software Copyright (c) 2002-2020, Cisco Systems, Inc. All rights reserved. Nexus 9000v software ("Nexus 9000v Software") and related documentation, files or other reference materials ("Documentation") are the proprietary property and confidential information of Cisco Systems, Inc. ("Cisco") and are protected, without limitation, pursuant to United States and International copyright and trademark laws in the applicable jurisdiction which provide civil and criminal penalties for copying or distribution without Cisco's authorization.
Any use or disclosure, in whole or in part, of the Nexus 9000v Software or Documentation to any third party for any purposes is expressly prohibited except as otherwise authorized by Cisco in writing. The copyrights to certain works contained herein are owned by other third parties and are used and distributed under license. Some parts of this software may be covered under the GNU Public License or the GNU Lesser General Public License. A copy of each such license is available at http://www.gnu.org/licenses/gpl.html and http://www.gnu.org/licenses/lgpl.html
Nexus9000v#
Warning: Connection will be closed in 20 seconds
Nexus9000v#
Vagrant 2.2.7 Latest sshfs plugin is not able to trigger sshfs mount because it is not able to identify the linux distro. I would like to add nexus capability with its own sshfs_client.rb but I am not familiar with the process. I am quite new to the vagrant, sorry if I overlooked some document/guideline. Really appreciate if somebody could guide me with next steps.