Flatcar + Packer

270 views
Skip to first unread message

Marc Pires

unread,
Feb 10, 2021, 7:52:42 AM2/10/21
to Flatcar Container Linux User
HI everyone, I am creating an appliance with Flatcar using packer on ESXi 6.7, currently the VM is created correctly, ignition file copied correctly via packer file provisioner. But when I try do run sudo flatcar-install -d /dev/sda -C {{user `release` }}  -i /tmp/ignition_esxi.json, I get the following error:

==> vmware-iso: Error: return code 4 from VERSION_ID=$(wget -qO- "${VERSIONTXT_URL}" | sed -n 's/^FLATCAR_VERSION=//p')

I kept this VM around to log into it and even running the command manually, I get this error.

Thanks for the help

Marc Pires

unread,
Feb 10, 2021, 7:55:46 AM2/10/21
to Flatcar Container Linux User
Tried to echo this VERSIONTXT_URL variable and it's undefined

Marga Manterola

unread,
Feb 10, 2021, 8:48:40 AM2/10/21
to Marc Pires, Flatcar Container Linux User
The line that's failing comes from the flatcar-install script:

The URL is constructed from other variables:
VERSIONTXT_URL="${BASE_URL}/${VERSION_ID}/version.txt"

With BASE_URL probably being:
BASE_URL="https://${CHANNEL_ID}.release.flatcar-linux.net/${BOARD}"

You could try executing that script with bash -x and see if you get more information as to why it's not working.

--
You received this message because you are subscribed to the Google Groups "Flatcar Container Linux User" group.
To unsubscribe from this group and stop receiving emails from it, send an email to flatcar-linux-u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/flatcar-linux-user/1719604d-7dba-4b9f-90e9-4b0bef658f03n%40googlegroups.com.


--
Regards,
Marga


--- Kinvolk GmbH | Adalbertstr.6a, 10999 Berlin | tel: +491755589364 Geschäftsführer/Directors: Alban Crequy, Chris Kühl, Iago López Galeiras Registergericht/Court of registration: Amtsgericht Charlottenburg Registernummer/Registration number: HRB 171414 B Ust-ID-Nummer/VAT ID number: DE302207000

Kai Lüke

unread,
Feb 10, 2021, 9:41:49 AM2/10/21
to Marga Manterola, Marc Pires, Flatcar Container Linux User
Hi,
what should the value of "{{user `release` }}" be? This looks like a
templating language problem. The allowed values are "stable", "beta",
"alpha" but if you just care about Stable, you can leave this
parameter out.
Regards,
Kai
> To view this discussion on the web visit https://groups.google.com/d/msgid/flatcar-linux-user/CAEjcxtLprp_D_QWdjfOPxSw9AC1LNZCcqoQmNYtp0pFjBmys5g%40mail.gmail.com.



--

Marc Pires

unread,
Feb 12, 2021, 2:11:16 PM2/12/21
to Flatcar Container Linux User
ssh access is not the issue anymore, but when downloading some Docker images noted my filesystem is like tmpfs  4.8G  1.4G  3.4G  30% / instead of /dev/sda9 18G 7.0G 9.4G 43% /. I have no ideia why this happens as the VM disk is thin provisioned on ESXi and 20GB

Any idea on what can cause this ? Thanks again.

Marc Pires

unread,
Feb 12, 2021, 2:16:27 PM2/12/21
to Flatcar Container Linux User
sudo cgpt show /dev/sda show the following result
       start        size    part  contents
           0           1          Hybrid MBR
           1           1          Pri GPT header
           2          32          Pri GPT table
        4096      262144       1  Label: "EFI-SYSTEM"
                                  Type: EFI System Partition
                                  UUID: 735CD954-5D65-4374-94DC-8AA28E1B6479
                                  Attr: Legacy BIOS Bootable
      266240        4096       2  Label: "BIOS-BOOT"
                                  Type: BIOS Boot Partition
                                  UUID: B66B71E2-A87A-417B-84C5-1CCCDA320F53
      270336     2097152       3  Label: "USR-A"
                                  Type: Alias for coreos-rootfs
                                  UUID: 7130C94A-213A-4E5A-8E26-6CCE9662F132
                                  Attr: priority=1 tries=0 successful=1
     2367488     2097152       4  Label: "USR-B"
                                  Type: Alias for coreos-rootfs
                                  UUID: E03DD35C-7C2D-4A47-B3FE-27F15780A57C
                                  Attr: priority=0 tries=0 successful=0
     4464640      262144       6  Label: "OEM"
                                  Type: Alias for linux-data
                                  UUID: AFB553B8-0EE5-4F56-BACB-4D11FB78563F
     4726784      131072       7  Label: "OEM-CONFIG"
                                  Type: CoreOS reserved
                                  UUID: 6BE49455-0D76-473C-BC67-19A1B42034F8
     4857856     4427776       9  Label: "ROOT"
                                  Type: CoreOS auto-resize
                                  UUID: 6EBC51D9-BB5D-4CFA-A046-739BBB523B65
    40959967          32 INVALID  Sec GPT table
           1           1 INVALID  Sec GPT header

Marc Pires

unread,
Feb 12, 2021, 2:23:51 PM2/12/21
to Flatcar Container Linux User
Some warnings in Flatcar console

flatcar-warnings.png

Kai Lüke

unread,
Feb 15, 2021, 4:53:47 AM2/15/21
to Marc Pires, Flatcar Container Linux User
After the installation to disk finished, you need to reboot and boot from disk (I assume you booted from PXE before). Actually I don't know why you even need flatcar-install on a hypervisor when you can just use the regular image directly, maybe you can change your approach - in the future it would be better if you have one longer message that contains all the context and focuses on one Flatcar-specific question, otherwise it's hard for others to help.

Marc Pires

unread,
Feb 15, 2021, 11:42:36 AM2/15/21
to Flatcar Container Linux User
The flatcar-install is running on VM on ESXi not the hypervisor itself. Other thing a noticed is that flatcar is not aware the VM disk is 19Gb

Marc Pires

unread,
Feb 15, 2021, 12:03:46 PM2/15/21
to Flatcar Container Linux User
Running fdisk got this.

sudo fdisk -l
Disk /dev/loop0: 453.8 MiB, 475783168 bytes, 929264 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


The backup GPT table is not on the end of the device. This problem will be corrected by write.
Disk /dev/sda: 19.5 GiB, 20971520000 bytes, 40960000 sectors
Disk model: Virtual disk    
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 00000000-0000-0000-0000-000000000001

Device       Start     End Sectors  Size Type
/dev/sda1     4096  266239  262144  128M EFI System
/dev/sda2   266240  270335    4096    2M BIOS boot
/dev/sda3   270336 2367487 2097152    1G unknown
/dev/sda4  2367488 4464639 2097152    1G unknown
/dev/sda6  4464640 4726783  262144  128M Linux filesystem
/dev/sda7  4726784 4857855  131072   64M unknown
/dev/sda9  4857856 9285631 4427776  2.1G unknown


You received this message because you are subscribed to a topic in the Google Groups "Flatcar Container Linux User" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/flatcar-linux-user/KqrhkfRfFzM/unsubscribe.
To unsubscribe from this group and all its topics, send an email to flatcar-linux-u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/flatcar-linux-user/1deac75e-e0f9-4f7b-ae35-fc7b2a499488n%40googlegroups.com.


--
Desenvolvedor/DevOps practitioner

https://www.credential.net/5yi8wpmv

Kai Lüke

unread,
Feb 15, 2021, 1:19:38 PM2/15/21
to Marc Pires, Flatcar Container Linux User
Looks good, you need to reboot after running flatcar-install and then on the first boot the installed system will extend the filesystem and partition to the end of the disk.

Reply all
Reply to author
Forward
0 new messages