abiosoft / abiosoft/colima

Both top-level 'rosetta' and 'vmOpts.vz.rosetta' are configured. Using vmOpts.vz.rosetta. Top-level 'rosetta' is deprecated.

Offen
#1,468 6 Kommentare 5 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
Go
Sterne
30.8k
Forks
613
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

### Description

We start `colima` with these flags:

```
"colima", "start",
"--cpu", cpuCores,
"--memory", memory,
"--disk", disk,
"--vm-type", "vz",
"--mount-type", "virtiofs",
"--vz-rosetta",
```

### Version

0.9.1

### Operating System

- [ ] macOS Intel <= 13 (Ventura)
- [ ] macOS Intel >= 14 (Sonoma)
- [ ] Apple Silicon <= 13 (Ventura)
- [x] Apple Silicon >= 14 (Sonoma)
- [ ] Linux

### Output of `colima status`

```
❯ colima status -e
INFO[0000] colima is running using macOS Virtualization.Framework
INFO[0000] arch: aarch64
INFO[0000] runtime: docker
INFO[0000] mountType: virtiofs
INFO[0000] docker socket: unix:///Users/XXX/Library/Preferences/colima/default/docker.sock
INFO[0000] containerd socket: unix:///Users/XXX/Library/Preferences/colima/default/containerd.sock
INFO[0000] cpu: 10
INFO[0000] mem: 18GiB
INFO[0000] disk: 100GiB
```

### Reproduction Steps

`colima start` and then you can see that warning written as the VM starts.

```
Both top-level 'rosetta' and 'vmOpts.vz.rosetta' are configured. Using vmOpts.vz.rosetta. Top-level 'rosetta' is deprecated.
```

### Expected behaviour

No warning is emitted

### Additional context

This is the `lima` code block: https://github.com/lima-vm/lima/blob/b114156708f29e989e5fbffbfa1e9ba64598f2a7/pkg/driver/vz/vz_driver_darwin.go#L168

```
//nolint:staticcheck // Migration of top-level Rosetta if specified
if (vzOpts.Rosetta.Enabled == nil && vzOpts.Rosetta.BinFmt == nil) && (!isEmpty(cfg.Rosetta)) {
logrus.Debug("Migrating top-level Rosetta configuration to vmOpts.vz.rosetta")
vzOpts.Rosetta = cfg.Rosetta
}
//nolint:staticcheck // Warning about both top-level and vmOpts.vz.Rosetta being set
if (vzOpts.Rosetta.Enabled != nil && vzOpts.Rosetta.BinFmt != nil) && (!isEmpty(cfg.Rosetta)) {
logrus.Warn("Both top-level 'rosetta' and 'vmOpts.vz.rosetta' are configured. Using vmOpts.vz.rosetta. Top-level 'rosetta' is deprecated.")
}
```

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.