what I do is create a shortcut to notepad, then edit and add the path to
the file at the end of the line, and execute that right click as
administrator


On Fri, May 9, 2014 at 6:35 AM, Mark McFate <[email protected]>wrote:

> Thanks Alvaro.  I already have port forwarding working, and setting a
> static IP is not an attractive option for me becasue I routinely move from
> one DHCP network to another, and they have very different IP address
> ranges.  At the root of my issue is Drupal.  I'm building Drupal sites into
> this VM, and others, and there are characteristics of Drupal that make
> referencing a site by name much better than referencing it by address.
>
> I'll keep using my Windows "hosts" file and manually editing it for now,
> but  also keep looking for an automated solution.
>
> I wonder if there is a way in Windows to turn my "hosts" file into a link
> (shortcut?) and point that to a file that I can modify on-the-fly?  I might
> experiment with that just a bit.
>
> Thanks.
>
> On Wednesday, May 7, 2014 6:25:34 PM UTC-5, Alvaro Miranda Aguilera wrote:
>>
>> you are using dhcp, so the ip will be different each time the dhcp give
>> you a new one, or when you are in a different dhcp server.
>>
>> the vagrant way to do this, is forward a port, say 8080 to port 80 in the
>> guest, so then you can connect as http://localhost:8080
>>
>> the 2nd vagrant way to do this, is assign a fixed IP, instead of dhcp,
>> you can tell the VM what IP you want to use, so you can use then that ip
>>
>> a non-vagrant way to do it, is ask the network guy at the company to give
>> you always the same IP based on your mac, however, due the nature of
>> vagrant, you may end destroying that vm, creating a new one, and that mac
>> could change, so is not very feasible.
>>
>> if at this point only you connect, i suggest going with port forward.
>>
>>
>> Alvaro
>>
>>
>>
>>
>> On Thu, May 8, 2014 at 4:05 AM, Mark McFate <[email protected]> wrote:
>>
>>> I am by no means a systems admin, nor a networking expert, so what I’m
>>> trying to do may be way off the mark, but let me try to describe my
>>> situation…
>>>
>>> My employer recently purchased a Vagrant VMWare provider license which
>>> I’m successfully using with VMWare Workstation 10 on a Windows 7 host using
>>> Puppet to provision my VMs.  My base VM configuration uses an Ubuntu
>>> Precise64 box with DHCP and port forwarding.  The relevant parts of my
>>> Vagrantfile are shown below.
>>>
>>>    ## Configure VMWare Workstation as the provider of choice.
>>>
>>>   ## System parameters like available memory and number of CPU cores go
>>> here.
>>>
>>>      config.vm.provider "vmware_workstation" do |v|
>>>
>>>        v.vmx["memsize"] = "1024"
>>>
>>>        v.vmx["numvcpus"] = "2"
>>>
>>>      end
>>>
>>>
>>>
>>>   ## Give our guest a name.
>>>
>>>      config.vm.host_name = "base.dg.dev"
>>>
>>>
>>>
>>>   ## Every Vagrant virtual environment requires a box to build off of.
>>>
>>>      config.vm.box = "precise64_vmware"
>>>
>>>      config.vm.box_url = "http://files.vagrantup.com/
>>> precise64_vmware.box"
>>>
>>>
>>>
>>>   ## Configure a public network adapter per DHCP.
>>>
>>>      config.vm.network "public_network", :bridge => 'en1: Prompt Me'
>>>
>>>
>>>
>>> Ultimately *I would like to be able to address and remotely debug web
>>> apps running on this guest VM (and other, similar guests) using the
>>> configured vm.host_name, in this case “base.dg.dev”.*  Given my limited
>>> knowledge of networking, the only way I know of doing this currently is to
>>> edit my windows “hosts” file (C:\Windows\System32\drivers\etc\hosts)
>>> and insert (or update) a line like this:
>>>
>>>     192.168.1.58     base.dg.dev
>>>
>>> In the example above the address of 192.168.1.58 is the *dynamic* value
>>> assigned to base.dg.dev VM by my router.
>>>
>>> While this solution seems to work nicely, I find myself making frequent
>>> changes to the “hosts” file as my VMs move from one network environment to
>>> another (I frequently work from home).  So my question… *Is there a way
>>> to have Vagrant modify my Windows “hosts” file automatically, or some other
>>> technique that I’ve completely overlooked?*
>>>
>>> Thanks for any assistance or advice you can provide.  Take care.
>>>
>>>  --
>>> 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].
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>  --
> 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].
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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].
For more options, visit https://groups.google.com/d/optout.

Reply via email to