centos6 vagrant Error: Cannot find a valid baseurl for repo: base

多分古くてrepoが死んでる(まだ6なんて使ってるの?6が許されるのは(ry

対策 [shell gutter="false"] vagrant ssh

sudo sed -i -e "s/^mirrorlist=http:\/\/mirrorlist.centos.org/#mirrorlist=http:\/\/mirrorlist.centos.org/g" /etc/yum.repos.d/CentOS-Base.repo sudo sed -i -e "s/^#baseurl=http:\/\/mirror.centos.org/baseurl=http:\/\/vault.centos.org/g" /etc/yum.repos.d/CentOS-Base.repo exit

vagrant reload [/shell]

エラーログ

[shell gutter="false"] [astel@local ansible]$ vagrant up hogehogevagrant01 Bringing machine 'hogehogevagrant01' up with 'virtualbox' provider... ==> hogehogevagrant01: Importing base box 'centos/6'... ==> hogehogevagrant01: Matching MAC address for NAT networking... ==> hogehogevagrant01: Checking if box 'centos/6' version '2004.01' is up to date... ==> hogehogevagrant01: There was a problem while downloading the metadata for your box ==> hogehogevagrant01: to check for updates. This is not an error, since it is usually due ==> hogehogevagrant01: to temporary network problems. This is just a warning. The problem ==> hogehogevagrant01: encountered was: ==> hogehogevagrant01: ==> hogehogevagrant01: The requested URL returned error: 404 Not Found ==> hogehogevagrant01: ==> hogehogevagrant01: If you want to check for box updates, verify your network connection ==> hogehogevagrant01: is valid and try again. ==> hogehogevagrant01: Setting the name of the VM: ansible_hogehogevagrant01_1623719775304_80315 ==> hogehogevagrant01: Fixed port collision for 22 => 2222. Now on port 2200. ==> hogehogevagrant01: Clearing any previously set network interfaces... ==> hogehogevagrant01: Preparing network interfaces based on configuration... hogehogevagrant01: Adapter 1: nat hogehogevagrant01: Adapter 2: hostonly ==> hogehogevagrant01: Forwarding ports... hogehogevagrant01: 22 (guest) => 2200 (host) (adapter 1) ==> hogehogevagrant01: Running 'pre-boot' VM customizations... ==> hogehogevagrant01: Booting VM... ==> hogehogevagrant01: Waiting for machine to boot. This may take a few minutes... hogehogevagrant01: SSH address: 127.0.0.1:2200 hogehogevagrant01: SSH username: vagrant hogehogevagrant01: SSH auth method: private key hogehogevagrant01: Warning: Connection reset. Retrying... ==> hogehogevagrant01: Machine booted and ready! [hogehogevagrant01] No Virtualbox Guest Additions installation found. Loaded plugins: fastestmirror, security Setting up Install Process Determining fastest mirrors YumRepo Error: All mirror URLs are not using ftp, http[s] or file. Eg. Invalid release/repo/arch combination/ removing mirrorlist with no valid mirrors: /var/cache/yum/x86_64/6/base/mirrorlist.txt Error: Cannot find a valid baseurl for repo: base Unmounting Virtualbox Guest Additions ISO from: /mnt umount: /mnt: not mounted ==> hogehogevagrant01: Checking for guest additions in VM... hogehogevagrant01: No guest additions were detected on the base box for this VM! Guest hogehogevagrant01: additions are required for forwarded ports, shared folders, host only hogehogevagrant01: networking, and more. If SSH fails on this machine, please install hogehogevagrant01: the guest additions and repackage the box to continue. hogehogevagrant01: hogehogevagrant01: This is not an error message; everything may continue to work properly, hogehogevagrant01: in which case you may ignore this message. The following SSH command responded with a non-zero exit status. Vagrant assumes that this means the command failed! [/shell]

対策ログ 途中でこけてるので設定したいIPも振られていない [shell gutter="false"] [astel@local ansible]$ vagrant ssh hogehogevagrant01 [vagrant@localhost ~]$ ip a 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 inet 127.0.0.1/8 scope host lo inet6 ::1/128 scope host valid_lft forever preferred_lft forever 2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000 link/ether 52:54:00:64:d1:e6 brd ff:ff:ff:ff:ff:ff inet 10.0.2.15/24 brd 10.0.2.255 scope global eth0 inet6 fe80::5054:ff:fe64:d1e6/64 scope link valid_lft forever preferred_lft forever 3: eth1: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN qlen 1000 link/ether 08:00:27:61:5f:5a brd ff:ff:ff:ff:ff:ff [vagrant@localhost ~]$ sudo sed -i -e "s/^mirrorlist=http:\/\/mirrorlist.centos.org/#mirrorlist=http:\/\/mirrorlist.centos.org/g" /etc/yum.repos.d/CentOS-Base.repo [vagrant@localhost ~]$ sudo sed -i -e "s/^#baseurl=http:\/\/mirror.centos.org/baseurl=http:\/\/vault.centos.org/g" /etc/yum.repos.d/CentOS-Base.repo [vagrant@localhost ~]$ exit logout Connection to 127.0.0.1 closed. [astel@local ansible]$ [astel@local ansible]$ vagrant reload [/shell]