如何通过Vagrant将桥接的Virtualbox接口的eth0更改为eth1

问题描述

这是我的流浪文件

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

Vagrant.configure("2") do |config|
  config.vm.Box = "bento/ubuntu-18.04"
  config.vm.hostname = "k3s-ubuntu-1-18-04"
  # *** Working ***
  # config.vm.network "public_network",bridge: "wlp1s0",ip: "192.168.1.111"
  # *** Working ***

  config.vm.network "public_network",adapter: 0,ip: "192.168.1.111"
  config.vm.provider "virtualBox" do |vb|
    # display the VirtualBox GUI when booting the machine
    vb.gui = true
  
    # Customize the amount of memory on the VM:
    vb.memory = "2048"
  end

end

我要实现的山羊拥有一台Ubuntu计算机

和IP地址192.168.1.111将绑定到 eth0

错误消息:

==> default: Preparing network interfaces based on configuration...
    default: Adapter 1: nat
    default: Adapter 0: bridged
==> default: Configuring and enabling network interfaces...
==> default: Attempting graceful shutdown of VM...
==> default: Destroying VM and associated drives...
Traceback (most recent call last):
        125: from /opt/vagrant/embedded/gems/2.2.10/gems/vagrant-2.2.10/lib/vagrant/batch_action.rb:86:in `block (2 levels) in run'
        124: from /opt/vagrant/embedded/

能请你帮忙吗?

谢谢

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)