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

Feature Proposal: qemu disk structure change #187

Open
Tinyblargon opened this issue Aug 15, 2022 · 3 comments
Open

Feature Proposal: qemu disk structure change #187

Tinyblargon opened this issue Aug 15, 2022 · 3 comments

Comments

@Tinyblargon
Copy link
Collaborator

In the current implementation it is only possible to configure 31 disks in total. Proxmox allows you to configure 4 ide, 6 sata, 16 virtio and 31 scsi drives for a total of 57 drives. I was thinking about re-implementing this at some point in this project and the terraform provider.

Current structure

"disk": {
	"0": {},
	"1": {},
	"2": {},
	"3": {},
	"4": {},
	"5": {},
	"6": {},
	"7": {},
	"8": {},
	"9": {},
	"10": {},
	"11": {},
	"12": {},
	"13": {},
	"14": {},
	"15": {},
	"16": {},
	"17": {},
	"18": {},
	"19": {},
	"20": {},
	"21": {},
	"22": {},
	"23": {},
	"24": {},
	"25": {},
	"26": {},
	"27": {},
	"28": {},
	"29": {},
	"30": {}
}

Proposed structure

"disk": {
	"ide": {
		"0": {},
		"1": {},
		"2": {},
		"3": {}
	},
	"sata": {
		"0": {},
		"1": {},
		"2": {},
		"3": {},
		"4": {},
		"5": {}
	},
	"virtio": {
		"0": {},
		"1": {},
		"2": {},
		"3": {},
		"4": {},
		"5": {},
		"6": {},
		"7": {},
		"8": {},
		"9": {},
		"10": {},
		"11": {},
		"12": {},
		"13": {},
		"14": {},
		"15": {}
	},
	"scsi": {
		"0": {},
		"1": {},
		"2": {},
		"3": {},
		"4": {},
		"5": {},
		"6": {},
		"7": {},
		"8": {},
		"9": {},
		"10": {},
		"11": {},
		"12": {},
		"13": {},
		"14": {},
		"15": {},
		"16": {},
		"17": {},
		"18": {},
		"19": {},
		"20": {},
		"21": {},
		"22": {},
		"23": {},
		"24": {},
		"25": {},
		"26": {},
		"27": {},
		"28": {},
		"29": {},
		"30": {}
	}
}
@mleone87
Copy link
Collaborator

that would be great and, IMHO, it should have been like that from the beginning.
Unfortunately this will have a massive impact on terraform provider so it will have to be reworked on this part from scratch

@Tinyblargon
Copy link
Collaborator Author

Started reworking on a new Qemu disk structure in https://github.com/Tinyblargon/proxmox-api-go/tree/Overhaul-Qemu-Disks

@Tinyblargon
Copy link
Collaborator Author

@mleone87 I've re-implemented the the disk structure.
Due to the the size of this change I was unable to keep the old disk implementation working.
Do we have any plans for moving forward with big breaking changes like this?
Currently i have marked the old implementation as deprecated. it might be better to remove it since i couldn't keep it working and it riddled with bugs that cause it to panic.

This new implementation is able to deal with:

  • linked clones
  • pass-through disks
  • virtual disks
  • cdrom (pass-through and iso file)
  • cloud-init drive

Also the logic for resizing and moving disk has been added to this project.
This means that developers can call the update function and all the CRUD operations related to disks are handled by it.
(some of these parts had to be updated as well, as they did not implement all options proxmox allows.)

I'm currently finalizing the implementation of the terraform provider.

About 70% of the code is tests, as there where many edge cases.

I have already fixed the merge conflicts.
https://github.com/Tinyblargon/proxmox-api-go/tree/Overhaul-Qemu-Disks-Merge

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

2 participants