Skip to content

Commit 4122c50

Browse files
authored
Merge pull request #445 from roots/ubuntu-24-04
Ubuntu 24.04 support
2 parents 8b6976b + 7be0ab2 commit 4122c50

File tree

4 files changed

+16
-4
lines changed

4 files changed

+16
-4
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ Current supported settings:
193193
| Setting | Description | Type | Default |
194194
| --- | --- | -- | -- |
195195
| `manager` | VM manager (Options: `auto` (depends on OS), `lima`)| string | "auto" |
196-
| `ubuntu` | Ubuntu OS version (Options: `18.04`, `20.04`, `22.04`)| string |
196+
| `ubuntu` | Ubuntu OS version (Options: `18.04`, `20.04`, `22.04`, `24.04`)| string |
197197
| `hosts_resolver` | VM hosts resolver (Options: `hosts_file`)| string |
198198
| `images` | Custom OS image | object | Set based on `ubuntu` version |
199199

cli_config/cli_config.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,8 @@ func (c *Config) LoadFile(path string) error {
5959
return fmt.Errorf("%w: unsupported value for `vm.manager`. Must be one of: auto, lima", InvalidConfigErr)
6060
}
6161

62-
if c.Vm.Ubuntu != "18.04" && c.Vm.Ubuntu != "20.04" && c.Vm.Ubuntu != "22.04" {
63-
return fmt.Errorf("%w: unsupported value for `vm.ubuntu`. Must be one of: 18.04, 20.04, 22.04", InvalidConfigErr)
62+
if c.Vm.Ubuntu != "18.04" && c.Vm.Ubuntu != "20.04" && c.Vm.Ubuntu != "22.04" && c.Vm.Ubuntu != "24.04" {
63+
return fmt.Errorf("%w: unsupported value for `vm.ubuntu`. Must be one of: 18.04, 20.04, 22.04, 24.04", InvalidConfigErr)
6464
}
6565

6666
if c.Vm.HostsResolver != "hosts_file" {

pkg/lima/ubuntu.go

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,4 +37,16 @@ var UbuntuImages = map[string][]Image{
3737
Arch: "aarch64",
3838
},
3939
},
40+
"24.04": {
41+
{
42+
Alias: "noble",
43+
Location: "https://cloud-images.ubuntu.com/noble/current/noble-server-cloudimg-amd64.img",
44+
Arch: "x86_64",
45+
},
46+
{
47+
Alias: "noble",
48+
Location: "https://cloud-images.ubuntu.com/noble/current/noble-server-cloudimg-arm64.img",
49+
Arch: "aarch64",
50+
},
51+
},
4052
}

trellis/trellis.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ var DefaultCliConfig = cli_config.Config{
4040
Vm: cli_config.VmConfig{
4141
Manager: "auto",
4242
HostsResolver: "hosts_file",
43-
Ubuntu: "22.04",
43+
Ubuntu: "24.04",
4444
},
4545
}
4646

0 commit comments

Comments
 (0)