Comments (14)
web ~ [0]# systemctl status qemu-guest-agent.service
● qemu-guest-agent.service - QEMU Guest Agent
Loaded: loaded (/lib/systemd/system/qemu-guest-agent.service; static)
Active: active (running) since Wed 2024-05-08 17:59:16 UTC; 4s ago
Main PID: 148060 (qemu-ga)
Tasks: 2 (limit: 2309)
Memory: 688.0K
CPU: 6ms
CGroup: /system.slice/qemu-guest-agent.service
└─148060 /usr/sbin/qemu-ga
May 08 17:59:16 lrhq-web.linuxrocker.cloud systemd[1]: Started QEMU Guest Agent.
I did restart it a moment ago, because it was having some errors for guest ping
in the logs, but they weren't recent.
And after the restart, a terraform plan
still shows that it wants to change the disk.
# proxmox_virtual_environment_vm.vms["web"] will be updated in-place
~ resource "proxmox_virtual_environment_vm" "vms" {
id = "100"
name = "web"
# (27 unchanged attributes hidden)
~ disk {
~ size = 50 -> 100
# (11 unchanged attributes hidden)
}
# (8 unchanged blocks hidden)
}
from terraform-provider-proxmox.
One question about the step 1: have you cloned the VM from a template / another VM, or created from scratch?
from terraform-provider-proxmox.
It is a full clone (not a linked clone) from a template.
I'm also not sure if relevant, but the template uses an image of Ubuntu's cloud-init images.
from terraform-provider-proxmox.
@mattburchett You need to install and enable, qemu-guest-agent to target VM, because after resizing the VM requires a reboot, and without an agent this is not possible even from the interface proxmox. Install you may do with cloud-init, and add agent = true to target VM
from terraform-provider-proxmox.
@mattburchett You need to install and enable, qemu-guest-agent to target VM, because after resizing the VM requires a reboot, and without an agent this is not possible even from the interface proxmox. Install you may do with cloud-init, and add agent = true to target VM
It does have qemu-guest-agent enabled.
![image](https://private-user-images.githubusercontent.com/783042/328988235-f896eaab-7382-4816-a9ef-410687958603.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjE3NjIyODAsIm5iZiI6MTcyMTc2MTk4MCwicGF0aCI6Ii83ODMwNDIvMzI4OTg4MjM1LWY4OTZlYWFiLTczODItNDgxNi1hOWVmLTQxMDY4Nzk1ODYwMy5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwNzIzJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDcyM1QxOTEzMDBaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT04OWQxZTZmZGM2ZTYwOTc5ZWIyY2QxODI4NGM3ZjhkMjJkYTg2Yjk4ODQwNDVhNjFjNTU5YzdhNjBkMGJlYWYzJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.889dCAkTYZojFDwpXs4KF6VceTH9QB3cl4A22eTzfVI)
And my Terraform config:
resource "proxmox_virtual_environment_vm" "vms" {
for_each = local.pve-hosts
name = each.key
description = "Managed by Terraform"
node_name = each.value.target-node
vm_id = split(".", each.value.ip.address)[3]
agent {
enabled = true
}
clone {
datastore_id = each.value.hardware.storage
retries = 10
node_name = "lrhq-pve"
vm_id = each.value.template
}
cpu {
cores = each.value.hardware.cores
sockets = 1
type = "host"
}
disk {
datastore_id = each.value.hardware.storage
interface = "virtio0"
size = each.value.hardware.disk_size
}
initialization {
datastore_id = each.value.hardware.storage
ip_config {
ipv4 {
address = "${each.value.ip.address}/${each.value.ip.cidr}"
gateway = each.value.ip.gw
}
}
user_data_file_id = proxmox_virtual_environment_file.ubuntu_cloud_config[each.key].id
}
lifecycle {
ignore_changes = [
initialization[0].user_data_file_id
]
}
memory {
dedicated = each.value.hardware.memory
}
network_device {}
on_boot = true
operating_system {
type = "l26"
}
serial_device {}
depends_on = [cloudflare_record.proxmox-pve-dns]
}
from terraform-provider-proxmox.
@mattburchett Please check status of agent on this VM ?
from terraform-provider-proxmox.
@mattburchett Hmm... I can't reproduce this issue in my simple test. 🤔
Does your template VM have more than one disk? Could you possibly take a screenshot of its hardware configuration and post it here?
from terraform-provider-proxmox.
Sure thing.
![image](https://private-user-images.githubusercontent.com/783042/329741657-94c1b9a3-a4bd-4019-ad4f-af7a233954d0.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjE3NjIyODAsIm5iZiI6MTcyMTc2MTk4MCwicGF0aCI6Ii83ODMwNDIvMzI5NzQxNjU3LTk0YzFiOWEzLWE0YmQtNDAxOS1hZDRmLWFmN2EyMzM5NTRkMC5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwNzIzJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDcyM1QxOTEzMDBaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT03MTY1MzVmYmE2MDBhZTIwZGZiMmMzOTc4MmNhZTdkNjBiMzk5YTk1ZWFiNzliOGQ4ZmQ3YmU5ZWU3ZDhiZjIyJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.VnNNPfgTKxc6CPh41HoAk4K_bFlx4FRarBhoI2VkA1E)
I'll also toss in the information for my template creation:
resource "proxmox_virtual_environment_file" "ubuntu_jammy_template" {
content_type = "iso"
datastore_id = "local"
node_name = "lrhq-pve"
source_file {
path = "https://cloud-images.ubuntu.com/jammy/current/jammy-server-cloudimg-amd64.img"
}
}
resource "proxmox_virtual_environment_vm" "ubuntu-jammy-template" {
name = "ubuntu-jammy-template"
description = "Managed by Terraform"
node_name = "lrhq-pve"
vm_id = 9006
cpu {
cores = 1
sockets = 1
type = "kvm64"
flags = ["+aes"]
}
disk {
datastore_id = "local-zfs"
file_id = proxmox_virtual_environment_file.ubuntu_jammy_template.id
interface = "virtio0"
}
on_boot = false
started = false
template = true
}
from terraform-provider-proxmox.
Well, that's interesting. I actually wonder if it's a proxmox bug.
On the VM, I can see the disk increase took place:
web ~ [0]# df -h /
Filesystem Size Used Avail Use% Mounted on
/dev/vda1 97G 19G 79G 19% /
But when I view the hardware for the VM in Proxmox, it shows a disk size of 50G.
![image](https://private-user-images.githubusercontent.com/783042/329751276-8684f735-57dc-4e76-8410-a57c2a978e43.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjE3NjIyODAsIm5iZiI6MTcyMTc2MTk4MCwicGF0aCI6Ii83ODMwNDIvMzI5NzUxMjc2LTg2ODRmNzM1LTU3ZGMtNGU3Ni04NDEwLWE1N2MyYTk3OGU0My5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwNzIzJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDcyM1QxOTEzMDBaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT00MjZiMmZiMjQzMzAyMmI3Yzg3NGUyNjMxYWM0MjQwYzVkNDdmNDBmZGQ0MDhiOTgxNmI5NTViMWViYWVlYjI2JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.N5UzaT_yQDl9hn-qirrvRIcUVWL_k_OhpwatH15j94w)
I'm going to try and run some proxmox updates to bring myself to the latest version, and I'll test with another VM and see if I can replicate it.
from terraform-provider-proxmox.
Yeah, I think this might be a proxmox bug. It still happened on my test VM after an update to 8.2.2 (from 8.0).
I found someone with the same issue, but with a LXC container: https://bugzilla.proxmox.com/show_bug.cgi?id=305
I gave some information over there to see if it's a bug on their end.
from terraform-provider-proxmox.
Hmm... I've tried your exact template & vm on both ZFS and LVM storages, and had no issues. PVE v8.2.2 as well. Perhaps something specific to your ZFS config?
from terraform-provider-proxmox.
I'm not certain honestly. I don't think I've done anything specific with ZFS on Proxmox. It's pretty much a bog-standard single-node install with ZFS in a RAIDZ2, with ZFS on root, all done through the installer.
I do have some server setup that is done via Ansible, but nothing that messes with the storage arrays. It pretty much just installs monitoring and sets up my shell.
from terraform-provider-proxmox.
@mattburchett Is there is hardwar RAID controller where ZFS runs on? If so this is not supported and recommended by ZFS because ZFS "likes" to see all disks directly and some some features even require this, e.g. to protect against silent bitrot.
from terraform-provider-proxmox.
Proxmox is running on a PowerEdge R430 with a PERC H730 Mini. The PERC is not configured and is just passing the devices through via JBOD.
![image](https://private-user-images.githubusercontent.com/783042/330159068-649ca950-6e14-43e1-9410-c7ee7972aabc.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjE3NjIyODAsIm5iZiI6MTcyMTc2MTk4MCwicGF0aCI6Ii83ODMwNDIvMzMwMTU5MDY4LTY0OWNhOTUwLTZlMTQtNDNlMS05NDEwLWM3ZWU3OTcyYWFiYy5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwNzIzJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDcyM1QxOTEzMDBaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT0zNjRiNDZjZTY2NGQwOTU4YTQxYzIyNDRhYjdmZWQyZjM3YzE1ZjgzMDYzOGMzNWIzNTIyNDg5NGZhNWYwZjk2JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.DxC_sllLvv2TNf1f_ORnlMhfmZOCbKI64YnhIh0zV8E)
A zpool status
from the host:
lrhq-pve ~ [0]# zpool status
pool: rpool
state: ONLINE
scan: scrub repaired 0B in 01:11:57 with 0 errors on Sun May 12 01:35:58 2024
config:
NAME STATE READ WRITE CKSUM
rpool ONLINE 0 0 0
raidz2-0 ONLINE 0 0 0
ata-Samsung_SSD_870_EVO_1TB_S6PTNS0W113188Z-part3 ONLINE 0 0 0
ata-Samsung_SSD_870_EVO_1TB_S6PTNM0TA47793P-part3 ONLINE 0 0 0
ata-Samsung_SSD_870_EVO_1TB_S6PTNS0W113144X-part3 ONLINE 0 0 0
ata-Samsung_SSD_870_EVO_1TB_S6PTNM0TA47728D-part3 ONLINE 0 0 0
ata-Samsung_SSD_870_EVO_1TB_S6PTNS0W113153M-part3 ONLINE 0 0 0
ata-Samsung_SSD_870_EVO_1TB_S6PTNM0TA47790F-part3 ONLINE 0 0 0
ata-Samsung_SSD_870_EVO_1TB_S6PTNM0TA48482L-part3 ONLINE 0 0 0
ata-Samsung_SSD_870_EVO_1TB_S6PTNM0TA49482Y-part3 ONLINE 0 0 0
errors: No known data errors
from terraform-provider-proxmox.
Related Issues (20)
- Cannot create volume mount point in LXC HOT 7
- Add support for `proxmox_virtual_environment_file` data source HOT 4
- Terraform VM Creation crashes plugin when adding ipv4 configuration to VM HOT 3
- Context Deadline Exceeded only on certain resources HOT 11
- Using Cloud Init package_upgrade: false HOT 1
- Error: resizing disk: error waiting for VM disk resize: All attempts fail: HOT 5
- After import command or block, unprivileged forces replacement HOT 2
- Live Migration error: retrieving VM 100: the requested resource does not exist HOT 3
- Recommended way to get Packer built VM ID into Terraform control HOT 9
- proxmox_virtual_environment_vm.virtual_machine already exists error HOT 2
- Please add new arguments and attributes to the `proxmox_virtual_environment_vms` data source HOT 2
- Unknown timezone "Europe/Amsterdam" with proxmox_virtual_environment_time HOT 2
- Changing disk size of 'proxmox_virtual_environment_container' forces replacement HOT 4
- proxmox_virtual_environment_download_file can't read metadata HOT 2
- CloudImage size changes forces replacement of VM HOT 2
- proxmox_virtual_environment_vm forces replacement by unchanged initialization.user_account.keys HOT 2
- A question about documentation related to the proxmox_virtual_environment_container resource
- Error listing files from datastore using API Token as credentials HOT 2
- Unable to download iso (OpenTofu) HOT 2
- proxmox_virtual_environment_network_linux_bridge additional config
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from terraform-provider-proxmox.