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

[BUG] Received an HTTP 401 response - Reason: No ticket #82

Open
fnoir opened this issue Mar 8, 2021 · 2 comments
Open

[BUG] Received an HTTP 401 response - Reason: No ticket #82

fnoir opened this issue Mar 8, 2021 · 2 comments

Comments

@fnoir
Copy link

fnoir commented Mar 8, 2021

Describe the bug
I am trying to create a VM with the Debian 10 cloud image on an ZFS datastore.

Terraform cannot continue because of this error:

module.vm.proxmox_virtual_environment_file.debian_cloud_image: Creating...
module.vm.proxmox_virtual_environment_file.debian_cloud_image: Still creating... [10s elapsed]
module.vm.proxmox_virtual_environment_file.debian_cloud_image: Still creating... [20s elapsed]
module.vm.proxmox_virtual_environment_file.debian_cloud_image: Still creating... [30s elapsed]
module.vm.proxmox_virtual_environment_file.debian_cloud_image: Still creating... [40s elapsed]
module.vm.proxmox_virtual_environment_file.debian_cloud_image: Still creating... [50s elapsed]
module.vm.proxmox_virtual_environment_file.debian_cloud_image: Still creating... [1m0s elapsed]
module.vm.proxmox_virtual_environment_file.debian_cloud_image: Still creating... [1m10s elapsed]
module.vm.proxmox_virtual_environment_file.debian_cloud_image: Still creating... [1m20s elapsed]

Error: Received an HTTP 401 response - Reason: No ticket

  on vm/vm_test.tf line 53, in resource "proxmox_virtual_environment_file" "debian_cloud_image":
  53: resource "proxmox_virtual_environment_file" "debian_cloud_image" {

To Reproduce
Steps to reproduce the behavior:

  1. terraform apply

Other

resource "proxmox_virtual_environment_vm" "ubuntu_vm" {
  name        = "vm-test"
  description = "Managed by Terraform"

  node_name = "pve"
  vm_id     = 100

  agent {
    enabled = true
  }

  cpu {
    cores   = 4
    sockets = 1
  }

  disk {
    datastore_id = "local-zfs"
    size         = 30
    file_id      = proxmox_virtual_environment_file.debian_cloud_image.id
    interface    = "scsi0"
  }

  initialization {
    ip_config {
      ipv4 {
        address = "dhcp"
      }
    }

    user_account {
      username = "test"
      password = "password"
    }
  }

  memory {
    dedicated = 4096
  }

  network_device {
    bridge = "vmbr0"
    model  = "virtio"
  }

  operating_system {
    type = "l26"
  }

  serial_device {}
}

resource "proxmox_virtual_environment_file" "debian_cloud_image" {
  content_type = "iso"
  datastore_id = "local"
  node_name    = "pve"

  source_file {
    file_name = "debian-10-202103041056-openstack-amd64"
    path      = "https://cloud.debian.org/images/cloud/OpenStack/current/debian-10-openstack-amd64.qcow2"
  }
}
@initialed85
Copy link

I was getting this because I had my endpoint set to https://(ip):8006/api2/json rather than just https://(ip):8006

@magikid
Copy link

magikid commented Jul 16, 2021

I can confirm the same thing. With my endpoint ending in /api2/json/, I got the 401 error but it was resolved when I removed that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants