Score:0

LXC Profile custom changes are being ignored during container instantiation

fr flag

I need all my containers to automatically upgrade packages, install build-essential and load an ssh key I can use to ssh inside of my container immediately after launching. However even after custom changing my profile and launching a new container using said upgraded profile, none of the features were properly loaded. No ssh key to ssh inside, and no package upgrades. What am I doing wrong?

My profile looks like this:

config:
  user.user-data: |
    #cloud-config
    ssh_authorized_keys:
      - <key>
    package_update: true
    packages:
      - build-essential
description: Default LXD profile
devices:
  eth0:
    name: eth0
    network: lxdbr0
    type: nic
  root:
    path: /
    pool: default
    type: disk
name: production
used_by:
- /1.0/instances/server

Container start up command:

lxc launch --profile production images:ubuntu/focal server

I am using Ubuntu 20.04 and lxc 4.23

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.