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

windows ovf template #25

Open
lesaux opened this issue Jan 5, 2015 · 3 comments
Open

windows ovf template #25

lesaux opened this issue Jan 5, 2015 · 3 comments
Labels
Milestone

Comments

@lesaux
Copy link

lesaux commented Jan 5, 2015

Hello I'm having trouble with windows vmware_ovf templates.

I'm creating my own templates with packer. When I launch a vagrant box, the vmware_ovf template is uploaded to vcenter, the vm is created, but it isn't launched - I think the vm customization fails. I can manually launch the vm from vcenter just fine, but I notice network isn't configured as expected (dhcp lease instead of static ip, hostname isn't set etc...).

vagrant-rbvmomi-1.8.1/lib/rbvmomi/vim/Task.rb:11:in `wait_for_completion': InvalidArgument: A specified parameter was not correct. (RbVmomi::Fault)

I'm not sure if I'm doing something wrong in my packer template, or if it's the Vagrantfile.

Would you be kind enough to provide an example Vagrantfile to launch a windows box?
Regards

edit:
reading on other issues, my problem is more or less the same as #17.
I would like to add that I have no issues with centos and ubuntu gosddc boxes.

@lbaldwin123
Copy link

I also have the same problem.

it's helpful to know that in my case once the vm is created, the guest_os_type/Guest Operating System = rhel6_64Guest \ Red hate Enterprise 6(64bit) is being correctly identified in the newly created vm. along with the vlan and other vm properties.

@vladistan
Copy link

The problem is caused by plugin not reading Vagrant config correctly. For some reason it always defaults to LinuxCustomization, that's why you get the error shown above.

Applying this patch fixes the problem.

--- a/lib/vagrant-vcenter/config.rb
+++ b/lib/vagrant-vcenter/config.rb
@@ -113,7 +113,6 @@ module VagrantPlugins
       attr_accessor :template_id

       def initialize
-        @prep_type = 'linux'
         @enable_vm_customization = true
       end

You will also need to put this line into all your Vagrantfiles that use this provider

vcenter.prep_type = "Windows"

@tsugliani tsugliani added the bug label Jul 7, 2015
@tsugliani tsugliani added this to the v0.4.0 milestone Jul 7, 2015
@tsugliani
Copy link
Contributor

Hi gents,

Thanks @vladistan for the patch, appreciated, and we do accept any PRs. (develop branch)

As you can probably imagine @frapposelli and myself are pretty busy on other stuff right now, so we can't really fix all the current issues.
We will try to review the PRs, test & merge them as soon as possible.

Sorry about that.

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

No branches or pull requests

4 participants