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

Add support for VM disk management in vcd_vapp_vm resource #311

Closed
Didainius opened this issue Aug 14, 2019 · 7 comments
Closed

Add support for VM disk management in vcd_vapp_vm resource #311

Didainius opened this issue Aug 14, 2019 · 7 comments
Assignees

Comments

@Didainius
Copy link
Collaborator

Didainius commented Aug 14, 2019

At the moment resource vcd_vapp_vmsupports only adding independent disks. There are no options to handle VM disks (add them, resize them), but there may be such a need for altering VM disks and their sizes.

@jpbuecken
Copy link

jpbuecken commented Aug 20, 2019

I know this issue 311 is for the implementation in vcd_vapp_vm. But if a developer implements it, it may be good to have bug 257 in mind to define functions and code structure:
We would like to see this in the 2 resource approach suggested here:
https://github.com/terraform-providers/terraform-provider-vcd/issues/257

@jpbuecken
Copy link

jpbuecken commented Oct 28, 2019

Our business requires vm snapshots now. Since this is not possible with independent/namend disks at the moment, we got a demand for this feature. Unlike named disks, an extra attachment resource does not make sence for vm disks, since you cannot create a vm disk without a vm.

But maybe it make sence to have the disk in its own resource anyway (maybe it is possible to move a vm disk to another vm in future and we want to avoid https://github.com/terraform-providers/terraform-provider-vcd/issues/206 for vm disks)

May I suggest the following example code?:

resource vcd_vm_disk {
   attachment = vcd_vapp_vm.web1.id
   size = 1024
   [...]
}

If VCD support a move of vm disks in future, we may change the attachment value and it will be translated in the "move vm disk" api call.

@lvirbalas
Copy link
Collaborator

@buec011 please explain more about your use case. Esp., what do you want to do with snapshots and Terraform VM disks.

CC: @Didainius

@jpbuecken
Copy link

jpbuecken commented Nov 12, 2019

@lvirbalas

With named disks (we use VCD 10), it is not possible to create a snapshot

(in H5: VM -> Actions -> Create Snapshot)

image

We use snapshots before we or a third party deploys a new application in the VM. I think this is a usual use case to use this vSphere / VCD feature.

If you use VM disks, you can take your snapshot as usual.

We do not need create and delete snapshots via terraform yet. We use the GUI for this at the moment, because they will resist temporary only.
But we need to manage VM disks via terraform because of the VM snapshot feature.

@lvirbalas
Copy link
Collaborator

@buec011 I see. Are you still using the independent disks and do you still need the attachment resource for them #257 ?

@jpbuecken
Copy link

jpbuecken commented Nov 12, 2019

@buec011 I see. Are you still using the independent disks and do you still need the attachment resource for them #257 ?

It is still requested, but the use of VM disks is more important due to the snapshot problem.
The concept of independent disks is similar to volumes in AWS / Cinder in Openstack / VHDs in Azure. So we still like it.
Our demand to use independent disk will rise (examples I can think of)

  • if VM snapshots are possible,
  • if volume snapshot or disk clones of independent disks are possible,
  • if multi-attach is possible
  • maybe if you can choose first class disks without shadow VM.

@vbauzys
Copy link
Contributor

vbauzys commented Jan 21, 2020

@vbauzys vbauzys closed this as completed Jan 21, 2020
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

4 participants