Giter VIP home page Giter VIP logo

Comments (7)

bpg avatar bpg commented on August 9, 2024 1

I found the bug, 4Gb rootfs size is the default "magic number". Any value != 4 should work 🤦🏼
Will be fixed in the next release.

from terraform-provider-proxmox.

megastary avatar megastary commented on August 9, 2024

Nvm, now it does not work even with plain number.
Anyone knows why could that be happening?

from terraform-provider-proxmox.

bpg avatar bpg commented on August 9, 2024

Hi @megastary 👋🏼

Just a sanity check regarding the error message:

Reason: mount points configured, but 'rootfs' not set - aborting

Do you have the operating_system attribute configured in your template? It is not in the example you provided. 🤔

You can also check an example here. These templates are used as part of the integration test suite, which runs on every release.

from terraform-provider-proxmox.

LinuCC avatar LinuCC commented on August 9, 2024

I have the same problem in 0.55 as well as in 0.60, I just screwed around a bit and this helped:

  1. Commenting out mount_point and creating the container with terraform apply
  2. Uncommenting the mount_point block and adding its size at the end of the volume name:
  mount_point {
    volume = "local:1"
    size   = "1G"
    path   = "/mnt/foobar"
    backup = true
  }

Based on https://forum.proxmox.com/threads/unable-to-parse-directory-volume-name-with-pct-create.55373/post-254947 and the API request I got from the debug logs it seems like on creation the size in the volume param is missing.

Also:

  • operating_system configured to ubuntu
  • Proxmox v8.1.4

Trying a system update, maybe this'll fix it.

from terraform-provider-proxmox.

LinuCC avatar LinuCC commented on August 9, 2024

Right, after testing out your link @bpg I've been able to reproduce the error by lowering the disk.size of example_template from 10 to 4 (Which OP and me used as disk size):

resource "proxmox_virtual_environment_container" "example_template" {
  vm_id = 323

  start_on_boot = "true"

  disk {
    datastore_id = "local-zfs" // Hardcoded some vals to fit my Proxmox instance
    size         = 4
  }

  // ...
}

Do you have an idea why this would lead to that rootfs error?

Edit:

Thinking about it, maybe the container disk size is just too small for Ubuntu to work properly.
A disk.size of 5 works. But so does a disk.size of 2 and 3, just not 4.
No idea if this is just my system, maybe @megastary can validate this?

from terraform-provider-proxmox.

bpg avatar bpg commented on August 9, 2024

Thinking about it, maybe the container disk size is just too small for Ubuntu to work properly.

That is my guess as well. After you provisioned with size e.g. 5, can you check what is the reported root filesystem size on the deployed container?

EDIT: That's what I have with my example (10G + 4G mount):

Filesystem                         Size  Used Avail Use% Mounted on
/dev/mapper/pve-vm--2043--disk--1  9.8G  1.1G  8.2G  12% /
/dev/mapper/pve-vm--2043--disk--0  3.9G   28K  3.7G   1% /mnt/local
none                               492K  4.0K  488K   1% /dev
tmpfs                              2.0G     0  2.0G   0% /dev/shm
tmpfs                              784M  136K  784M   1% /run
tmpfs                              5.0M     0  5.0M   0% /run/lock
tmpfs                              392M  4.0K  392M   1% /run/user/0

Now sure why 4G rootfs is a limit. I can reproduce it too, so will try to debug.

from terraform-provider-proxmox.

LinuCC avatar LinuCC commented on August 9, 2024

Haha, great to hear! Thanks so much for picking up the terraform provider btw, incredibly helpful (when it works ;) )

from terraform-provider-proxmox.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.