This message was deleted.
# harvester
a
This message was deleted.
g
you can use the
os.write_files
in harvester config.. the installer will read and apply all yaml files in /oem.. so something like this will work..
Copy code
os:
  write_files:
  - content: |
      name: "reload ixgbe module"
      stages:
        boot:
          - commands:
            - rmmod ixgbe && modprobe ixgbe
    path: /oem/99_ixgbe.yaml
this will write a file
/oem/99_ixgbe.yaml
and that will be executed after the
/oem/90_custom.yaml
b
perfect. thank you very much @great-bear-19718. it would be awesome if we can add this example in Harvester docs
Copy code
ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
2: enp7s0: <BROADCAST,MULTICAST,SLAVE,UP,LOWER_UP> mtu 1400 qdisc mq master mgmt-bo state UP group default qlen 1000
    link/ether 7c:10:c9:21:f3:36 brd ff:ff:ff:ff:ff:ff
3: mgmt-br: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1400 qdisc noqueue state UP group default qlen 1000
    link/ether 7c:10:c9:21:XX:XX brd ff:ff:ff:ff:ff:ff
    inet 144.76.XX.XX/27 brd 144.76.XX.XX scope global mgmt-br
       valid_lft forever preferred_lft forever
4: mgmt-bo: <BROADCAST,MULTICAST,MASTER,UP,LOWER_UP> mtu 1400 qdisc noqueue master mgmt-br state UP group default qlen 1000
    link/ether 7c:10:c9:21:f3:36 brd ff:ff:ff:ff:ff:ff
5: mgmt-br.4000@mgmt-br: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1400 qdisc noqueue state UP group default qlen 1000
    link/ether 7c:10:c9:21:f3:36 brd ff:ff:ff:ff:ff:ff
    inet 10.1.1.10/24 brd 10.1.1.255 scope global mgmt-br.4000
       valid_lft forever preferred_lft forever
    inet 10.1.1.100/32 scope global mgmt-br.4000
       valid_lft forever preferred_lft forever
9: cali296fc1af7ea@if3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1450 qdisc noqueue state UP group default
    link/ether ee:ee:ee:ee:ee:ee brd ff:ff:ff:ff:ff:ff link-netns cni-7dbaa863-2bc9-a54c-007d-4794756b6189
....

ip r
default via 144.76.XX.XX dev mgmt-br proto dhcp
10.1.0.0/16 via 10.1.1.1 dev mgmt-br.4000
10.1.1.0/24 dev mgmt-br.4000 proto kernel scope link src 10.1.1.10
10.52.0.172 dev cali296fc1af7ea scope link
...
If I remove the default route and change the default route to mgmt-br then restart harvester, everything works.
Copy code
ip route delete default via 144.76.XX.XX dev mgmt-br proto dhcp
ip route add default via 10.1.1.1
~- of course, we will make the changes persistent Harvester config:~
Copy code
managementinterface:
    interfaces:
    - name: enp7s0
      hwaddr: 7c:10:c9:21:XX:XX
    method: static
    ip: 10.1.1.10
    subnetmask: 255.255.255.0
    gateway: 10.1.1.1
    defaultroute: true
    bondoptions:
      miimon: "100"
      mode: active-backup
    mtu: 1400
    vlanid: 4000
  vip: 10.1.1.100
  viphwaddr: ""
  vipmode: static
The problem is that on 10.1.1.1 we don’t have internet, that’s why I’ve set the default route via
mgmt-br
gateway
f
hi, any idea what's the maximum filesize written using this method? Wondering if there is a way to increase size of COS_OEM, as I guess this is what would address the issue here. I tried my luck with simply adding more RAM and bigger vda, but didn't help. What I attempted was to use os.write_files to store binary file of 7MB and installation of harvester v1.1.1 fails with the following message:
Copy code
Checking 15 images in /tmp/images-lists/rke2-images.linux-amd64-v1.24.7-rke2r1.txt...
done
cp: error writing `/run/cos/target/oem/install/console/log`: No space left on device

** Installation Failed **
You can see the full installation log by:
   - Press CTRL + ALT + F2 to switch to a different TTY console.
   - Login with user "rancher" (password is "rancher").
   - Run the command: less /var/log/console.log.