[00:31] ahosmanMSFT: I've run out of time for today; but in general one issue that needs resolving is that the instance.py and image.py both use 'image_id' as a way to reference different things; that is the instance uses image_id where 'vmName' really ought to be used, but certain places in image.py only have a image_id reference, so when snapshot is run, it needs the image id, but generaize and deallocate etc need the vm_name; so I think some refactoring [00:31] of this needs to happen. I'll keep working on this tomorrow as well. [00:34] rharper: I agree, at first my ideas was having them be interchangeable but seeing how it’s impeding in functionality it needs to be changed. [09:45] hello guys [09:45] I have a per-instance script installed on 2 servers which are part of the same AWS ASG [09:48] when instances first start, the script is run on each instance . But I strictly need to avoid the simultaneity of the execution . Any idea ? I could use a random sleep, but it seems crappy [14:27] Hello .. are there any documented steps on how to prepare vSphere templates with cloud-init . we are currently having a issues getting cloud-init to work ? is this the right channel for such requests? [14:33] malasfar: I'm not aware of any documentation for the templates w.r.t cloud-init upstream; I suspect there are some vmware knowledge base articles [14:35] any help on this appreciated as there are a lot of misleading information out there including the VMware KBs, i have been trying to get this to work since early 2019 and the results has been always inconsistent depending on what type of IP assignment I use ( Static , DHCP ) . it would be great if someone can jump on a webex/zoom session with me . [14:35] we just need some insight from the cloud-init team. [14:35] Xat`: you need some coordination between two servers so they don't execute the script at the same time? can the central resource queue/block while ? [14:35] malasfar: to be frank, the vmware datasource with network config is a mess; there are conflicting modes of operation [14:36] certainly happy to help debug/diagnose; but we've been working with the vmware team to help sort out how to enable all of the various workflows that are available; [14:36] i don't disagree .. we are trying to get high visibility on this internally with the BU.. i m a cloud management Staff SE @ vmware [14:38] that's great to hear . anyone in particular i can reach out to internally on our side. we still dont have a solid way to get this to work and specially for our customers . the only way i personal got it to work if i only used DHCP. and its a hit and mess [14:39] malasfar: on the technical side, if you look through cloud-init git commit history for @vmware.com those are the folks making changes [14:39] the issue here we provision a machine from vRealize Automation to vSphere . we dont have such issues we provision things to AWS, Azure or GCP [14:41] alright thanks , i will check the git commit history. just want to say that this a huge issue for us at the moment affecting al lot of customers world wide [14:42] it would be great if cloud-init actually worked on vSphere [14:42] thank you for your time [14:42] malasfar: indeed; sure, stay in touch [14:59] Hi.. I need to change the hostname to the global domain name, right now it is getting assigned to the name to which I deployed the VM. I am using RHEL distro. wherecan I modify that?? [17:40] Hi.. I need to change the hostname to the global domain name, right now it is getting assigned to the name to which I deployed the VM. I am using RHEL distro. where can I modify that?? [18:08] Hey hey. Quick question on cloud-init and swap. Can cloud-init perform the mkswap and swapon steps for a swap partition for us? Struggling to find an example, and my attempts see everything configured (/etc/fstab is correct) but no mkswap or swapon. [18:10] amansi26: you can provide #cloud-config user-data to the vm at launch time to do this and set the hostname and/or fqdn fields https://cloudinit.readthedocs.io/en/latest/topics/modules.html#update-hostname [18:13] amansi26: if your cloud may provide dynamic hostname and fqdn information from the metadata service, you can check `sudo cloud-init query` to see if any hostname or fqdn values are what you are looking for for the vm, then you could provide a jinja template to source those query parameters from your metadata if needed: https://cloudinit.readthedocs.io/en/latest/topics/instancedata.html#using-instance-data [18:14] sorry about the run-on sentence [18:14] blackboxsw: I just observed, my resolv.conf is missing with dns server details, that is why failing to set the correct hostname. I just put the dns details and rebooted, hostname comes up. Where is this resolv.conf being handled? [18:15] amansi26: something like this maybe https://cloudinit.readthedocs.io/en/latest/topics/examples.html#configure-an-instances-resolv-conf [18:16] or https://cloudinit.readthedocs.io/en/latest/topics/modules.html#resolv-conf [18:18] minfrin: is this what you are looking for https://cloudinit.readthedocs.io/en/latest/topics/examples.html#adjust-mount-points-mounted? [18:20] minfrin: from https://cloudinit.readthedocs.io/en/latest/topics/modules.html#mounts === hggdh is now known as hggdh-msft [21:02] blackboxsw: https://github.com/canonical/cloud-init/pull/205 any idea why this shows CI not complete but if I click through, it shows passed ? [21:02] ahosmanMSFT: https://github.com/canonical/cloud-init/pull/205 [21:31] rharper: Travis was likely having a normal one. I've tried restarting the fastest of the sub-builds to see if that causes it to attempt to report again. [21:32] Odd_Bloke: hehe, thanks for checking [21:32] If that doesn't do it, then retrying the whole build is the next step, and that usually works. [21:32] ok [21:39] Can cloud-init be used to override the SSH port configured at /etc/ssh/sshd_config? Because I'm trying to change the SSH server port in my VPS and it's not working (it's always port 22). After talking about this on #ubuntu, they told me it could be cloud-init's fault, since it's being used by my hosting provider to setup the image. [21:45] crimson_king: hrm, lemme check if we support that config option [21:46] crimson_king: no, we don't have that in our ssh config namespace; you could use bootcmd, which runs very early to make the change with some other tool ( sed, or awk, etc) [21:48] rharper, I don't see bootcmd installed, so there's something else overriding the SSH port. Do you have any idea what could it be? [21:48] If it's not cloud-init... [21:49] Something is locking the SSH port to 22, and doesn't let me change it. [21:49] I've talked to the hosting provider support, they couldn't help. I've talked to people at #ubuntu, and they told me to see if cloud-init is doing it [21:51] crimson_king: sorry, bootcmd is a cloud-init config module, [21:51] https://cloudinit.readthedocs.io/en/latest/topics/modules.html#bootcmd [21:51] would execute commands early in boot [21:51] oh.. [21:51] the other possibility is provider firewalls [21:52] sometimes they block ports by default and you need to enable 22 through their apis [21:52] rharper: I had to re-run an ubuntu-advantage-client CI job in travis to get it to re-report success output to the PR [21:52] blackboxsw: ah, ok Odd_Bloke was saying the same thing [21:52] looks like it's green now [21:52] yeah something hiccupped today on the reporting back, the restart of the full job was required on my end [21:53] y [21:55] crimson_king: if you think something in your cloud provider was providing user-data or meta-data that ran bootcmds on the system, you could run "sudo cloud-init query --all" on the vm and see if anything looked like it was providing vendor data or user-data that specified runcmd or bootcmd [21:56] though as rharper mentioned you could provide your own overrides via #cloud-config user-data which could 'fix' your vms to the proper sshd_config [21:56] blackboxsw, I get a warning and the following error: ERROR: Missing instance-data file: /run/cloud-init/instance-data.json [21:56] maybe it didn't run [21:57] cloud-init --version? [21:57] blackboxsw, /usr/bin/cloud-init 19.4-33-gbb4131a2-0ubuntu1~18.04.1 [21:58] yeah cloud-init may not have run as rharper mentioned 'cloud-init status --long' [21:58] blackboxsw, Status disabled, cloud-init disabled by cloud-init-generator [21:59] yeah something in the systemd dependency chain on that image may be broken and cloud-init was pulled out of the boot goals. right rharper? [21:59] blackboxsw: yes, but it wouldn't be disabled [21:59] crimson_king: that seems like there wasn't any data provided for cloud-init to use, [22:00] in which case cloud-init won't run if it doesn't detect a datasource [22:00] rharper, So cloud-init is not doing anything here? [22:00] and that status is due to seeing the file /etc/cloud/cloud-init.disabled on the system [22:00] crimson_king: doesn't look like it, /run/cloud-init/ds-identify.log will have details [22:01] cat /run/cloud-init/ds-identify.log can tell you if cloud-init didn't detect any valid datasource [22:42] Hi .. i m trying to trouble shoot an issue when provisioning an ubuntu 16.04 on sphere where i dont have cloud-init logs to check since they simply dont get generated. if I run cloud-init status --long i get the following -- > Can not apply stage config, no datasource found! Likely bad things to come! - Can not apply stage final, no datasource [22:42] found! Likely bad things to come! Cloud-init is set to use OVF as the only datasource. via an iso connected to the vSphere machine which i verified its connected. what can i do next to trouble shoot this ? [22:44] malasfar: Where is your image from? [22:44] i built it my self for the official ubuntu image then installed cloud-init [22:44] from* [22:45] its always a 50 - 50 chance that it works and but it doesn't thats the error i get [22:47] malasfar: From the ISO, you mean? Would any of the pre-built images at http://cloud-images.ubuntu.com/releases/xenial/release/ work for you? [22:47] Yes from an iso .. . your say to try the cloud images ? [22:48] saying* sorry about the typo [22:48] i have not tried the cloud images you referenced before. would it make any difference ? [22:53] malasfar: Those come with cloud-init preinstalled in a known-good way, so it reduces the moving parts involved in working out what the issue is. :) [22:53] okay will give it a try .. thank you Odd_Bloke [22:54] malasfar: Most of the cloud-init team will be finishing their day fairly soon, so if you continue to see issues then I suggest filing a bug using the link in the /topic so that someone definitely sees it. :) [23:02] Odd_Bloke i m assuming these are already pre-built VMs for vSphere which file i would use . i am looking to down this file ubuntu-16.04-server-cloudimg-amd64.ova [23:03] malasfar: I'm not familiar with vSphere I'm afraid, you'll have to determine which image (if any) will work for your platform. [23:05] okay thank you again [23:22] Odd_Bloke . i just provisioned one from the cloud image and i didn't even see cloud-init execute .. Whats the credentials for these images ? so i can access the VM [23:24] oh snap.,. that actually worked cloud-init did execute [23:25] malasfar: normally you supply the account name and login credentials in a datasource; where I get super-confused about cloud-init is I've got no idea how to provide a datasource. (I figured something out for running qemu by hand a few years ago..) [23:26] i just trying to see how these images were setup .. there is a default user called ubuntu for the ubuntu 16.04 i just imported to vSphere [23:26] either the cloud will provide that detail in metadata or you can provide it via user data. [23:27] and then cloud-init will setup what it was given [23:27] Our images come with a default user, but expect an SSH key to be provided to avoid passwords in the first place [23:27] sweet malasfar, so in vSphere, you can pass in a #cloud-config text file as user data [23:28] look what I found: https://blah.cloud/infrastructure/using-cloud-init-for-vm-templating-on-vsphere/ [23:28] might have some relevance to you [23:29] nice to see someone referencing validating cloud-config schema `cloud-init devel schema --config-file my-user-data-file.txt` [23:29] yes i have seen this blog.. i m using vRealize Automation 8.0 and i can use infrast [23:30] yes i have seen this blog.. i m using vRealize Automation 8.0 and i can use infrastructure as in the form of a blueprint with Cloud Config Code. that gets passed to the VM via the CD-ROM device as a ISO [23:31] and https://vmsysadmin.wordpress.com/2019/09/20/cloning-ubuntu-18-04-lts-cloud-image-on-vmware-using-cloud-init/ is interesting [23:40] @blackboxsw I had found the links you posted, but they seem to describe the creation of a swap file rather than a dedicated swap disk. Our full question is here: kivtqz2OlyCalhu2fiud [23:40] minfrin: is that a password that needs to be changed? [23:41] Yes it is, and my keyboard wants to caps lock, too. [23:41] https://stackoverflow.com/questions/60095848/how-do-you-configure-a-swap-partition-using-cloud-init [23:43] * minfrin changes password, has word with keyboard, glares at command C. [23:54] thats very weird if i deploy a VM using a DHCP IP assignment it works fine the minute i start using vSphere customization i get this error " Customization of the guest operating system 'ubuntu64Guest' is not supported in this configuration. Microsoft Vista (TM) and Linux guests with Logical Volume Manager are supported only for recent ESX host and [23:54] VMware Tools versions. Refer to vCenter documentation for supported configurations." [23:55] but it doesn't say what configuration that its not supported [23:57] When i use DHCP customization is not invoked . the machine gets an ip from the DHCP server and cloud init works. ( Executes the Cloud config Code ) . when i introduce customization so i can set the hostname with a static IP . i get the above error [23:57] this with using the cloud image