I have tried to follow this thread: Vagrant how to set network type so that its attached to bridge adapter on Virtual Box with similar problem but no success.
Also tried this: How to automatically select bridged network interfaces in Vagrant?
and Vagrant docs https://www.vagrantup.com/docs/providers/virtualbox/configuration are Linux specific.
This is my vagrant file.
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
config.vm.box = "xoan/proxmox-ve_6.4"
config.vm.box_version = "1.0.0"
config.vm.network "forwarded_port", guest: 8006, host: 8006
# Create a public network, which generally matched to bridged network.
# Bridged networks make the machine appear as another physical device on
# your network.
config.vm.network "public_network", auto_config: false, Bridged: 'Realtek PCIe GbE Family Controller #5', ip: "192.168.56.2",
nic_type: "virtio"
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
vb.cpus = "2"
vb.name = "proxmox1"
end
end
I am specifying the NAT to bridged mode and giving it the Ethernet card name as VirtualBox sees it. (specifying the name since I have multiple nic interfaces)
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Importing base box 'xoan/proxmox-ve_6.4'...
==> default: Matching MAC address for NAT networking...
==> default: Checking if box 'xoan/proxmox-ve_6.4' version '1.0' is up to date...
==> default: Setting the name of the VM: proxmox1
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
default: Adapter 1: nat
default: Adapter 2: bridged
==> default: Forwarding ports...
default: 8006 (guest) => 8006 (host) (adapter 1)
default: 22 (guest) => 2222 (host) (adapter 1)
==> default: Running 'pre-boot' VM customizations...
==> 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
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: Machine booted and ready!
==> default: Checking for guest additions in VM...
==> default: Mounting shared folders...
but everytime I run vagrant up I keep getting NAT 1 as default