| 29 Oct 2024 |
| shift changed their profile picture. | 15:09:01 |
| 30 Oct 2024 |
| @karstenpedersen:matrix.org set a profile picture. | 19:03:44 |
| @karstenpedersen:matrix.org changed their profile picture. | 19:07:58 |
| 5 Nov 2024 |
| tuxiqae joined the room. | 16:14:29 |
| 6 Nov 2024 |
tuxiqae | Heyo, I'm trying to create an AWS AMI using an image I've created using Disko But now that I've uploaded the image onto S3 and tried importing it using aws ec2 import-image I get the following error (when describe-import-image-tasksing the task)
ClientError: Unable to find an etc directory with fstab.
Any idea what's the cause?
| 12:08:32 |
tuxiqae | My Disko config:
{
disko.devices = {
disk = {
main = {
device = "/dev/disk/by-id/some-disk-id";
type = "disk";
content = {
type = "gpt";
partitions = {
ESP = {
type = "EF00";
size = "500M";
content = {
type = "filesystem";
format = "vfat";
mountpoint = "/boot";
mountOptions = ["umask=0077"];
};
};
root = {
size = "100%";
content = {
type = "filesystem";
format = "ext4";
mountpoint = "/";
};
};
};
};
};
};
};
}
I think it might be caused by the device but I'm not sure what to set it to
| 12:17:08 |
tuxiqae | * My Disko (default) config:
{
disko.devices = {
disk = {
main = {
device = "/dev/disk/by-id/some-disk-id";
type = "disk";
content = {
type = "gpt";
partitions = {
ESP = {
type = "EF00";
size = "500M";
content = {
type = "filesystem";
format = "vfat";
mountpoint = "/boot";
mountOptions = ["umask=0077"];
};
};
root = {
size = "100%";
content = {
type = "filesystem";
format = "ext4";
mountpoint = "/";
};
};
};
};
};
};
};
}
I think it might be caused by the device but I'm not sure what to set it to
| 12:20:38 |
Arian | You need to use import-snapshot | 13:05:13 |
Arian | And then register-image | 13:05:18 |
Arian | Import-image is b0rked. It only imports images that follow FHS | 13:05:33 |
Arian | Doesn't work with nixos | 13:05:36 |
Arian | You can just use https://GitHub.com/nixos/amis upload_ami script | 13:05:55 |
Arian | It does all of this | 13:05:58 |
Arian | Or use it as inspiration | 13:06:05 |
tuxiqae | FML, wanted the ability to build a one-shot with Nix + Terranix that'll automatically provision the resources and start the instance | 13:11:41 |
Arian | You can import snapshots with Terraform | 13:15:56 |
Arian | And register the image too | 13:16:02 |
Arian | aws_ebs_snapshot_import resource | 13:16:35 |
Arian | Combine with aws_s3_bucket_item resource and aws_ami resource and you're done | 13:17:00 |
Arian | Something like https://gist.github.com/arianvp/14dd40742c24894bb312ac3f5b90b433 | 13:21:29 |
tuxiqae | Yeah, but in order to import a snapshot I'd have to first provision a VM and then export that
I wanted to just automatically create an image and upload that :( | 13:30:30 |
Arian | No ? | 13:31:05 |
tuxiqae | :O | 13:31:17 |
Arian | This example is literally importing from local disk? | 13:31:35 |
Arian | Just like import image | 13:31:38 |
Arian | See line 4 | 13:32:07 |
Arian | That's pointing to your local disk image you built | 13:32:28 |