Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setting a private IP address does not work #462

Open
remilapeyre opened this issue Nov 23, 2023 · 1 comment
Open

Setting a private IP address does not work #462

remilapeyre opened this issue Nov 23, 2023 · 1 comment

Comments

@remilapeyre
Copy link

Configuring static IP addresses for the private_network using the configuration given at https://parallels.github.io/vagrant-parallels/docs/networking/private_network.html does not work.

Vagrant version:

$ vagrant version
Installed Version: 2.4.0
Latest Version: 2.4.0
 
You're running an up-to-date version of Vagrant!

Vagrant parallels plugin version:

$ vagrant plugin list  
vagrant-parallels (2.4.1, global)
  - Version Constraint: > 0

Parallels Desktop version:

$ prlctl --version
prlctl version 19.1.1 (54734)

Vagrantfile:

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

Vagrant.configure("2") do |config|
  config.vm.box = "dcagatay/fedora-39-aarch64"
  config.vm.network :private_network, ip: "10.37.130.6"
end

Running vagrant up:

$ vagrant up
Bringing machine 'default' up with 'parallels' provider...
==> default: Registering VM image from the base box 'dcagatay/fedora-39-aarch64'...
==> default: Creating new virtual machine as a full clone of the box image...
==> default: Setting the default configuration for VM...
==> default: Running 'post-import' VM customizations...
==> default: Checking if box 'dcagatay/fedora-39-aarch64' version '0.0.7' is up to date...
==> default: Setting the name of the VM: vault-2_default_1700698403147_67535
==> default: Preparing network interfaces based on configuration...
    default: Adapter 0: shared
    default: Adapter 1: hostonly
==> default: Clearing any previously set network interfaces...
==> default: Running 'pre-boot' VM customizations...
==> default: Booting VM...
==> default: Waiting for machine to boot. This may take a few minutes...
    default: SSH address: 10.211.55.85:22
    default: SSH username: vagrant
    default: SSH auth method: private key
    default: Warning: Authentication failure. Retrying...
    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 Parallels Tools installed on the VM...
==> default: Parallels Tools installed on this VM are outdated! In most cases
==> default: this is fine but in rare cases it can cause things such as shared
==> default: folders to not work properly. If you see shared folder errors,
==> default: please update Parallels Tools within the virtual machine and
==> default: reload your VM.
==> default: Configuring and enabling network interfaces...
==> default: Running provisioner: shell...
    default: Running: inline script
    default: CHANGED: partition=3 start=3328000 old: size=63780864 end=67108863 new: size=99071967 end=102399966
    default: Resize device id 1 (/dev/sda3) from 30.41GiB to max

But the IP address is wrong:

$ vagrant ssh -- ip addr show
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
    link/ether 00:1c:42:07:b4:52 brd ff:ff:ff:ff:ff:ff
    altname enp0s5
    inet 10.211.55.85/24 brd 10.211.55.255 scope global dynamic noprefixroute eth0
       valid_lft 1774sec preferred_lft 1774sec
3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
    link/ether 00:1c:42:f0:5e:3d brd ff:ff:ff:ff:ff:ff
    altname enp0s6
    inet 10.37.132.10/24 brd 10.37.132.255 scope global dynamic noprefixroute eth1
       valid_lft 1774sec preferred_lft 1774sec
    inet6 fdb2:2c26:f4e4:2:23e6:bfcd:3929:7d66/64 scope global dynamic noprefixroute 
       valid_lft 2591977sec preferred_lft 604777sec
    inet6 fe80::fe26:1f1e:bca9:29a1/64 scope link noprefixroute 
       valid_lft forever preferred_lft forever

The IP address 10.37.132.10 differs from 10.37.130.6. I think the private network is still using DHCP.

@christophersjchow
Copy link

Running into the same issue, it sets the private IP address on a new interface eth1 leaving eth0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants