Coder Social home page Coder Social logo

Comments (3)

rfakit avatar rfakit commented on June 27, 2024

this is my azure pipeline job

    jobs:
      - job: CreateCustomImageJob
        displayName: 'Build and Deploy Talos Image'
        steps:
          - checkout: none
          - script: |
              set -exuo pipefail

              export TF_VAR_vsphere_talos_template="talos-$(TALOS_VERSION)-template"
              export TF_VAR_vsphere_datastore="$(VSPHERE_DATASTORE)"
              export GOVC_INSECURE='1'
              export GOVC_URL="https://$(VSPHERE_SERVER)/sdk"
              export GOVC_USERNAME="$(VSPHERE_USERNAME)"
              export GOVC_PASSWORD="$(VSPHERE_PASSWORD)"
              export TF_VAR_vsphere_datacenter="$(VSPHERE_DATACENTER)"
              export talos_version=$(TALOS_VERSION)
              export talos_vmtoolsd_extension_version="0.5.0"
              export talos_drbd_extension_version="9.2.8"
              export talos_iscsi_extension_version="v0.1.4"
              export talos_util_linux_tools_extension_version="2.39.3"
              export talos_version_tag="v$talos_version"

              # Create Talos configuration
              config_dir="$PWD/tmp/talos"
              rm -rf $config_dir
              mkdir -p $config_dir

              cat << EOF > "$config_dir/talos-$talos_version.yml"
              arch: amd64
              platform: vmware
              secureboot: false
              version: $talos_version_tag
              customization:
                extraKernelArgs:
                  - net.ifnames=0
              input:
                kernel:
                  path: /usr/install/amd64/vmlinuz
                initramfs:
                  path: /usr/install/amd64/initramfs.xz
                baseInstaller:
                  imageRef: ghcr.io/siderolabs/installer:$talos_version_tag
                systemExtensions:
                  - imageRef: ghcr.io/siderolabs/util-linux-tools:$talos_util_linux_tools_extension_version
                  - imageRef: ghcr.io/siderolabs/iscsi-tools:$talos_iscsi_extension_version
                  - imageRef: ghcr.io/siderolabs/talos-vmtoolsd:$talos_vmtoolsd_extension_version
                  - imageRef: ghcr.io/siderolabs/drbd:$talos_drbd_extension_version-v$talos_version
              output:
                kind: image
                imageOptions:
                  diskSize: 2147483648
                  diskFormat: ova
                outFormat: raw
              EOF

              cat "$config_dir/talos-$talos_version.yml"
              lsb_release -a
              # Build Talos image
              docker run --rm -i \
                -v $config_dir:/secureboot:ro \
                -v $config_dir:/out \
                -v /dev:/dev \
                --privileged \
                "ghcr.io/siderolabs/imager:$talos_version_tag" - < "$config_dir/talos-$talos_version.yml"


              # Move and import Talos image to vSphere
              ova_path="$config_dir/talos-$talos_version-vmware-amd64.ova"
              mv $config_dir/vmware-amd64.ova $ova_path

              govc import.spec $ova_path \
                | jq --arg network "$VSPHERE_NETWORK" '.NetworkMapping[0].Network = $network' \
                > $config_dir/talos-$talos_version-vmware-amd64.ova.json

              govc import.ova \
                -ds $TF_VAR_vsphere_datastore \
                -folder "//$TF_VAR_vsphere_datacenter/vm/$(dirname $TF_VAR_vsphere_talos_template)" \
                -name "$(basename $TF_VAR_vsphere_talos_template)" \
                -options $config_dir/talos-$talos_version-vmware-amd64.ova.json \
                $ova_path

              # Configure and finalize Talos VM
              vm_ipath="//$TF_VAR_vsphere_datacenter/vm/$TF_VAR_vsphere_talos_template"
              govc vm.upgrade -vm.ipath "$vm_ipath"
              govc vm.change -vm.ipath "$vm_ipath" \
                -g other6xLinux64Guest \
                -e disk.enableUUID=TRUE
              govc device.boot -vm.ipath "$vm_ipath" \
                -firmware efi \
                -secure=false
              govc vm.info -vm.ipath "$vm_ipath" -json > $config_dir/talos-$talos_version-amd64.json
              govc vm.markastemplate -vm.ipath "$vm_ipath"

from talos.

rfakit avatar rfakit commented on June 27, 2024

dmesg | grep loop

[12987550.077101] XFS (loop7p3): Superblock has unknown read-only compatible features (0x8) enabled.
[12987550.077223] XFS (loop7p3): Attempted to mount read-only compatible filesystem read-write.
[12987550.077224] XFS (loop7p3): Filesystem can only be safely mounted read only.
[12987550.077232] XFS (loop7p3): SB validate failed with error -22.

from talos.

smira avatar smira commented on June 27, 2024

Looks like your Linux kernel on Ubuntu 20.04 is incompatible with the newer xfs options used by Talos, unfortunately we can't provide a workaround here. You need to use newer kernel release, or run in a VM which has newer kernel.

You can also use Image Factory.

from talos.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.