Giter VIP home page Giter VIP logo

Comments (6)

bpg avatar bpg commented on August 9, 2024 8

Thanks for confirming, @zarinbal, and for offering help!

The disk management part in the provider is quite messy, especially when cloning templates. There are few open tickets for disks, and they are related to each other. On top of that there are dozens of use cases that provider needs to support, so we need to be careful making changes there.
I really need to set some time aside and think about reorganizing this part...

But please vote with 👍🏼 on the ticket to rise its priority.

from terraform-provider-proxmox.

Gizex avatar Gizex commented on August 9, 2024 2

Same problem

i tried to add or remove disk

resource "proxmox_virtual_environment_vm" "k8s_master_1" {
  vm_id               = 120
  name                = "k8s-master-1"
  node_name           = "prxmx"
  acpi                = true
  bios                = "seabios"
  boot_order          = null
  description         = null
  migrate             = false
  on_boot             = true
  reboot              = false
  scsi_hardware       = "virtio-scsi-pci"
  started             = true
  stop_on_destroy     = null
  tablet_device       = true
  tags                = []
  template            = false
  lifecycle {
   # prevent_destroy = true
  }
  cpu {
    architecture = "x86_64"
    cores        = 4
    flags        = []
    hotplugged   = 0
    limit        = 0
    numa         = true
    sockets      = 1
    type         = "host"
    units        = 1024
  }
  clone {
    vm_id = 1001
  }
  agent {
    enabled = true
    timeout = "15m"
    trim    = false
    type    = "virtio"
  }
  disk {
    cache             = "none"
    datastore_id      = "local-lvm"
    discard           = "ignore"
    file_format       = "raw"
    interface         = "scsi0"
    iothread          = false
    size              = 25
    ssd               = false
  }
  disk {
    cache             = "none"
    datastore_id      = "local-lvm"
    discard           = "ignore"
    file_format       = "raw"
    interface         = "scsi1"
    iothread          = false
    size              = 20
    ssd               = false
  }
  initialization {
    datastore_id         = "local-lvm"
    interface            = "ide2"
    ip_config {
      ipv4 {
        address = "10.0.0.120/24"
        gateway = "10.0.0.1"
      }
    }
  }
  memory {
    dedicated = 2048
    floating  = 0
    shared    = 0
  }
  network_device {
    bridge      = "vmbr0"
    enabled     = true
    firewall    = false
    model       = "virtio"
    mtu         = 0
    queues      = 0
    rate_limit  = 0
    vlan_id     = 0
  }
  serial_device {
    device = "socket"
  }
}

and then terraform tries to delete and recreate the VM.

image

i use latest version

version = "0.44.0"

from terraform-provider-proxmox.

bpg avatar bpg commented on August 9, 2024 1

still valid

from terraform-provider-proxmox.

zarinbal avatar zarinbal commented on August 9, 2024 1

Hello,

I've encountered similar issue with the provider when removing disks from a template.

Steps to Reproduce:

  1. Initial Configuration: Add two disks to the template as follows:
    # Disk 1: Boot
    disk {
      datastore_id = "fast"
      discard = "on"
      file_format = "raw"
      file_id = "shared-iso:iso/ubuntu-22.04-cloudimg-amd64-raw.img"
      interface = "scsi0"
      iothread = false
      size = 20
      ssd = true
    }
    # Disk 2: Data
    disk {
      cache = "none"
      datastore_id = "fast"
      discard = "on"
      file_format = "raw"
      interface = "scsi1"
      iothread = false
      size = 15
      ssd = true
    }``` 
    
  2. Removing a Disk:
    Attempting to remove a disk (e.g., the second disk) results in the template trying to recreate itself instead of just removing the specified disk. (See attached screenshot:

image

Expected Behavior:
The template should allow adding or removing a specified disk without attempting to recreate the entire VM.

I'm unsure whether to open a new issue for this or if it fits within the scope of the current one. Additionally, I'm willing to assist in resolving this issue; any guidance on contributing would be greatly appreciated.

Thank you

from terraform-provider-proxmox.

bpg avatar bpg commented on August 9, 2024

Awesomely detailed bug report, thanks!

from terraform-provider-proxmox.

github-actions avatar github-actions commented on August 9, 2024

Marking this issue as stale due to inactivity in the past 180 days. This helps us focus on the active issues. If this issue is reproducible with the latest version of the provider, please comment. If this issue receives no comments in the next 30 days it will automatically be closed. If this issue was automatically closed and you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thank you!

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.