Commit Graph

19 Commits

Author SHA1 Message Date
Jake Schurch
36430fbb14 revert(proxmox-image): pull request #246120 from jakeschurch/add-proxmox-image-addl-disk-size-override
NOTES:

@jakeschurch did not realize that is was already updated on master, but not
backported to 23.05 channel

Signed-off-by: Jake Schurch <jakeschurch@gmail.com>
2023-08-02 15:01:44 -04:00
Pol Dellaiera
71e3934d82
Merge pull request #246120 from jakeschurch/add-proxmox-image-addl-disk-size-override
proxmox-image: add additionalDiskSpace parameter as input to make-disk-image.nix
2023-07-30 20:34:00 +02:00
Jake Schurch
a479735162 respond to pr feedback
Signed-off-by: Jake Schurch <jakeschurch@gmail.com>
2023-07-30 12:01:03 -04:00
Jake Schurch
d780bdf308
Update nixos/modules/virtualisation/proxmox-image.nix
Co-authored-by: Pol Dellaiera <pol.dellaiera@protonmail.com>
2023-07-30 11:57:29 -04:00
Jake Schurch
f2794786fd proxmox-image: add additionalDiskSpace parameter as input to make-disk-image.nix 2023-07-29 20:47:46 -04:00
Emily
49c07cd259
Merge pull request #238735 from MayNiklas/proxmox-image-settings
nixos/proxmox-image: add additionalSpace, bootSize and diskSize options
2023-07-27 22:17:42 +02:00
Sandro Jäckel
2048a8ca02
nixos/proxmox-image: fix example rendering 2023-06-30 18:14:43 +02:00
MayNiklas
d7f89bbfb6 nixos/proxmox-image: add additionalSpace, bootSize and diskSize options 2023-06-21 14:13:03 +02:00
illustris
6a20c13258
nixos/proxmox-image: fix qemu build failure 2023-05-25 16:25:43 +05:30
Mark Ruvald Pedersen
66fb2f539a nixos/proxmox-image: Disable O_DIRECT to fix assert
Context summary:
'vma create' can't otherwise write to tmpfs such as /dev/shm.
This is important when used from non-nixos machines which may
have /build as tmpfs.

VMA is Proxmox's virtual machine image format that wraps QEMU images,
augmenting these with proxmox-specific configuration file.
proxmox-image.nix uses the VMA tool to create vma image files.
The VMA tool exists as a patchset ontop of QEMU.

VMA writes its output with open() and O_DIRECT flag.
O_DIRECT does not work on Linux tmpfs [1]. Thus:
$ vma create ~/output.vma ...  # works, assuming home isn't tmpfs.
$ vma create /dev/shm/output.vma ...  # fails since /dev/shm is tmpfs
Failure results in assert(*errp == NULL).

O_DIRECT is a cache performance hint.
But it currently blocks our usage of nixos-generate -f proxmox from
Non-NixOS hosts and Docker.

The patch here simply removes O_DIRECT:
vma-writer.c later performs memalign due to O_DIRECT, but this is
safe to do with or without O_DIRECT.
Ideally, this should be fixed in upstream Proxmox: Perhaps by falling
back to open without O_DIRECT.

Another attempt to fix this SIGABRT is [2], which writes the vma file
directory to $out/ folder -- however that may still be tmpfs mounted
which it is in our case.

[1] https://lore.kernel.org/lkml/45A29EC2.8020502@tmr.com/t/
[2] https://github.com/NixOS/nixpkgs/pull/224282
2023-05-08 12:33:41 +02:00
Alan Strohm
121fddc901 nixos/proxmox-image: don't assume virtio0 is using local-lvm storage 2023-03-31 18:42:01 -07:00
figsoda
6bb0dbf91f nixos: fix typos 2022-12-17 19:31:14 -05:00
Oto Petřík
4729d5d7f6 nixos/proxmox-image: allow building UEFI images
Allow building other than Legacy-BIOS-only Proxmox images.
Default is unchanged.

To build UEFI proxmox image use:
  proxmox.qemuConf.bios = "ovmf";
(default is "seabios")

To build image bootable using both "seabios" and "ovmf" use:
  partitionTableType = "hybrid";
BIOS can be switched in Proxmox between "seabios" and "ovmf" and VM still boots.
(GRUB2-only, systemd-boot does not boot under "seabios")

To build systemd-boot UEFI image:
  proxmox.qemuConf.bios = "ovmf";
  boot.loader.systemd-boot.enable = true;
2022-11-09 03:19:42 +01:00
illustris
e7ec55a72d
nixos/proxmox-image: fix broken build, reduce build time 2022-09-08 08:26:02 +05:30
illustris
9cf89797e6 nixos/proxmox-image: add hydra-build-products definition 2022-08-22 14:57:57 -04:00
illustris
265e6a668e nixos/proxmox-image: qemu 6.2.0 -> 7.0.0 and fix failing build 2022-08-22 14:57:57 -04:00
pennae
6039648c50 nixos/*: automatically convert option docs 2022-08-19 22:40:58 +02:00
illustris
f60f165501 nixos/proxmox-image: use qemu 6.2 for building VMA 2022-07-13 10:44:41 +02:00
illustris
8d197bffd8
nixos/proxmox-image: init (#144013)
Co-authored-by: Sandro <sandro.jaeckel@gmail.com>
2021-11-07 16:02:54 +01:00