11 Replies Latest reply on Mar 25, 2013 1:06 PM by mpmartin8080

    VMware Studio Appliance does not use fixed ip address

    RubenEGraff Novice
      I have built an Ubuntu Appliance using Studio 2.6. I am having fits getting the OVF to accept a user provided IP address.
      The appliance only has one ethernet adapter.  I choose prompt for all networking properties it picks up a DHCP address. If I choose prompt for IP address or use DHCP (which is what I would want). I will only give me the DHCP provided address.
      If I Isolate the datacenter from the DHCP server it will not come up with any ip address. I reconnect DHCP and the appliance pick up an DHCP Address.
      Basically If I configure custom values for the network, the values do not get set and the vapp will only pick up an address from DHCP.
      I don't think it is an issue with ovfenv as it is loaded and does provide the correcting infomation

       

      ovfenv.JPG

       

      Also if I look and the OVF environment settings of the vm I have the correct values that I inputted.   

       

       

      ovf properties.JPG

       

       

       

      It seems like it should be pretty straight forward but I must be missing something somewhere.

       

      I have not seen anything on the blogs that match my exact issue.   Any help would be appreciated.

        • 1. Re: VMware Studio Appliance does not use fixed ip address
          samdoyle Enthusiast
          VMware Employees

          Hi,

           

          If you have VAMI installed, you can check by running vamicli version [--appliance | --studio]

           

          Then I believe running /opt/vmware/share/vami/vami_ovf_process --setnetwork should accomplish what you are looking for. This is assuming your ovf properties are set as you show here with a defined ip, netmask and gateway.

           

          If you try this please do so with a new deployed appliance that doesn't contain important information.

           

          You will to perform this operation with root privileges.

           

          Thanks

          • 2. Re: VMware Studio Appliance does not use fixed ip address
            RubenEGraff Novice

            I redeploy the Ubuntu base template and everything worked.   Once I added some modifications to the hardware such as additional disk, the base image became unpredictable with keeping the network settings.   Sometimes is would work, sometime it would not.   On one test deployment the server came up with a DHCP address even though is specified a fixed address.   The /etc/network/interfaces file specified the IP address that I provided and the OVA settings were also correct.   After I rebooted the appliance, it came up with the correct IP address.   This leads me to believe there is a timing issue when deploying the OVA.   The network interface must be coming up before VAMI has a chance to set it. 

             

            Putting the command "/opt/vmware/share/vami/vami_ovf_process --setnetwork" provided by Sam Doyle in the First Boot Script under the O.S. tab seem to correct the problem as a work around.

            • 3. Re: VMware Studio Appliance does not use fixed ip address
              samdoyle Enthusiast
              VMware Employees

              Actually that script should be executed on its own during each subsequent boot and is how VAMI does before the network configuration. If you have your OVF properties set as you described then it should have assigned you the ip unless some error occurred that prevented it. I'm curious if perhaps they had not been set at time of the restart? As I mentioned all three of those properties need to be present.

              • 4. Re: VMware Studio Appliance does not use fixed ip address
                RubenEGraff Novice

                bootmsg.JPGIs there a vami log that I can parse through that would show errors.   I was able to snapshot the screen on the boot and caught this message but I have not been able to find the boot log . 

                • 5. Re: VMware Studio Appliance does not use fixed ip address
                  samdoyle Enthusiast
                  VMware Employees

                  Those logs should be located in /opt/vmware/var/log/vami

                  • 6. Re: VMware Studio Appliance does not use fixed ip address
                    RubenEGraff Novice

                    vami-ovf.JPGLooking at that log with the work around I see why I could find it before.   On the original applince there were only three lines  

                     

                    looks like something is stopping the configuration.  Even after reboot, i just get one more line saying Managed Externally and it drops out.

                    • 7. Re: VMware Studio Appliance does not use fixed ip address
                      samdoyle Enthusiast
                      VMware Employees

                      Ah, I do believe you also need the index on the gateway which it looks like you are missing on your gw ovf property.

                       

                      Should be something like vami.gateway0 as in the case of the netmask and ip.

                      • 8. Re: VMware Studio Appliance does not use fixed ip address
                        mpmartin8080 Lurker

                        Did you guys ever come to any conclusion on this?  I have been developing several appliances on a subnet in our dev network that didn't have DHCP.  I turned a scope on yesterday in that subnet that already contained about half a dozen appliances running static IPs that were configured via OVF attributes at deployment time.  Within 5 minutes of turning DHCP on all of them, including the VMware Studio appliance itself, had suddenly switched IPs to addresses in the scope range.  If I look at the VAMI web interface for any of them they still show as being configured as static, but with the new IP they just pulled from DHCP.  If I re-configure the IP back to the static an appliance is supposed to be on, sometime within 30 minutes they switch back to the DHCP ones again (which especially sucks since I now have to re-write all of my scripts that talked to Studio for this new DHCP address).  This is a total deal-breaker for pretty much anyone we're going to sell these appliances to.  Is there something we need to do in the OVF or the appliance build process to make sure VAMI doesn't do this kind of thing on the fly?

                        • 9. Re: VMware Studio Appliance does not use fixed ip address
                          samdoyle Enthusiast
                          VMware Employees

                          Hi,

                           

                          Which distro. are you working and how  are you performing 're-configure the IP back to the static'?

                           

                          If you are going through the vamiui to set the networking properties it will update the correct files depending on the distro such as /etc/network/interfaces for Debian based and /etc/sysconfig/network-scripts/ifcfg-* for RH/CentOS for example. So assuming you have updated the corresponding target host configuration files to reflect the new DHCP setting a refresh of the vamiui should reread the network configuration correctly, the test I performed behaved as expected.

                           

                          Be also sure to also check /opt/vmware/var/log/vami log files in addition to your normal /var/log files for any indications.

                           

                          *edit*

                           

                          Note though that setting the ip address through the ui will override those values set through the ovf properties such that a call to setnetwork through the vami_ovf_process will no longer work. This is because the ip has been set outside the ovf process and is now considered managed by vami.

                          • 10. Re: VMware Studio Appliance does not use fixed ip address
                            RubenEGraff Novice

                            I am running Ubuntu 10.04 but at the end of the Post-install script I updated the kernal to 3.0.0-26-43-generic-pae. 

                             

                            I was able to solve the issue by adding the line

                             


                            /opt/vmware/share/vami/vami_ovf_process --setnetwork

                             

                            in my First Boot Script, which forces vami to read and set the network address from the ova parameters.

                            • 11. Re: VMware Studio Appliance does not use fixed ip address
                              mpmartin8080 Lurker

                              I'm using the default ubuntu 10.04 profile.  When I say it reconfigures itself back to DHCP, I mean that on first boot everything looks good (IPs are all set to what the user enters during installation of the appliance) but then after some period of time the VM suddenly changes IPs to a DHCP IP.  Literally, in the middle of using the appliance, it's IP will change.  It took me a while to actually figure out what was going on, since it looked to me like the thing was just dropping off of the network.  If I run the VM on a network without DHCP, which is where I did all of my initial testing, the static IP stays locked in and works fine.  The /etc/network/interfaces file is configured for the proper static IP so it looks like there is actually some kind of periodic process that's pulling a DHCP address and overriding the OS settings.  In fact, if I reboot the VM is comes up with its static and stays that way again for 15-20 minutes.  Any ideas what's doing this?