-
Notifications
You must be signed in to change notification settings - Fork 542
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
physical disk passthrough - 500 Internal Server Error #1056
Comments
@Maxy-Paulo The following works on my end: disks {
virtio {
virtio3 {
passthrough {
file = "/dev/disk/by-id/scsi-0QEMU_QEMU_HARDDISK_drive-scsi3"
}
}
}
} This was tested with the current master branch against a virtual PVE 8.2.7 |
Hello, Current configuration
Full terraform file
The error is thrown when doing a terraform apply, and shows what looks like potentially an access rights issue
I tried with the suggested access rights, through a user as well as through a token that was assigned to the root user (seeing root is mentioned in the error), but it lead to the same error message Using:
I might definitely be doing something wrong. The manual command (as root, in cli) works to attach the disk to the vm (see op's message) . If of interest, it's a partition and not a full disk. |
@MagicMicky only user |
hey @Tinyblargon thanks for the reply there. Just to confirm, then it is only possible using a user / password login scheme right? |
@MagicMicky not everything works with api tokens. That's probably an issue in the Terraform provider or it's underlying library. |
Okay thanks! Upon further look into the issue I found the following that might be of interest if people ends up on this thread through search:
Seeing op's error (500) while trying to use a passthrough i would also say that it's likely that it relates to my issue - but can only assume that from this point. I'll go and try to getmy root user's mfa work with this provider then, but so far I've been facing 401s despite adding a OTP. It's unrelated to the issue here so i'll try to stop spamming here! Thanks for the fast replies though @Tinyblargon |
@MagicMicky if you can't get the mfa working, can you create a new issue. I'll look into it, never tried mfa myself. |
Hello,
I'm trying to create a "qemu" with a physical disk mounted directly (passthrough).
Clone is running fine, but vm configuration update fail with an API 500 error, without much information.
When removing the block "virtio3", the VM clone sucessfully and start, When i set back the block "virtio3", the same API error 500 occur.
Adding the passthrough disk manually to the VM works.
How could that be resolved ?
---- Error from terraform
31m╷�[0m�[0m
�[31m│�[0m �[0m�[1m�[31mError: �[0m�[0m�[1merror updating VM: 500 Internal Server Error, error status: {"data":null} (params: map[agent:1 bios:seabios boot:order=virtio0 cores:2 cpu:host description:hvp-nomad-012 | NOMAD MEDIA hotplug:network,disk,usb ipconfig0:ip=192.168.1.92/24,gw=192.168.1.254 kvm:true memory:16384 name:hvp-nomad-012 nameserver:192.168.1.91 1.1.1.1 8.8.8.8 192.168.1.254 net0:virtio=7E:D3:48:69:0D:98,bridge=vmbr0 numa:false onboot:true ostype:l26 protection:false scsihw:virtio-scsi-pci searchdomain:potatokingdom.fr smbios1:uuid=3592152a-279b-42fa-9d5e-0f5d92610889 sockets:2 tablet:true tags:nomad;production virtio3:/dev/disk/by-id/wwn-0x6b083fe0e9520a002e19968217276c31,replicate=0 vmid:108])�[0m
�[31m│�[0m �[0m
�[31m│�[0m �[0m�[0m with proxmox_vm_qemu.hvp_nomad_012,
�[31m│�[0m �[0m on hvp-nomad-012.tf line 1, in resource "proxmox_vm_qemu" "hvp_nomad_012":
�[31m│�[0m �[0m 1: resource "proxmox_vm_qemu" "hvp_nomad_012" �[4m{�[0m�[0m
---- Terraform file
terraform {
required_providers {
proxmox = {
source = "Telmate/proxmox"
version = "3.0.1-rc3"
}
}
}
resource "proxmox_vm_qemu" "hvp_nomad_012" {
name = "hvp-nomad-012"
desc = "hvp-nomad-012 | NOMAD MEDIA"
tags = "production,nomad"
cores = 2
sockets = 2
cpu = "host"
memory = 16384
scsihw = "virtio-scsi-pci"
boot = "order=virtio0"
disks {
ide {
ide0 {
cloudinit {
storage = "local-lvm"
}
}
}
virtio {
virtio0 {
disk {
size = 10
cache = "writethrough"
storage = "local-lvm"
format = "raw"
iothread = true
backup = false
}
}
virtio1 {
disk {
size = 10
cache = "writethrough"
storage = "local-lvm"
format = "raw"
iothread = true
backup = false
}
}
virtio2 {
disk {
size = 30
cache = "writethrough"
storage = "local-lvm"
format = "raw"
iothread = true
backup = true
}
}
virtio3 {
passthrough {
file = "/dev/disk/by-id/wwn-0x6b083fe0e9520a002e19968217276c31"
}
}
}
}
}
---- Comand to add passthrough on proxmox directly (works)
qm set 108 -virtio4/dev/disk/by-id/wwn-0x6b083fe0e9520a002e19968217276c31,backup=0,cache=writethrough,iothread=1,replicate=0
The text was updated successfully, but these errors were encountered: