[PR #108] [CLOSED] fix: better handling of boot order when running v.CloudInit() method #158

Closed
opened 2026-03-03 15:30:28 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/luthermonson/go-proxmox/pull/108
Author: @b-
Created: 12/16/2023
Status: Closed

Base: mainHead: patch-1


📝 Commits (1)

  • 36bd04c fix: better handling of boot order when running v.CloudInit() method

📊 Changes

1 file changed (+169 additions, -42 deletions)

View changed files

📝 virtual_machine.go (+169 -42)

📄 Description

Fixes running the v.CloudInit() method in the case that the boot devices parameter is unset. (Of course I wouldn't expect such a VM to boot, but I intended to set that option after feeding it a cloud-init ISO anyway, so I was surprised that it failed...)

Also adds some functions for messing with boot devices in general. Mostly because I'm extremely undecided with how we should alter the boot order when doing the CloudInit() method, or if we should even alter it in the first place.

I'm guessing the reason this method changes the boot order is to make sure that the added cloud-init ISO is not the first boot device? So I'm not sure if we should just remove it from the boot order entirely, or if we should set it to the last boot device.

I'm not marking this as a draft because it's working code that's certainly not going to cause issues merging in, but there's an unused function in here and in general I can be pretty verbose in my function naming...


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/luthermonson/go-proxmox/pull/108 **Author:** [@b-](https://github.com/b-) **Created:** 12/16/2023 **Status:** ❌ Closed **Base:** `main` ← **Head:** `patch-1` --- ### 📝 Commits (1) - [`36bd04c`](https://github.com/luthermonson/go-proxmox/commit/36bd04c5546293312ca41748e8e522d85ee1b7bb) fix: better handling of boot order when running v.CloudInit() method ### 📊 Changes **1 file changed** (+169 additions, -42 deletions) <details> <summary>View changed files</summary> 📝 `virtual_machine.go` (+169 -42) </details> ### 📄 Description Fixes running the v.CloudInit() method in the case that the boot devices parameter is unset. (Of course I wouldn't expect such a VM to boot, but I intended to set that option after feeding it a cloud-init ISO anyway, so I was surprised that it failed...) Also adds some functions for messing with boot devices in general. Mostly because I'm extremely undecided with how we should alter the boot order when doing the CloudInit() method, or if we should even alter it in the first place. I'm guessing the reason this method changes the boot order is to make sure that the added cloud-init ISO is not the first boot device? So I'm not sure if we should just remove it from the boot order entirely, or if we should set it to the last boot device. I'm not marking this as a draft because it's working code that's certainly not going to cause issues merging in, but there's an unused function in here and in general I can be pretty verbose in my function naming... --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-03 15:30:28 +03:00
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/go-proxmox#158
No description provided.