Files
podman/pkg/domain/entities/machine.go
Lewis Roy 7b1055a5fb feat: Add support for configuring swap in Podman machine
Add `--swap` argument to `podman machine init` command.

Passing an int64 value to this flag will trigger the Podman machine
ignition file to be generated with a zram-generator.conf file containing
the --swap value as the zram-size argument.

This file is read by the zram-generator systemd service on boot
resulting in a zram swap device being created.

Fixes: https://github.com/containers/podman/issues/15980

Signed-off-by: Lewis Roy <lewis@redhat.com>
2025-04-29 12:20:24 +10:00

49 lines
1.6 KiB
Go

package entities
import "github.com/containers/podman/v5/libpod/define"
type ListReporter struct {
Name string
Default bool
Created string
Running bool
Starting bool
LastUp string
Stream string
VMType string
CPUs uint64
Memory string
Swap string
DiskSize string
Port int
RemoteUsername string
IdentityPath string
UserModeNetworking bool
}
// MachineInfo contains info on the machine host and version info
type MachineInfo struct {
Host *MachineHostInfo `json:"Host"`
Version define.Version `json:"Version"`
}
// MachineHostInfo contains info on the machine host
type MachineHostInfo struct {
Arch string `json:"Arch"`
CurrentMachine string `json:"CurrentMachine"`
// TODO(6.0): Change `DefaultName` to `ActiveMachineConnection` to fix address
// confusion as shown in https://github.com/containers/podman/issues/23353.
// The name `DefaultMachine` can cause confusion with the user in thinking that
// they can set a default podman machine via system connections. However,
// regardless of which system connection is default, the default podman machine
// will always be podman-machine-default.
DefaultMachine string `json:"DefaultMachine"`
EventsDir string `json:"EventsDir"`
MachineConfigDir string `json:"MachineConfigDir"`
MachineImageDir string `json:"MachineImageDir"`
MachineState string `json:"MachineState"`
NumberOfMachines int `json:"NumberOfMachines"`
OS string `json:"OS"`
VMType string `json:"VMType"`
}