9:24 AM (1 minute ago)
Hi Alvaro,
Thanks for your explanation.
Just want to make sure I understand your response. There are two ways to
do this, either via
1) forwarded_ports, or
2) public network
------------------------------------------------------------------------------------------------------------------------------------------------------------------
For 1, I did the following:
config.vm.network "forwarded_port", guest: 3389, host: 3389, id: "rdp",
auto_correct: true
According to the doc:
"""
Defining a Forwarded Port
The forwarded port configuration expects two parameters, the port on the
guest and the port on the host. Example:
Vagrant.configure("2") do |config|
config.vm.network "forwarded_port", guest: 80, host: 8080
end
This will allow accessing port 80 on the guest via port 8080 on the host.
For most providers, forwarded ports by default bind to all interfaces. This
means that other devices on your network can access the forwarded ports. If
you want to restrict access, see the guest_ip and host_ip settings below.
"""
After
$ vagrant rdp
on the host. I tried to connect from another node:
$ xfreerdp /u:vagrant /v:<hostip>:3389
This did not work. Am I doing something wrong?
Note:
$ xfreerdp /u:vagrant /v:127.0.0.1:33389 works from the host (localhost)
------------------------------------------------------------------------------------------------------------------------------------------------------------------
For 2. I followed an stackoverflow recommendation:
config.vm.network :public_network, :bridge =>
'eth0',:use_dhcp_assigned_default_route => true
This got the VM to get a DHCP address, and I was able to connect via:
$ xfreerdp /u:vagrant /v:<guest_ip>:3389
where I got the guest_ip by first xfreerdp ... 127.0.0.1, then querying for
its assigned ip :
is there a better way of getting the assigned guest vm's ip address from
the host?
------------------------------------------------------------------------------------------------------------------------------------------------------------------
In any case 2. seems to work for now, but I don't quite understand why the
forwarded_ports method 1. doesn't quite work.
Thanks,
-f
--
This mailing list is governed under the HashiCorp Community Guidelines -
https://www.hashicorp.com/community-guidelines.html. Behavior in violation of
those guidelines may result in your removal from this mailing list.
GitHub Issues: https://github.com/mitchellh/vagrant/issues
IRC: #vagrant on Freenode
---
You received this message because you are subscribed to the Google Groups
"Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/vagrant-up/a4424715-da43-432b-bb4e-49f00f7d4bc3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.