GNU social JP
  • FAQ
  • Login
GNU social JPは日本のGNU socialサーバーです。
Usage/ToS/admin/test/Pleroma FE
  • Public

    • Public
    • Network
    • Groups
    • Featured
    • Popular
    • People

Conversation

Notices

  1. Embed this notice
    Peter Wemm (karinjiri@soc.crashed.org)'s status on Friday, 14-Feb-2025 04:58:43 JST Peter Wemm Peter Wemm
    Dumb question for folks using #bhyve on #FreeBSD - are there any established cloud-init data generators for guests that could be used here?

    I'm not talking about the cloud-init in the guest, but rather something to generate server-side templates for bhyve guests to use.

    I have something I kludged together for my purposes to inject ssh keys, host names, etc. I'm using openstack config-drive metadata because it's what I was familiar with but it's kind of inconvenient. (For the unfamiliar, its an extra tiny block device containing either a fat or iso9660 fs, with json/yaml/files/etc inside).

    I figured I should ask if I'm missing something that has already been done. Thoughts?

    Slightly irritating: the openstack config drive MUST have the label "config-2". FreeBSD's makefs and libarchive will not do this. cdrtools mkisofs will allow this slightly-illegal name. I may have done a sed on the makefs-generated file system.
    In conversation about 3 months ago from soc.crashed.org permalink
    • Embed this notice
      feld (feld@friedcheese.us)'s status on Friday, 14-Feb-2025 04:58:43 JST feld feld
      in reply to
      @karinjiri I haven't played around with this for bhyve yet, but I bookmarked this because this blog post seemed to show multiple ways you can do the cloud-init config. Perhaps it has useful tips in it for your environment as well.

      https://alfaexploit.com/en/posts/vm_bhyve/
      In conversation about 3 months ago permalink

      Attachments

      1. No result found on File_thumbnail lookup.
        Bhyve virtual machines under vm-bhyve
        from https://alfaexploit.com/en/posts/vm_bhyve/@kr0m
        Bhyve is the official virtualization hypervisor of FreeBSD starting from version 10.0-RELEASE. In this article, we will use vm-bhyve, a wrapper that will greatly facilitate the management of machines and the network.
    • Embed this notice
      Peter Wemm (karinjiri@soc.crashed.org)'s status on Friday, 14-Feb-2025 06:33:18 JST Peter Wemm Peter Wemm
      in reply to
      • feld
      FWIW, this is almost exactly what I needed. I was already using vm-bhyve. With a few tweaks, this does exactly what I needed for rapid spinup direct from unmodified "cloud" images:

      # vm create -t linux-uefi-zvol -s 20g -m 4g -c 2 -C -k /root/.ssh/authorized_keys -n 'ip=10.0.0.111/24;gateway=10.0.0.1;nameservers=10.0.0.1' kube-11
      # qemu-img convert -f qcow2 -O raw -p /vm/.iso/noble-server-cloudimg-amd64.img /dev/zvol/zroot/vm/kube-11/disk0

      No installation, no dhcp, static network config, no custom images.

      Tweaks: I fixed multiple ssh keys, changed ahci-cd to virtio-blk (which stops a bunch of linux kernel noise), and changed gateway4 -> routes since that generates a deprecation warning on modern clients.
      In conversation about 3 months ago permalink
      feld likes this.
    • Embed this notice
      Peter Wemm (karinjiri@soc.crashed.org)'s status on Friday, 14-Feb-2025 06:33:19 JST Peter Wemm Peter Wemm
      in reply to
      • feld
      Oh, neat! It wasn't mentioned in the docs so I had completely missed it. Thank you!

      I had essentially duplicated this work :(

      As noted in the blog post, it is a bit thin but is far less of a horrible hack than mine.
      In conversation about 3 months ago permalink

Feeds

  • Activity Streams
  • RSS 2.0
  • Atom
  • Help
  • About
  • FAQ
  • TOS
  • Privacy
  • Source
  • Version
  • Contact

GNU social JP is a social network, courtesy of GNU social JP管理人. It runs on GNU social, version 2.0.2-dev, available under the GNU Affero General Public License.

Creative Commons Attribution 3.0 All GNU social JP content and data are available under the Creative Commons Attribution 3.0 license.