-
Notifications
You must be signed in to change notification settings - Fork 124
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
knife vsphere vm vmdk add - last 10% hard-coded #184
Comments
I think I know what you're talking about, but can you paste a command and output, please? We can make it configurable and leave a 10% default, as I agree, a percentage has little meaning when the size of the volume varies so much. (Also, I'm out for a week, so won't be responding much until after the 8th) |
Here's an output :
I asked 20g, 25.86 left, but it is not enough :( It comes from "def choose_datastore(dstores, size)" in base_vsphere_command.rb with thses lines (243) :
In line 250 : |
any update on this? |
Same happens if you try to add a thin provisioned disk to a VM but the requested initial size is bigger than the available minus 10%. So if you have 1.71TB available and you want to add a 2TB thin provisioned disk, then it fails:
Same works via the vCenter vSphere thick client as you are adding a thin provisioned disk so the free space at the moment of adding should not be a concern. Thanks, |
Hi, I remember working on this one then pausing, but I don't remember why. I think I may just remove that 10% check altogether. |
The 10% check is not exactly what I had in mind. It needs to go away anyways, but mine is different. It is to do with the type of disk and the available storage. If adding THICK disk, the current state is safe, but if that is THIN, the current state needs to be able to consider this and proceed(due to thin) even though not enough space is reported to exist. Thank you, |
Oh, you want to be able to overprovision using thin? That makes sense. Sorry for my slowness here, this command is among the ones I don't understand fully and don't want to make changes that break other people's workflow. I think I can do this one without breaking things. |
Fixes chef#184 Refactor to get some methods out of base that are only used here. Remove check for needing 10% overhead. If we're thin provisioning, then only require 1G
Are you able to pull down my branch and test this locally? https://github.com/swalberg/knife-vsphere/tree/vmdk_add_thin |
Fixes #184 Refactor to get some methods out of base that are only used here. Remove check for needing 10% overhead. If we're thin provisioning, then only require 1G
Yes, I can do that. Once I have the time to switch again into this, I will definitely give it a try and report back my results. Thank you! |
Hello, sorry for the long delay in testing this. I can confirm that the feature does allow one to add a thin-provisioned disk that not only exceeds the current free space on the selected datastore, but also allows to extend beyond the size of the whole datastore. In the example below, I have managed to add 10000GB thin vmdk disk to a VM where the overall available size on the datastore was: 7.81 TB. So for me this is resolved. Thank you! See test below: knife-vsphere-test]$ knife vsphere vm vmdk add --vmdk-type thin mytestvm 10000G and knife-vsphere v2.1.1 which came preinstalled with chefdk-3.2.30-1.el6.x86_64.rpm and I reinstalled from the gem I built from https://github.com/swalberg/knife-vsphere/tree/vmdk_add_thin (not sure if those are the same or not because the versions matched): Thank you! |
Hello,
(I'm using a lot your work today :) )
There is an "issue" : When you add a disk, you check if, after the creation of the disk, it will remain 10% of the disk capacity. I understand the need for a protection.
Buuut :
The text was updated successfully, but these errors were encountered: