-
Notifications
You must be signed in to change notification settings - Fork 427
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
no IP address assigned to new cloned 18.04 template #240
Comments
Thanks for the info. Please see the KB for details: |
Thanks for your answer and the link, i guess we have to wait for vmware then. |
even if you remove netplan and install legacy ifup, guest customisation does not work (see /var/log/vmware-imc/toolsDeployPkg.log at https://gist.github.com/saschalucas/5595235e6ff41bc4a4ea2bac845bd2dc). somehow it trys cloud-init but gave up later (don't know why). |
We do have several internal PRs tracking customization failure for ubuntu18.04. Regarding the cloud-init customization option, there are two things must be done before using cloud-init based guest customization,
|
Hello everybody, EDIT: Ok seems like the official vmware-tools work with ubuntu18.04 (at least connecting the NIC work.. I am doing the rest via ansible) |
@shibumi , did you provide the additional inormation requested by Peter, see #240 (comment) ? |
@shibumi , please try the following workaround to use customization with cloud-init:
Then you could try to run customization again. |
Hi, @pengzhencao here is the requested log (somehow anonymised): the open-vm-tools is from stock ubuntu package:
I'll give cloud-init a try. Thanks, Sascha. |
@oliverkurth @pengzhencao sorry maybe I expressed myself wrongly.. I am not interested in cloud-init configuration. In my case ansible does this via pyvmomi (the ESXI API) and the esxi server handles this via the running guest agent. What I want/need is a working open-vm-tools for Ubuntu 18.04 The official vm-tools are working. There the NICs get connected via the guest agent.. on ubuntu 18.04 and open-vm-tools this doesn't work. |
@shibumi wrong thread then? |
@AndrewSav no idea why you think this is the wrong thread. My case is exactly the one that the thread opener has. No idea why everybody started talking about cloud-init support for vmware suddenly in this thread. The main problem is the same. open-vm-tools doesn't seem to connect NICs on Ubuntu 18.04. (Doesn't matter which tool you run above open-vm-tools. If pyvmomi, ansible-vmware or cloud-init. They all use open-vm-tools to get the NICs automatically connected. And this doesn't seem to work in ubuntu 18.04) |
@shibumi Which network controller are you using in your VM? As I know, the driver of the nics doesn't depend on OpenVMTools, all drivers (for e1000e, vmxnet3. ) are all included in the Linux kernel. (e1000 is not supported) You could try different nic when you create the VM and see how it behave. In my understanding even there's no OVT installed the nics should work. |
@hangrao I use vmxnet3. The NIC works but they doesn't come up automatically and get connected via OVT. When I manually click on connect in the GUI of vmware center everything works fine. |
I am hitting the same error as @shibumi through ansible, deploying a centos image works and brings up the NIC correctly, but starting an ubuntu image doesn't. I've tried to force call the object and setting Unsure if related or not, but I notice they have different VMWare Tools version installed (ubuntu: 10304, centos: 10282) Also tried the workaround regarding cloud-init approach to no avail. |
@jord-bh @shibumi We tried to install ubuntu 18.04 from iso, and tried deploy ovf using ovftool or vSphere web client, either way is working fine. The Nic can go up successfully and the VM can get ip address. Could you capture a screen shot with the error and add the reproducing steps there? I'd like to try that further. |
@hangrao See also this Bug Issue for Ansible: ansible/ansible#41133 And what we talk about is getting the nic up automatically via Vmware API (that uses OVF) not via manually clicking on things. |
@shibumi Thanks for the clarification, will have a try using steps you described in ansible/ansible#41133. |
I am seeing the same issue when using salt-cloud to clone a vm. The clone's network adapter starts disconnected |
@hangrao any luck reproducing this yet? |
@jord-bh We're able to reproduce this issue, and have already raised internal ticket to track it. Will update this thread if there's any progress. |
@pengzhencao Modifying the template to use cloud-init + setting to false the |
@jstoja Glad to know it could work. |
@jstoja For me this even doesn't work when I have no cloudinit installed. So it's definitly something with Ubuntu 18.04 |
@shibumi @pengzhencao I'll rebuild everything from scratch and try again to double check. If I get something working, I'll share it here. |
@jstoja did you install deprecated |
Humm I tested a dozen times with the exact same template each time and it worked twice without even doing something special... I didn't find something interesting in the logs... I tried with the legacy network-ifup and it doesn't help. |
@jstoja which esxi version? which template? which distribution and distribution version? was the template modified? if so, what has been modified? No idea why it works for you. Fact is for a lot of people it doesn't work :) |
Like I said in my last message, I relaunched it a dozen of times and it worked only twice... No idea why yet. I've tried manually and it didn't work either, so I'm trying to find why did it work very rarely... The thing is that it's not only about the NIC only, nothing is customized, not even the hostname, so it's pretty easy to check. |
@bitmand Yes, it's the same issue. The root cause is dbus.service is not running before guest customization happens, this is not always happening, depends on VM's cpu/memory numbers. |
@PengpengSun I added the line to open-vm-tools.service to make sure dbus service is started to the template. Then created 5 VMs and all worked as expected - thank you very much for workaround, highly appreciated :) |
@PengpengSun I will try it tomorrow, when I am at work again. |
@PengpengSun THANK YOU !!!!! |
We are also experiencing this exact issue on Ubuntu 16.04. |
@idoru78 The dbus issue should only reproduce on Ubuntu18.04, but I need know VMTools version on your Ubuntu 16.04 VM, and could you please share the /var/log/vmware-imc/toolsDeployPkg.log file. |
Sure. Edit: Oops first one was from 18.04... The log appears differently but the symptom is the same in that the NIC starts in a disconnected state. We have worked around it for now my keep the open-vm-tools package at v10.0.7 and not upgrading to 10.2. |
From the log, it says the VM is Ubuntu18.04 but 16.04, please try the workaround in my previous comment at Aug 15. DEBUG: Command: 'cat /etc/lsb-release' |
VMware KB that was just posted as a workaround solved it for me |
Hi! Could we get a clarification on whether or not My understanding is that Ubuntu 18.04, including the configuration of We've tried this now with both cloud-init and the "traditional GOSC" workflows, but with no luck on getting the network configured on 18.04.
Environment Info: Deployment logs: |
@maximhan Your understanding is correct, netplan supporting is available on 6.5U2, while the fix is on vCenter side, you need a 6.5U2 vCenter, your ESXi build is good. Thanks, |
Works fine here on vCenter 6.7 |
Hi guys, ESXi 6.7.0 |
Hi BrightVictoria, Could you check if you have already follow the steps in this KB: Best regards, |
Just adding my .02 here for reference. I am using vCenter 6.7 to start with. However, my scenario might be a bit different so let me explain. The below involves Ubuntu 18.04 server w/out cloud-init. I am building OVA images using Packer using the Update Update |
Right, vmxnet2 has been superseded by vmxnet3, please use vmxnet3 or other supported nics. |
had a similar issue using centos 7 |
Hi @spaced ,
|
On ubuntu 18.04 cloud images, I found that /etc/netplan/50-cloud-init.yaml was conflicting with the vmware customizations.
fixed the issue, and my customizations completed properly. |
Thanks @rthimons85, Ubuntu 18.04 cloud image should have cloud-init installed according to the /etc/netplan/50-cloud-init.yaml file exits. |
This is now closed as invalid over at LaunchPad Ubuntu. |
Posted a blog on how to use This took me days to figure out, but it hinged on a few things (covered in the Troubleshooting section of the blog) - but essentially, do NOT change the Also, it seemed to matter that in the OVA spec, a Clearing |
If you are running VIO (VMware Integrated Openstack) and smashing your head against the wall trying to get cloud-init to identify the datasource, like me, then you will need to ensure vmtools (or open-vm-tools) runs and registers the IP with SpoofGuard. Until this happens all traffic will be blocked. The quickest way is to arm cloud-init to run on 2nd boot. |
@dasmokedog how do you configure cloud-init to run on 2nd boot instead of first boot? |
@vmwarelab Initially I approached it by adding I admit it is a tad heavy handed but it has been the only way I have been able to get 100% success rate for ubuntu 18.04 on vIO. The problems imo come down to timing of when cloud-init runs and when the system is actually in a proper state for it to be ran, and a service seemed the logical route. Attached is a text file that is the contents of the script and the unit file for the service. Its nothing special except I no longer get called because a users new instance failed to provision ;-) |
thanks for sharing @dasmokedog i was hoping for something easier.. its never easy when it comes to cloud-init and i am hoping i never have to use it on vSphere. its just ugly, not consistent results . meaning not always successful. In my case i m testing it with vRA 8 and the only way currently working is if i use DHCP without any customization where the machine doesn't reboot. if i try to use a static IP assignment , the VM's NIC would be in a disconnected state when the VM is powered on and until customization is completed and the machine rebooted, the NIC then switch to a connected state . of course in that time Cloud-Init already tried running when there was no network and also gets interrupted by the customization reboot still for having it work with DHCP the template had to be configured, like for example in my case :
In my case its a hit or mess still, for example if my deployment has two VMs being provisioned from the same image i prepared but with each having different user data . one would work and executes the command and one ends failing with DataSource not found. and sometimes they both work. i tried some of the suggestions in the troubleshooting section in this blog by using cloud-init as the customization engine instead . https://blah.cloud/infrastructure/using-cloud-init-for-vm-templating-on-vsphere/ Everything went okay except the DataSource ends being seed=VMwareTools and not OVF since vRA map the user-data as an iso connected to the VM CD-ROM device, but again cloud-init ends not executing anything but customization works. |
I am able to deploy ubuntu 18.04 to vSphere using terraform v0.13.5 and using cloud-init to configure the network. Adding "After=dbus.service" to /lib/systemd/system/open-vm-tools.service fixed it. I have an ansible role for installing open-vm-tools (from packer) and added this after installing the package:
|
Hi @sqqqrly
Were you using cloud-init as customization engine which is described in this KB https://kb.vmware.com/s/article/54986 ? I'm asking this since adding 'After=dbus.service' to open-vm-tools.service and customizing VM by cloud-init creates a dependency cycle for systemd:
|
@PengpengSun My Terraform deploy is similar to this example: https://github.com/grantorchard/terraform-vsphere-cloudinit-simple I install open-vm-tools (modified service file) and cloud-init using packer to build an image. Later, Terraform then deploys the image and cloud-init runs using the extra_config data found in main.tf. |
@sqqqrly Great, so you are using https://github.com/vmware/cloud-init-vmware-guestinfo to deploy data to cloud-init, with that please ignore my previous comment on dependency cycle, they are different process. |
Hello,
i have an issue when deploying ubuntu18.04 Preview on an esxi version 6.0.
open-vm-tools version: 2:10.2.0-3ubuntu2
After creating a new VM from a Template with pyvmomi, the machine does not get an IP address assigned, also in the VM properties->Network the options "Connect" and "Connect at power on" are not checked.
The file /etc/network/interfaces still exists on the system, but there was nothing written into the file.
I also tried to create a new Vm from a Template via the vSphere Client with the same result.
Ubuntu changed their default Networking to netplan with 17.10 https://lists.ubuntu.com/archives/ubuntu-devel-announce/2017-June/001215.html.
If you need any further infomation, logfiles, etc. please let me know.
The text was updated successfully, but these errors were encountered: