dustymabe / vagrant-sshfs

SSHFS synced folder implementation for Vagrant.
GNU General Public License v2.0
224 stars 33 forks source link

Arch Linux Guest: Installing SSHFS client failed #115

Closed rEnr3n closed 4 years ago

rEnr3n commented 4 years ago

vagrant-sshfs 1.3.5 Host: Arch Linux

I'm trying to start up this box: archlinux/archlinux (libvirt, 2020.06.03)

I get the following error:

...
DEBUG ssh: stderr: error: 
DEBUG ssh: stderr: failed retrieving file 'fuse3-3.9.1-1-x86_64.pkg.tar.zst' from mirrors.lug.mtu.edu : The requested URL returned error: 404

DEBUG ssh: Sending SSH keep-alive...
DEBUG ssh: stderr: error: 
DEBUG ssh: stderr: failed retrieving file 'fuse3-3.9.1-1-x86_64.pkg.tar.zst' from mirrors.mit.edu : The requested URL returned error: 404

DEBUG ssh: stderr: error: 
DEBUG ssh: stderr: failed retrieving file 'fuse3-3.9.1-1-x86_64.pkg.tar.zst' from appuals.com : The requested URL returned error: 404

DEBUG ssh: stderr: warning: 
DEBUG ssh: stderr: failed to retrieve some files

DEBUG ssh: stderr: error: 
DEBUG ssh: stderr: failed to commit transaction (unexpected error)

DEBUG ssh: Exit status: 1
ERROR warden: Error occurred: The install of the sshfs client software failed. On Arch this is most likely
because the package lists are not up to date [1] and partial upgrades are not
supported [2]. Please update your Arch system or install SSHFS manually.

[1] https://wiki.archlinux.org/index.php/pacman#Packages_cannot_be_retrieved_on_installation
[2] https://wiki.archlinux.org/index.php/System_maintenance#Partial_upgrades_are_unsupported

At the time, fuse3 was v3.9.2. It was updated on 2020-06-21 01:14 UTC.

codylane commented 4 years ago

Hello @rEnr3n,

I'm having a hard trying to confirm if this is related to our vagrant-sshfs or if this is related to possibly a misconfigured repository or networking issue on your VM. Is there a chance that you can provide some more details about your Environment.

rEnr3n commented 4 years ago
  • Can you please share your entire Vagrantfile? As well as any provisioning scripts?
$ cat Vagrantfile
# -*- mode: ruby -*-
# vi: set ft=ruby :

Vagrant.configure("2") do |config|
  config.vm.box = "archlinux/archlinux"
  config.vm.synced_folder ".", "/vagrant", type: "sshfs"
  config.vm.provider "libvirt" do |libvirt|
      libvirt.cpus = "4"
  end
end
  • What host are host OS are you using? What version?

Host OS: Arch Linux (updated) (note: rolling release distro)

  • What plugins do you have installed vagrant plugin list will give you this list, please copy and paste into this thread.
$ vagrant plugin list
vagrant-libvirt (0.1.2, global)
  - Version Constraint: > 0
vagrant-sshfs (1.3.5, global)
  - Version Constraint: > 0
  • Has this worked before, if so in what version of vagrant-sshfs?

Yes. I don't know what version.

  • What version of Vagrant are you running?
$ vagrant --version  
Vagrant 2.2.9
  • What does your routes look like on your VM? sudo netstat-rn || sudo ip route list should provide this info.

VM is not created.

$ vagrant ssh               
==> default: Domain is not created. Please run `vagrant up` first.
codylane commented 4 years ago

Thanks @rEnr3n, I appreciate it. I won't lie to you but I'm not very familiar with the Arch distro so you'll need to bare with me as I need to ask some additional questions.

Thanks again for your time and I really look forward to hearing back from you and trying to help as best as I can.

codylane commented 4 years ago

Just adding some troubleshooting of my own to the thread. I've tried the latest versions of archlinux/archlinux from the public vagrant could in both virtualbox and libvirt and they both work given the Vagrantfile you provided and I'm unable to reproduce this error on multiple hosts within my home environment.

Here's the output

~/tmp$ vagrant up
Bringing machine 'default' up with 'libvirt' provider...
==> default: Checking if box 'archlinux/archlinux' version '2020.06.03' is up to date...
==> default: Creating image (snapshot of base box volume).
==> default: Creating domain with the following settings...
==> default:  -- Name:              tmp_default
==> default:  -- Domain type:       kvm
==> default:  -- Cpus:              4
==> default:  -- Feature:           acpi
==> default:  -- Feature:           apic
==> default:  -- Feature:           pae
==> default:  -- Memory:            512M
==> default:  -- Management MAC:    
==> default:  -- Loader:            
==> default:  -- Nvram:             
==> default:  -- Base box:          archlinux/archlinux
==> default:  -- Storage pool:      default
==> default:  -- Image:             /var/lib/libvirt/images/tmp_default.img (20G)
==> default:  -- Volume Cache:      default
==> default:  -- Kernel:            
==> default:  -- Initrd:            
==> default:  -- Graphics Type:     vnc
==> default:  -- Graphics Port:     -1
==> default:  -- Graphics IP:       127.0.0.1
==> default:  -- Graphics Password: Not defined
==> default:  -- Video Type:        cirrus
==> default:  -- Video VRAM:        9216
==> default:  -- Sound Type:    
==> default:  -- Keymap:            en-us
==> default:  -- TPM Path:          
==> default:  -- INPUT:             type=mouse, bus=ps2
==> default: Creating shared folders metadata...
==> default: Starting domain.
==> default: Waiting for domain to get an IP address...
==> default: Waiting for SSH to become available...
    default: 
    default: Vagrant insecure key detected. Vagrant will automatically replace
    default: this with a newly generated keypair for better security.
    default: 
    default: Inserting generated public key within guest...
    default: Removing insecure key from the guest if it's present...
    default: Key inserted! Disconnecting and reconnecting using new SSH key...
==> default: Installing SSHFS client...
==> default: Mounting SSHFS shared folder...
==> default: Mounting folder via SSHFS: /home/clane/tmp => /vagrant
==> default: Checking Mount..
==> default: Folder Successfully Mounted!

Vagrantfile

# -*- mode: ruby -*-
# vi: set ft=ruby :

Vagrant.configure("2") do |config|
  config.vm.box = "archlinux/archlinux"

  config.vm.synced_folder ".", "/vagrant", type: "sshfs"

  config.vm.provider "libvirt" do |libvirt|
    libvirt.cpus = "4"
  end
end

vagrant plugin list

vagrant-libvirt (0.1.2, global)
vagrant-sshfs (1.3.5, global)

cat /etc/os-release

NAME="Ubuntu"
VERSION="18.04.4 LTS (Bionic Beaver)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 18.04.4 LTS"
VERSION_ID="18.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=bionic
UBUNTU_CODENAME=bionic

vagrant --version

Vagrant 2.2.9

qemu-system-x86_64 --version

QEMU emulator version 2.11.1(Debian 1:2.11+dfsg-1ubuntu7.28)
Copyright (c) 2003-2017 Fabrice Bellard and the QEMU Project developers

virsh -v

Virsh command line tool of libvirt 4.0.0
See web site at https://libvirt.org/

Compiled with support for:
 Hypervisors: QEMU/KVM LXC UML Xen LibXL OpenVZ VMware VirtualBox ESX Test
 Networking: Remote Network Bridging Interface netcf Nwfilter VirtualPort
 Storage: Dir Disk Filesystem SCSI Multipath iSCSI LVM RBD Sheepdog Gluster ZFS
 Miscellaneous: Daemon Nodedev AppArmor Secrets Debug DTrace Readline

virsh net-dumpxml default

<network>
  <name>default</name>
  <uuid>335a95d0-bb0c-46f8-a386-244c89cd86c9</uuid>
  <forward mode='nat'>
    <nat>
      <port start='1024' end='65535'/>
    </nat>
  </forward>
  <bridge name='virbr0' stp='off' delay='0'/>
  <mac address='52:54:00:17:0f:4f'/>
  <ip address='192.168.122.1' netmask='255.255.255.0'>
    <dhcp>
      <range start='192.168.122.2' end='192.168.122.254'/>
    </dhcp>
  </ip>
</network>
rEnr3n commented 4 years ago
  • What box version are you using or are you rolling your own Arch box? I suspect you are using the latest version here?

Yes. I'm using the official box (the link you provided).

I'm also curious if you can provide some examples to show that networking and your package manager are indeed working and that:

  1. You can actually resolve a internet based host nsookup www.google.com or host www.google.com or dig www.google.com
$ dig www.google.com

; <<>> DiG 9.16.4 <<>> www.google.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 26772
;; flags: qr rd ra; QUERY: 1, ANSWER: 6, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
;; QUESTION SECTION:
;www.google.com.            IN  A

;; ANSWER SECTION:
www.google.com.     138 IN  A   172.217.194.99
www.google.com.     138 IN  A   172.217.194.103
www.google.com.     138 IN  A   172.217.194.104
www.google.com.     138 IN  A   172.217.194.105
www.google.com.     138 IN  A   172.217.194.106
www.google.com.     138 IN  A   172.217.194.147

;; Query time: 773 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: Wed Jul 15 11:44:08 PST 2020
;; MSG SIZE  rcvd: 223
  1. You can download a page from the internet curl -Lvk https://www.google.com
$ curl -Lvk https://www.google.com
*   Trying 172.217.194.99:443...
* Connected to www.google.com (172.217.194.99) port 443 (#0)
* ALPN, offering h2
* ALPN, offering http/1.1
* successfully set certificate verify locations:
*   CAfile: /etc/ssl/certs/ca-certificates.crt
  CApath: none
* TLSv1.3 (OUT), TLS handshake, Client hello (1):
* TLSv1.3 (IN), TLS handshake, Server hello (2):
* TLSv1.3 (IN), TLS handshake, Encrypted Extensions (8):
* TLSv1.3 (IN), TLS handshake, Certificate (11):
* TLSv1.3 (IN), TLS handshake, CERT verify (15):
* TLSv1.3 (IN), TLS handshake, Finished (20):
* TLSv1.3 (OUT), TLS change cipher, Change cipher spec (1):
* TLSv1.3 (OUT), TLS handshake, Finished (20):
* SSL connection using TLSv1.3 / TLS_AES_256_GCM_SHA384
* ALPN, server accepted to use h2
* Server certificate:
*  subject: C=US; ST=California; L=Mountain View; O=Google LLC; CN=www.google.com
*  start date: Jun 17 14:31:22 2020 GMT
*  expire date: Sep  9 14:31:22 2020 GMT
*  issuer: C=US; O=Google Trust Services; CN=GTS CA 1O1
*  SSL certificate verify ok.
* Using HTTP2, server supports multi-use
* Connection state changed (HTTP/2 confirmed)
* Copying HTTP/2 data in stream buffer to connection buffer after upgrade: len=0
* Using Stream ID: 1 (easy handle 0x557f000869f0)
> GET / HTTP/2
> Host: www.google.com
> user-agent: curl/7.71.1
> accept: */*
>
* TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):
* TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):
* old SSL session ID is stale, removing
* Connection state changed (MAX_CONCURRENT_STREAMS == 100)!
< HTTP/2 200
< date: Wed, 15 Jul 2020 03:45:16 GMT
< expires: -1
< cache-control: private, max-age=0
< content-type: text/html; charset=ISO-8859-1
< p3p: CP="This is not a P3P policy! See g.co/p3phelp for more info."
< server: gws
< x-xss-protection: 0
< x-frame-options: SAMEORIGIN
< set-cookie: 1P_JAR=2020-07-15-03; expires=Fri, 14-Aug-2020 03:45:16 GMT; path=/; domain=.google.com; Secure
< set-cookie: NID=204=F6BU6HY_UGFU79A5P7EVegVgV2x1mtjdabz9_dPGT6SVFE-81Vh9qpWsUae4xh-tc78GWRrUdFfbLHRk5Hm7TBbMO97Zr4tnjS6mrJGNpSEPYQ0HjNNXN4ByyhkkV93IwE_3mqf4Efx0fTswQ9KwtuIzMHNjLO_Bf9PEJUKnuTY; expires=Thu, 14-Jan-2021 03:45:16 GMT; path=/; domain=.google.com; HttpOnly
< alt-svc: h3-29=":443"; ma=2592000,h3-27=":443"; ma=2592000,h3-25=":443"; ma=2592000,h3-T050=":443"; ma=2592000,h3-Q050=":443"; ma=2592000,h3-Q046=":443"; ma=2592000,h3-Q043=":443"; ma=2592000,quic=":443"; ma=2592000; v="46,43"
< accept-ranges: none
< vary: Accept-Encoding
<
<!doctype html><html itemscope="" itemtype="http://schema.org/WebPage" lang="en-PH"><head><meta content="text/html; charset=UTF-8" http-equiv="Content-Type"><meta content="/images/branding/googleg/1x/googleg_standard_color_128dp.png" itemprop="image"><title>Google</title><script nonce="hEKTcJi4WRTFoos337dmBQ==">(function(){window.google={kEI:'zHsOX-vXCKrbz7sP4qWh6A8',kEXPI:'0,202123,3,4,32,1151585,5662,730,224,5105,206,3204,10,1226,364,1499,817,383,246,5,1354,648,193,487,5,309,52,2184,233,186,96,21,3,369,211,471,39,3,48,193,188,86,101,5,350,23,7,1121255,1197756,329511,1294,12383,4855,32692,15247,867,17444,11240,9188,8384,4859,1361,9291,3024,2820,1923,6,11027,1808,4020,978,7931,5297,2054,918,875,1217,9405,11306,1418,1804,4516,1397,1381,919,2277,8,2796,889,705,1278,2212,531,148,1103,840,517,1522,158,4100,312,1134,2,3,2063,606,1839,184,545,1232,143,377,1947,2229,93,328,1284,16,2927,2246,474,1339,1787,2273,1,953,1990,857,5,4774,1294,6286,4454,642,2449,2459,1226,1743,3653,1275,108,1456,1951,908,2,941,2614,2397,1027,6443,229,10,601,1337,1098,3,346,230,970,865,372,3546,707,149,188,3312,503,1,1985,158,1,2093,3989,1093,81,570,4,499,1029,17,264,2,1011,1010,1228,8,1145,327,78,1839,24,174,69,1276,573,331,61,443,43,294,917,10,42,214,761,441,1425,459,118,757,467,213,1770,2297,292,1972,87,3,152,458,883,1787,1426,69,93,2522,1305,1220,5,281,939,2,2,844,652,4,1968,2,26,150,67,33,594,51,2,2,82,199,172,1370,911,299,95,178,330,198,41,4,867,278,5,281,524,39,126,97,21,313,30,177,284,28,419,162,231,265,266,923,1122,115,820,321,543,65,2,499,415,444,81,185,592,543,3,5789809,3376,131,5997457,5,2800947,549,333,444,1,2,80,1,900,896,1,9,2,2551,1,748,141,59,736,563,1,4265,1,1,1,1,137,1,879,9,305,2874,147,37,2,7,8,53,8,8,18,137,4,9,6,23961086,2641849',kBL:'aeZo'};google.sn='webhp';google.kHL='en-PH';})();(function(){google.lc=[];google.li=0;google.getEI=function(a){for(var c;a&&(!a.getAttribute||!(c=a.getAttribute("eid")));)a=a.parentNode;return c||google.kEI};google.getLEI=function(a){for(var c=null;a&&(!a.getAttribute||!(c=a.getAttribute("leid")));)a=a.parentNode;return c};google.ml=function(){return null};google.time=function(){return Date.now()};google.log=function(a,c,b,d,g){if(b=google.logUrl(a,c,b,d,g)){a=new Image;var e=google.lc,f=google.li;e[f]=a;a.onerror=a.onload=a.onabort=function(){delete e[f]};google.vel&&google.vel.lu&&google.vel.lu(b);a.src=b;google.li=f+1}};google.logUrl=function(a,c,b,d,g){var e="",f=google.ls||"";b||-1!=c.search("&ei=")||(e="&ei="+google.getEI(d),-1==c.search("&lei=")&&(d=google.getLEI(d))&&(e+="&lei="+d));d="";!b&&google.cshid&&-1==c.search("&cshid=")&&"slh"!=a&&(d="&cshid="+google.cshid);b=b||"/"+(g||"gen_204")+"?atyp=i&ct="+a+"&cad="+c+e+f+"&zx="+google.time()+d;/^http:/i.test(b)&&"https:"==window.location.protocol&&(google.ml(Error("a"),!1,{src:b,glmm:1}),b="");return b};}).call(this);(function(){google.y={};google.x=function(a,b){if(a)var c=a.id;else{do c=Math.random();while(google.y[c])}google.y[c]=[a,b];return!1};google.lm=[];google.plm=function(a){google.lm.push.apply(google.lm,a)};google.lq=[];google.load=function(a,b,c){google.lq.push([[a],b,c])};google.loadAll=function(a,b){google.lq.push([a,b])};}).call(this);google.f={};(function(){
document.documentElement.addEventListener("submit",function(b){var a;if(a=b.target){var c=a.getAttribute("data-submitfalse");a="1"==c||"q"==c&&!a.elements.q.value?!0:!1}else a=!1;a&&(b.preventDefault(),b.stopPropagation())},!0);document.documentElement.addEventListener("click",function(b){var a;a:{for(a=b.target;a&&a!=document.documentElement;a=a.parentElement)if("A"==a.tagName){a="1"==a.getAttribute("data-nohref");break a}a=!1}a&&b.preventDefault()},!0);}).call(this);
var a=window.location,b=a.href.indexOf("#");if(0<=b){var c=a.href.substring(b+1);/(^|&)q=/.test(c)&&-1==c.indexOf("#")&&a.replace("/search?"+c.replace(/(^|&)fp=[^&]*/g,"")+"&cad=h")};</script><style>#gbar,#guser{font-size:13px;padding-top:1px !important;}#gbar{height:22px}#guser{padding-bottom:7px !important;text-align:right}.gbh,.gbd{border-top:1px solid #c9d7f1;font-size:1px}.gbh{height:0;position:absolute;top:24px;width:100%}@media all{.gb1{height:22px;margin-right:.5em;vertical-align:top}#gbar{float:left}}a.gb1,a.gb4{text-decoration:underline !important}a.gb1,a.gb4{color:#00c !important}.gbi .gb4{color:#dd8e27 !important}.gbf .gb4{color:#900 !important}
</style><style>body,td,a,p,.h{font-family:arial,sans-serif}body{margin:0;overflow-y:scroll}#gog{padding:3px 8px 0}td{line-height:.8em}.gac_m td{line-height:17px}form{margin-bottom:20px}.h{color:#36c}.q{color:#00c}.ts td{padding:0}.ts{border-collapse:collapse}em{font-weight:bold;font-style:normal}.lst{height:25px;width:496px}.gsfi,.lst{font:18px arial,sans-serif}.gsfs{font:17px arial,sans-serif}.ds{display:inline-box;display:inline-block;margin:3px 0 4px;margin-left:4px}input{font-family:inherit}body{background:#fff;color:#000}a{color:#11c;text-decoration:none}a:hover,a:active{text-decoration:underline}.fl a{color:#36c}a:visited{color:#551a8b}.sblc{padding-top:5px}.sblc a{display:block;margin:2px 0;margin-left:13px;font-size:11px}.lsbb{background:#eee;border:solid 1px;border-color:#ccc #999 #999 #ccc;height:30px}.lsbb{display:block}#fll a{display:inline-block;margin:0 12px}.lsb{background:url(/images/nav_logo229.png) 0 -261px repeat-x;border:none;color:#000;cursor:pointer;height:30px;margin:0;outline:0;font:15px arial,sans-serif;vertical-align:top}.lsb:active{background:#ccc}.lst:focus{outline:none}</style><script nonce="hEKTcJi4WRTFoos337dmBQ=="></script></head><body bgcolor="#fff"><script nonce="hEKTcJi4WRTFoos337dmBQ==">(function(){var src='/images/nav_logo229.png';var iesg=false;document.body.onload = function(){window.n && window.n();if (document.images){new Image().src=src;}
if (!iesg){document.f&&document.f.q.focus();document.gbqf&&document.gbqf.q.focus();}
}
})();</script><div id="mngb"><div id=gbar><nobr><b class=gb1>Search</b> <a class=gb1 href="https://www.google.com.ph/imghp?hl=en&tab=wi">Images</a> <a class=gb1 href="https://maps.google.com.ph/maps?hl=en&tab=wl">Maps</a> <a class=gb1 href="https://play.google.com/?hl=en&tab=w8">Play</a> <a class=gb1 href="https://www.youtube.com/?gl=PH&tab=w1">YouTube</a> <a class=gb1 href="https://news.google.com.ph/nwshp?hl=en&tab=wn">News</a> <a class=gb1 href="https://mail.google.com/mail/?tab=wm">Gmail</a> <a class=gb1 href="https://drive.google.com/?tab=wo">Drive</a> <a class=gb1 style="text-decoration:none" href="https://www.google.com.ph/intl/en/about/products?tab=wh"><u>More</u> &raquo;</a></nobr></div><div id=guser width=100%><nobr><span id=gbn class=gbi></span><span id=gbf class=gbf></span><span id=gbe></span><a href="http://www.google.com.ph/history/optout?hl=en" class=gb4>Web History</a> | <a  href="/preferences?hl=en" class=gb4>Settings</a> | <a target=_top id=gb_70 href="https://accounts.google.com/ServiceLogin?hl=en&passive=true&continue=https://www.google.com/" class=gb4>Sign in</a></nobr></div><div class=gbh style=left:0></div><div class=gbh style=right:0></div></div><center><br clear="all" id="lgpd"><div id="lga"><img alt="Google" height="92" src="/images/branding/googlelogo/1x/googlelogo_white_background_color_272x92dp.png" style="padding:28px 0 14px" width="272" id="hplogo"><br><br></div><form action="/search" name="f"><table cellpadding="0" cellspacing="0"><tr valign="top"><td width="25%">&nbsp;</td><td align="center" nowrap=""><input name="ie" value="ISO-8859-1" type="hidden"><input value="en-PH" name="hl" type="hidden"><input name="source" type="hidden" value="hp"><input name="biw" type="hidden"><input name="bih" type="hidden"><div class="ds" style="height:32px;margin:4px 0"><input class="lst" style="margin:0;padding:5px 8px 0 6px;vertical-align:top;color:#000" autocomplete="off" value="" title="Google Search" maxlength="2048" name="q" size="57"></div><br style="line-height:0"><span class="ds"><span class="lsbb"><input class="lsb" value="Google Search" name="btnG" type="submit"></span></span><span class="ds"><span class="lsbb"><input class="lsb" id="tsuid1" value="I'm Feeling Lucky" name="btnI" type="submit"><script nonce="hEKTcJi4WRTFoos337dmBQ==">(function(){var id='tsuid1';document.getElementById(id).onclick = function(){if (this.form.q.value){this.checked = 1;if (this.form.iflsig)this.form.iflsig.disabled = false;}
else top.location='/doodles/';};})();</script><input value="AINFCbYAAAAAXw6J3M69lp45my-6yccOQDqo7ZYf5qjj" name="iflsig" type="hidden"></span></span></td><td class="fl sblc" align="left" nowrap="" width="25%"><a href="/advanced_search?hl=en-PH&amp;authuser=0">Advanced search</a></td></tr></table><input id="gbv" name="gbv" type="hidden" value="1"><script nonce="hEKTcJi4WRTFoos337dmBQ==">(function(){var a,b="1";if(document&&document.getElementById)if("undefined"!=typeof XMLHttpRequest)b="2";else if("undefined"!=typeof ActiveXObject){var c,d,e=["MSXML2.XMLHTTP.6.0","MSXML2.XMLHTTP.3.0","MSXML2.XMLHTTP","Microsoft.XMLHTTP"];for(c=0;d=e[c++];)try{new ActiveXObject(d),b="2"}catch(h){}}a=b;if("2"==a&&-1==location.search.indexOf("&gbv=2")){var f=google.gbvu,g=document.getElementById("gbv");g&&(g.value=a);f&&window.setTimeout(function(){location.href=f},0)};}).call(this);</script></form><div id="gac_scont"></div><div style="font-size:83%;min-height:3.5em"><br><div id="gws-output-pages-elements-homepage_additional_languages__als"><style>#gws-output-pages-elements-homepage_additional_languages__als{font-size:small;margin-bottom:24px}#SIvCob{display:inline-block;line-height:28px;}#SIvCob a{padding:0 3px;}.H6sW5{display:inline-block;margin:0 2px;white-space:nowrap}.z4hgWe{display:inline-block;margin:0 2px}</style><div id="SIvCob">Google offered in:  <a href="https://www.google.com/setprefs?sig=0_pfNk44c0I1srkjpJg6P3bXPYBc4%3D&amp;hl=fil&amp;source=homepage&amp;sa=X&amp;ved=0ahUKEwjr7f6DrM7qAhWq7XMBHeJSCP0Q2ZgBCAU">Filipino</a>    <a href="https://www.google.com/setprefs?sig=0_pfNk44c0I1srkjpJg6P3bXPYBc4%3D&amp;hl=ceb&amp;source=homepage&amp;sa=X&amp;ved=0ahUKEwjr7f6DrM7qAhWq7XMBHeJSCP0Q2ZgBCAY">Cebuano</a>  </div></div></div><span id="footer"><div style="font-size:10pt"><div style="margin:19px auto;text-align:center" id="fll"><a href="/intl/en/ads/">AdvertisingPrograms</a><a href="http://www.google.com.ph/intl/en/services/">Business Solutions</a><a href="/intl/en/about.html">About Google</a><a href="https://www.google.com/setprefdomain?prefdom=PH&amp;prev=https://www.google.com.ph/&amp;sig=K_W34ogWrLFXA7zcIUaofIqh1JYuY%3D">Google.com.ph</a></div></div><p style="font-size:8pt;color:#767676">&copy; 2020 - <a href="/intl/en/policies/privacy/">Privacy</a> - <a href="/intl/en/policies/terms/">Terms</a></p></span></center><script nonce="hEKTcJi4WRTFoos337dmBQ==">(function(){window.google.cdo={height:0,width:0};(function(){var a=window.innerWidth,b=window.innerHeight;if(!a||!b){var c=window.document,d="CSS1Compat"==c.compatMode?c.documentElement:c.body;a=d.clientWidth;b=d.clientHeight}a&&b&&(a!=google.cdo.width||b!=google.cdo.height)&&google.log("","","/client_204?&atyp=i&biw="+a+"&bih="+b+"&ei="+google.kEI);}).call(this);})();(function(){var u='/xjs/_/js/k\x3dxjs.hp.en.FpSCkTtgEZ8.O/m\x3dsb_he,d/am\x3dAE-wOQ/d\x3d1/rs\x3dACT90oGutoeVPxIZrN__NWXQdKh-ldgojQ';
setTimeout(function(){var b=document;var a="SCRIPT";"application/xhtml+xml"===b.contentType&&(a=a.toLowerCase());a=b.createElement(a);a.src=u;google.timers&&google.timers.load&&google.tick&&google.tick("load","xjsls");document.body.appendChild(a)},0);})();(function(){window.google.xjsu='/xjs/_/js/k\x3dxjs.hp.en.FpSCkTtgEZ8.O/m\x3dsb_he,d/am\x3dAE-wOQ/d\x3d1/rs\x3dACT90oGutoeVPxIZrN__NWXQdKh-ldgojQ';})();function _DumpException(e){throw e;}
function _F_installCss(c){}
(function(){google.jl={dw:false,em:[],emw:false,lls:'default',pdt:0,snet:true,uwp:true};})();(function(){var pmc='{\x22d\x22:{},\x22sb_he\x22:{\x22agen\x22:true,\x22cgen\x22:true,\x22client\x22:\x22heirloom-hp\x22,\x22dh\x22:true,\x22dhqt\x22:true,\x22ds\x22:\x22\x22,\x22ffql\x22:\x22en\x22,\x22fl\x22:true,\x22host\x22:\x22google.com\x22,\x22isbh\x22:28,\x22jsonp\x22:true,\x22msgs\x22:{\x22cibl\x22:\x22Clear Search\x22,\x22dym\x22:\x22Did you mean:\x22,\x22lcky\x22:\x22I\\u0026#39;m Feeling Lucky\x22,\x22lml\x22:\x22Learn more\x22,\x22oskt\x22:\x22Input tools\x22,\x22psrc\x22:\x22This search was removed from your \\u003Ca href\x3d\\\x22/history\\\x22\\u003EWeb History\\u003C/a\\u003E\x22,\x22psrl\x22:\x22Remove\x22,\x22sbit* Connection #0 to host www.google.com left intact
\x22:\x22Search by image\x22,\x22srch\x22:\x22Google Search\x22},\x22ovr\x22:{},\x22pq\x22:\x22\x22,\x22refpd\x22:true,\x22rfs\x22:[],\x22sbpl\x22:16,\x22sbpr\x22:16,\x22scd\x22:10,\x22stok\x22:\x22s8OD6mj8K92mm_Zq1NxiaPJ7ylc\x22,\x22uhde\x22:false}}';google.pmc=JSON.parse(pmc);})();</script>        </body></html>%
  1. I'm not sure how/if arch has a package manager but I assume it does from a quick google on my side, can you install a simple package or do you need to update the package repos first? If you have to update the package repos, then I suspect the issue you are running into is box related and you would need to first populate the arch package cache prior to enabling the synced_folder to use sshfs on first boot. Here's the reason I'm asking for more details as comments in the code discusses this limitation in more detail.

According to the logs on OP, yes that's the issue I'm hitting. Arch Linux does not keep older versions of packages in their repo. Only the latest version exists. The older versions are removed.

  • What type of host networking are you using in libvirt? Since you are using libvirt networking can get weird quick since most adapters are either in bridge mode or NAT mode (the default). If you are using bridge mode can you please confirm if any other Vagrant boxes work with your setup? If another box does indeed work can you please post those details.

I use the default one.

  • Also, if you could also please provide any additional troubleshooting steps that you have tried that would also be helpful.

I tried to vagrant up again today without changing my config. I didn't see the error. I'm assuming the mirrors who had the older version of the package were down during OP.

pacman --noconfirm -S sshfs can only be safely ran if package list has been updated recently. Otherwise, it's a gamble. You'll have to hope that at least one mirror has the package version you need. Arch Wiki states you have to pacman --noconfirm -Syu sshfs but @dustymabe said it's not ideal.

Maybe we can add a compromise? Add an option to do a full upgrade (pacman --noconfirm -Syu sshfs) if first command (pacman --noconfirm -S sshfs) fails. This option should be available for all distros that don't support partial upgrades.

codylane commented 4 years ago

Hi @rEnr3n,

Thanks again for taking the time to post those requested details, it really means a lot and it helps give a better understanding of what's going on. That said, I'm sorry to hear that this issue is intermittent. I too have been bitten by flaky repos that are hard to troubleshoot why my install is only broken sometimes and it works other times. That's frustrating for sure.

Also, as stated yesterday and I hope I'm not being too direct but I don't really know Arch well enough to provide the best possible solution and best user experience that doesn't have compromises on one side or the other. I wouldn't want our plugin to put the user's VM into a broken state and after reading and re-reading as much supporting docs of how Arch works I cannot reliably nor honestly say that "I know whats best".

I personally feel like attempting to do a rolling upgrade, rebooting (when necessary) just to install a single package is not the goal of this plugin. To me, the package repository and services on the linux VM need to be handled by a different tool or automation pipeline. I'm honestly thinking the best course of action would be write a new Vagrant plugin that helps put package repos in known good state (then snapshots the VM) and then in this plugin would fire after repo refresher plugin as pre step. Again, this is just a spitball idea, but I think a separate plugin could better suited for this (long term) which it follows the microservice and unix philosphy of "one tool that does one thing very well".

Possible work around for now

I'll create a gist for you and attach it to this thread.

https://gist.github.com/codylane/e4ca5bd6318113c7bbcc15beb24cc985

codylane commented 4 years ago

USAGE

Update your base box when doing a fresh install

make build

Update your base box and repackage it as a new version box and re-adds it to your vagrant box inventory

make build-and-repackage

Get help from the Make file

make help

Using the default box

vagrant up

Using a specific versioned box provided that it is one of the items in vagrant box list

VAGRANT_ARCHLINUX_BOX=archlinux-1594846609 vagrant up

rEnr3n commented 4 years ago

Thank you for your time and effort 😊. I'm fine with your suggestion though.

codylane commented 4 years ago

Right on, glad hear that Makefile solution will work for you. I really like that little Makefile, it's makes repackaging a breeze especially if you need a new base box or you want to test something without provisioning the whole the stack every time. It's nice to be able to make incremental changes and then snapshot and release it.

If this meets your expectation(s) and there are no further problems would you mind closing out this issue? I don't have ability to close it.

rEnr3n commented 4 years ago

Will you be making it into a plugin?

codylane commented 4 years ago

Hey @rEnr3n,

My apologies, I will certainly make an attempt in the next week or so. I'll probably call it vagrant-reporefresh. FYI. In case you would like to contact me further or if you have additonal ideas my email is: cody dot lane at gmail dot com

dustymabe commented 4 years ago

This comment from the code seems relevant:

https://github.com/dustymabe/vagrant-sshfs/blob/fa273792f25ce62e38d90d947b2712b30ac8e1e2/lib/vagrant-sshfs/cap/guest/arch/sshfs_client.rb#L6-L14