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

[RFE] Ability to specify the size of the disks #116

Closed
leodotcloud opened this issue Sep 22, 2021 · 3 comments
Closed

[RFE] Ability to specify the size of the disks #116

leodotcloud opened this issue Sep 22, 2021 · 3 comments

Comments

@leodotcloud
Copy link
Contributor

Enhancement request:

Would be great if there was a way to specify the size of the disks of a VM.
For example, one can specify the disk config in Vagrantfile as:

node.vm.disk :disk, size: "80GB", primary: true
@VoyTechnology
Copy link
Member

I completely agree. I am currently working on adding virtualbox_disk resource and data, and hopefully will have a basic PR in the next couple of days (it will not integrate it with virtualbox_vm at first). Intially I am thinking of the following:

resource "virtualbox_disk" "disk" {
  name      = "primary_disk"
  format    = "VDI"
  capacity  = "80G"
  flexible  = true
  encrypted = false
  
  # the following will be the computed properties
  # location = "<base_location>/primary_disk.vdi" # Maybe this will be customisable
  # uuid     = "<computed>"
}

The underlying go-virtualbox currently doesn't have much support for disk creation and reading so that has to be added first.

Most likely this means we will also need virtualbox_disk_controller, and the process would be to attach disk->controller->vm, but this will be discussed later.

For data source it might be a bit complicated/clever, where you might specify a remote image which will be un-tar-ed, like the current process, but also use exisiting disk you have.


On a side note, I've noticed you have been active with the project in the last few days, would you be interested in becoming a maintainer?

@VoyTechnology
Copy link
Member

I have created the issue to #119 which tracks the solution, so I am closing this as a duplicate. As I mentioned in my last response, adding the resource and data source should be the solution to your problem.

@leodotcloud
Copy link
Contributor Author

@VoyTechnology Please check your email, DMed you.

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

No branches or pull requests

2 participants