Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Efidisk cannot parse disk size "528K" #314

Closed
RedPaes opened this issue Apr 24, 2023 · 4 comments · Fixed by #326
Closed

Efidisk cannot parse disk size "528K" #314

RedPaes opened this issue Apr 24, 2023 · 4 comments · Fixed by #326
Labels
🐛 bug Something isn't working

Comments

@RedPaes
Copy link

RedPaes commented Apr 24, 2023

Describe the bug
Clone a VM with Uefi & a efidisk fails. It canot parse the size string:

Error: failed to decode HTTP GET response (path: nodes/pmx07/qemu/103/config) - Reason: cannot parse disk size "528K"
Looks like the parser for Disks is missing a "K" option:

Didn't have a deep lool... But looks like it's related to: #86

To Reproduce

  1. Create a Template VM with an EFI Disk as seen in the screenshot below.
  2. Copy the VM with Terraform provider
  3. Copy will work, but terraform throws an error: Error: failed to decode HTTP GET response (path: nodes/pmx07/qemu/103/config) - Reason: cannot parse disk size "528K"
resource "proxmox_virtual_environment_vm" "windows_vm" {
  name        = var.vm_config.vm_name
  description = "Managed by Terraform"
  tags        = ["terraform", "win-10"]
  node_name = "${var.vm_config.pm_node}"
  clone {
    vm_id = "${var.vm_config.template_id}"
    retries = 3
  }
  agent {
    enabled = true
  }
  disk {
    datastore_id = var.vm_config.datastore_id
    file_format  = "raw" 
    interface    = "scsi0"
    size         = 80
  }
  disk {
    datastore_id = var.vm_config.datastore_id
    file_format  = "raw" 
    interface    = "efidisk0"
    size         = 1
  }
  cpu {
    cores = var.vm_config.cores
  }
  memory {
    dedicated = var.vm_config.ram_mb
  }


  network_device {
    bridge = var.vm_config.network_device
  }

  operating_system {
    type = "win10"
  }

 #}

Expected behavior
Should be able to parse efidisks.

Screenshots
See Efidisk: 512K
image

@RedPaes RedPaes added the 🐛 bug Something isn't working label Apr 24, 2023
@bpg
Copy link
Owner

bpg commented Apr 25, 2023

I think this will be fixed in #301

@RedPaes
Copy link
Author

RedPaes commented Apr 26, 2023

Thank you for your quick response.

I just had a look at the PR.
As i understand there is no fix for that specific problem currently:

{"error on unknown unit string", strPtr("2048K"), -1, true},

I'm not a go developer so maybe i miss something ;)

@bpg
Copy link
Owner

bpg commented Apr 27, 2023

Ah, you're right. There was a discussion in #86 (comment) where we decided to not support size < 1Gb, missing this use case.

@bpg
Copy link
Owner

bpg commented May 10, 2023

Well, this actually should be fixed in the new #326 😅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants