Score:-3

What is the simplest data source for a cloud-init home lab?

at flag

I'm using cloud-init 22.1-14 to spin up VMs using Ubuntu cloud images and kvm/qemu on a home server. I think I'm at the stage where I need to implement a data source because my VM creation dies if I try to write arbitrary files as a part of my init. Here's what I do to generate an ISO image containing the configuration data.

cloud-localds --network-config=/srv/init/network-init.cfg /var/kvm/mldc-seed.qcow2 /srv/init/cloud-init.cfg

Here's an example of me trying to write a .tmux.conf file using syntax that does not work with cloud-init 22.1-14.

write_files:
  - path: /home/msh/.tmux.conf
    content: |
          unbind C-b
          set -g prefix C-a
          bind-key C-a last-window
          bind-key k confirm kill-window
    owner: 'muh:adm'
    permissions: '0640'

Since I paid attention to the version of cloud-init I had installed, my ability to write arbitrary files has improved. Now I can write any number of text files without breaking the cloud-init run.

write_files:
  - content: |
      set ts=2
      set sts=2
      set sw=2
      set expandtab
path: /home/msh/.exrc
owner: root:root
permissions: '0660'
defer: true
mr.zog avatar
at flag
I have learnt that I can tail /var/log/cloud-init.log and /var/log/cloud-init-output.log on the VM to find errors. Previously I had been looking at log files on the hypervisor (host), and that wasn't useful.
mr.zog avatar
at flag
And by 'on the VM' I mean _in_ the VM.
Score:0
at flag

The data source we use if we don't use a third party or 'external' data source is called NoCloud. Running cloud-localds locally means you're using NoCloud.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.