-
Notifications
You must be signed in to change notification settings - Fork 453
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
r/virtual_machine: Enforce storage vMotion restrictions #319
Conversation
For use in some VM tests - will probably be removed once we fix the disk naming issues.
This commit adds restrictions to storage vMotion: * Externally-attached disks cannot be migrated. * Disk names must match the standard vSphere naming convention based on the current name of the virtual machine. * Linked clones are blocked from being migrated at this time. The latter two restrictions will be lifted once #295 is fully realized and we are tracking disks via a label/UUID combination.
All of these restrictions will more than likely be removed or modified in some way. The external attachment restriction will be a challenge, but ultimately we want to try and control the lifecycle of that outside of the VM, and work to re-attach that disk somehow after the migration. How we go about that remains to be seen.
Test output pending. PS: This also vendors the null resource as we use it in one test example now to stabilize disk names. |
Tests pass:
Tests specific to this PR:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Hey @vancluever Is the externally attached disk migration limitation still present in the latest release? We're currently doing that via direct VMware API calls and would move to terraform solution if that is available. |
This PR adds restrictions to storage vMotion:
the current name of the virtual machine.
The latter two restrictions will be lifted once #295 is fully realized
and we are tracking disks via a label/UUID combination.
Disk attachment migration is something I'd like for us to handle as well eventually, but exactly how that will be handled is a bit tricky as VM configuration needs to be updated as well pretty much at the same time. It might not be possible in the long run.