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
NIC not connected after cloning vm - Ubuntu 2020 Beta #421
Comments
If you see the vm settings has the "connect at power on" checked off, it is a clone issue not an open vm tools issue. How did you clone the VM ? Was the source VM NIC connected ? |
I have been having the similar issue with the fully released version of Ubuntu 20.04 LTS.
/sbin/ifconfig doesn't exist in Ubuntu 20.04, funnily enough the issue doesn't exist in the 10.3.5.7752 version of open-vm-tools because it is using the ip command when I deploy an Ubuntu 18.04 VM. |
To provide some logs/info, here are some logs from a successful run on Ubuntu 18.04 with open-vm-tools 10.3.5.7752:
|
Her are the equivalent logs from a failed Ubuntu 20.04 with the latest version of open-vm-tools from the Ubuntu repos:
|
Basically, open-vm-tools or deployPkg can't recognise version 20.04 and deploys a 'default' Ubuntu customization. Unfortunately the 'default' Ubuntu solution is to use the legacy Not sure if this is a open-vm-tools problem or a vCenter problem @vmwzhangv |
I am seeing the same on the released version. |
Thanks, @rolffujino! This clarifies the original issue. Yes, if the guest customization is involved in a clone workflow, the VM NICs were disabled, and only get reenabled if the guest customization runs successfully. Otherwise, the cloned VM will still use the parent VM IP address, causing network issue. Thanks for the Guest Customization logs. We will file a bug to address this issue. |
@vmwzhangv I looked through the code in this repository and it looks like the customization scripts are fed into VMware tools and not a part of it. Therefore am I correct in assuming this is an issue that would need to be resolved with a patch to vCenter? (If this is a vCenter issue you probably want to close this issue) |
Yes, I already filed a bug today. The fix is going to be done at vCenter. I am closing this issue. Thanks. |
Being a bit stubborn, the workaround to this problem is to replace the For those who are interested just do this in your template:
After you have created your VMs you should add something in Terraform or cron or where ever to revert back to 20.04. |
This for letting us know this @rolffujino |
@vmwzhangv is there anywhere we can track the vCenter issue? |
Hi @icopanw , @rolffujino , @kradalby , Ubuntu 20.04 customization will be supported from next vSphere 6.7 patch release, and it has been supported in vSphere 7.0 release. |
I use 6.5 because of my CPU’s, so I guess I have to stick to the workaround. Which works fine. I thought this was a vCenter thing? Or is vSphere the same as vCenter in this setting and not ESXi |
Yes, it's a vCenter change, not on server side. |
@PengpengSun thank you for the clarification, |
@icopanw , the change has been checked-in to the patch release, I will update this thread once the patch is released. |
Hi @icopanw , VMware vCenter Server 6.7U3g has been released today, Ubuntu 20.04 customization is supported from this release. Please find 6.7U3g release at https://my.vmware.com/web/vmware/info/slug/datacenter_cloud_infrastructure/vmware_vsphere/6_7 |
Works for me, thanks :) |
Solved After vCenter upgrade. |
@vmwzhangv If /etc/issue is really used to confirm OS, can we please get ESXi updated to use In business environments /etc/issue is often replaced, and this is definitely the case with our templates, so checking this file will not work. |
@adam-kosseck I forwarded your request to our guest customization team for an evaluation. Please wait for our response. Thanks. |
@adam-kosseck , For Ubuntu, /etc/issue is used to confirm OS version, if your env overwrites this file, customization script should get Ubuntu version from /etc/lsb-release file content. Please share with me the /var/log/vmware-imc/toolsDeployPkg.log file from the VM you met issue. |
If it's checking /etc/issue and falling back to /etc/lsb-release this is fine for Ubuntu machines, but won't work on Red Hat. |
@adam-kosseck For RedHat, customization script is checking /etc/issue and falling back to /etc/redhat-release. |
i don't see any reference of ubuntu 20.04 guest os support in this release ubuntu versions supported are: |
@an-t-oine I believe the Guest OSes in above link is for "Supported Operating Systems for Upgrade of VMware Tools and Virtual Hardware". |
thank you for the accuracies. |
This IS an issue with vCenter 7.0.0.10400, though possibly slightly different - I've just checked for updates, and this is the latest version. From the log file... 020-07-19T19:00:46 INFO: Detected distribution flavour: Ubuntu 20.04 Then we get upset. 2020-07-19T19:00:46 DEBUG: opening file /etc/hostname. 2020-07-19T19:00:46 DEBUG: Actual String : ubuntu-20-04-template 2020-07-19T19:00:46 DEBUG: Stderr: And more upset 2020-07-19T19:00:48 INFO: Check if hostnamectl is available 2020-07-19T19:00:49 INFO: Check if hostnamectl is available 2020-07-19T19:00:50 INFO: Check if hostnamectl is available 2020-07-19T19:00:51 INFO: Check if hostnamectl is available Looks like it is using the ip command ok... 2020-07-19T19:00:58 DEBUG: Command: '/usr/bin/ip addr show' And then it fails out... 2020-07-19T19:01:00 DEBUG: Removing lock file /var/lock/vmware/gosc. [2020-07-19T19:01:00.574Z] [ error] Customization command failed with stderr: '^[[0;1;31mFailed to create bus connection: No such file or directory^[[0m [2020-07-19T19:01:00.574Z] [ error] Customization process returned with error. [2020-07-19T19:01:00.574Z] [ debug] Deployment result = -1. [2020-07-19T19:01:00.574Z] [ info] Setting 'unknown' error status in vmx. [2020-07-19T19:01:00.575Z] [ info] Transitioning from state 'INPROGRESS' to state 'ERRORED'. [2020-07-19T19:01:00.575Z] [ info] ENTER STATE 'ERRORED'. [2020-07-19T19:01:00.575Z] [ info] EXIT STATE 'INPROGRESS'. [2020-07-19T19:01:00.575Z] [ debug] Setting deploy error: 'Deployment failed.The forked off process returned error code.'. G |
@gmitch64 This looks like Dbus.service did not run or ran too late during boot, hostnamectl command requires Dbus.service to work. |
Despite supposedly being fixed, I needed to do the workaround here to get this to work. |
Hi @richwats May I know your Ubuntu version and type? And what's the vCenter version. Please check KB https://kb.vmware.com/s/article/54986 if you are using Ubuntu Live Server. Details:
So the boot sequence in your VM is:
When cloud-init*.service are enabled, dbus.service will start pretty late. |
Hello
it seems that dependency is ignored with "systemd-analyze dot" Thanks |
@wixaw |
Hello @PengpengSun Thanks |
From the log, "hostnamectl status 2" command kept failing since dbus is not running, I suspect there is cloud-init.service running which make dbus.service start late at booting. See "To use perl script as the customization engine:" section in KB https://kb.vmware.com/s/article/54986 |
I'm sorry because I realize that this is the same solution just above and that indeed it works well with the touch |
No problem, I mentioned this KB on Dec 4, 2020 in this thread, I'm glad it works for you! |
After cloning Ubuntu 2020 vm, the NIC is not connected in esxi,
in vm settings under "Network Adapter" the checkbox "connect at power on" is checked off,
when checking the the box error message presented:
Task name
Reconfigure virtual machine
Status
Invalid configuration for device '0'
vSphere Client version 6.7.0.42000
VM Compatibility:ESXi 6.7 Update 2 and later (VM version 15)
Guest OS: Linux
Version: Ubuntu Linux 64 bit
Adapter Type: VMXNET 3
VM tools - 2 version tested, open-vm-tools and other is Esxi VMware tools
VMware tools 10.3.21 build14772444
open-vm-tools 11269 (11.0.5)
The text was updated successfully, but these errors were encountered: