Packer fails to build VMWare image for windows 2012

587 views
Skip to first unread message

sanan

unread,
Dec 26, 2016, 8:47:06 AM12/26/16
to Packer
Hi,

I have windows 10 laptop. I have installed packer, vagrant and VMware workstation 10.0 trial version. When I start VMware workstation from start menu, it opens it fine. But when i give packer build command it fails with following error message everytime:

vmware-iso output will be in this color.

==> vmware-iso: Downloading or copying ISO
    vmware-iso: Downloading or copying: file:///C:/isos/Windows_2012_r2.ISO
==> vmware-iso: Creating floppy disk...
    vmware-iso: Copying files flatly from floppy_files
    vmware-iso: Copying file: ./answer_files/2012_r2/Autounattend.xml
    vmware-iso: Copying file: ./scripts/openssh.ps1
    vmware-iso: Done copying files from floppy_files
    vmware-iso: Collecting paths from floppy_dirs
    vmware-iso: Resulting paths from floppy_dirs : []
    vmware-iso: Done copying paths from floppy_dirs
==> vmware-iso: Creating virtual machine disk
==> vmware-iso: Building and writing VMX file
==> vmware-iso: Starting virtual machine...
    vmware-iso: The VM will be run headless, without a GUI. If you want to
    vmware-iso: view the screen of the VM, connect via VNC with the password "p@(.)FqQ" to
    vmware-iso: 127.0.0.1:5910
==> vmware-iso: Error starting VM: VMware error: Error: The operation was canceled
==> vmware-iso: Waiting 4.2564223s to give VMware time to clean up...
==> vmware-iso: Deleting output directory...
Build 'vmware-iso' errored: Error starting VM: VMware error: Error: The operation was canceled

==> Some builds didn't complete successfully and had errors:
--> vmware-iso: Error starting VM: VMware error: Error: The operation was canceled

==> Builds finished but no artifacts were created.


I am trying to make Windows 2012 image.

I have disabled hyperv setting on my machine, as it was suggested on one of the websites for this problem. But still no use.

I have attached .json file which I am passing the packer build command. Can somebody help me with this, please?

thanks
windows_2012_r2.json

Alvaro Miranda Aguilera

unread,
Dec 26, 2016, 9:32:31 AM12/26/16
to packe...@googlegroups.com
Hello

try

set PACKER_LOG=1

and run packer again.

please share the output over a gist in github

--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: https://github.com/mitchellh/packer/issues
IRC: #packer-tool on Freenode
---
You received this message because you are subscribed to the Google Groups "Packer" group.
To unsubscribe from this group and stop receiving emails from it, send an email to packer-tool+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/packer-tool/a6bd5589-912e-47e9-af11-9deaff46093a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Alvaro

sanan sanan

unread,
Dec 26, 2016, 10:02:47 AM12/26/16
to packe...@googlegroups.com
Hi Alvaro,

Thanks for your reply. I have attached the packer log output. Also, I have put it on github gist.

regards

You received this message because you are subscribed to a topic in the Google Groups "Packer" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/packer-tool/ICHx_mNS82A/unsubscribe.
To unsubscribe from this group and all its topics, send an email to packer-tool+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/packer-tool/CAHqq0exuTzvJZUt2e7Q6AbG44-QRqw-70F2Rs_9GLLLfsbt1cw%40mail.gmail.com.
packerLogOutput.txt

Alvaro Miranda Aguilera

unread,
Dec 27, 2016, 3:16:03 AM12/27/16
to packe...@googlegroups.com
Hello.

Seems you miss to share the gist link.

The error shows that vmware is failing, so please try this.

remove this folder
output-vmware-iso

And try to run the command again from a window with Administrator access
ie.
right click on cmd.exe, open as Administrator

If fails again, delete output-vmware-iso and run the command with PACKER_LOG=1 and share a gist

Thanks



For more options, visit https://groups.google.com/d/optout.



--
Alvaro

sanan sanan

unread,
Dec 28, 2016, 7:14:11 AM12/28/16
to packe...@googlegroups.com
Hi Alvaro,

In order to clear my doubt that it might be windows issue, I have not installed ubuntu 16.04 also on my laptop (another partition). I thought it might work on linux. But unfortunately, there also it give me same error message as on Windows 10. Infact, I have installed VMWare workstation pro 12.5 on it now.

Since, it was a fresh installation, there was no output-vmware-iso folder present already.

I have uploaded the the debog log to gist github. here is the link



Thanks
sanan






Alvaro Miranda Aguilera

unread,
Dec 28, 2016, 9:16:27 AM12/28/16
to packe...@googlegroups.com
Hello,

There is not much information on the logs, so lets share some general checks.

- Ensure intel VT or similar virtualization assistance is enabled in the bios.
 you can check if you can start a that is 64 bits without issues.

- Ensure VMWare is fully licensed and works, same as previous, just ensure you can create a VM.

Can you share a zip file or github repo ? I have VMWare so I can give it a go.

Thanks
Alvaro.


For more options, visit https://groups.google.com/d/optout.



--
Alvaro

sanan sanan

unread,
Dec 28, 2016, 9:37:17 AM12/28/16
to packe...@googlegroups.com
Hi Alvaro,

OK, so I found the stupid, silly mistake that I made.... in the .json file, I had given wrong os_guest_type parameter. Since, I am building windows 2012 so specified Windows2012_64 as guest os type. Whereas it should be Windows2008 as in original template I downloaded from github. Its silly, but now I am able to build the box. 

But I did not know that one need to buy vagrant vmware plugin license in order to run vagrant up for vmware boxes. So just bought one license now. Now is my next challenge, for which I moved from virtualbox to vmware with hope that private_network problem may resolve here. Now starting vagrant up command. Hope it works. Or I will bug you again :)



Regards
sanan

Gabo Kete

unread,
Dec 28, 2016, 2:39:57 PM12/28/16
to Packer
HI Sanan

In your JSON file you can replace the guest_os_type with "longhorn-64" , this is how VMWare identifies in the VMX file a Windows 2008 ( 64bits ) VM. 

By specifying a more specific OS type, VMware may perform some optimisations or virtual hardware changes to better support the operating system running in the virtual machine

What I usually do to set up the correct variable, is to create a empty VM in VMware , select the OS I want to install in the VM, and look into the VMX file, open that file and under guestOS you will find the value VMware uses 


Regards
To unsubscribe from this group and stop receiving emails from it, send an email to packer-tool...@googlegroups.com.



--
Alvaro

--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: https://github.com/mitchellh/packer/issues
IRC: #packer-tool on Freenode
---
You received this message because you are subscribed to a topic in the Google Groups "Packer" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/packer-tool/ICHx_mNS82A/unsubscribe.

To unsubscribe from this group and all its topics, send an email to packer-tool...@googlegroups.com.

--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: https://github.com/mitchellh/packer/issues
IRC: #packer-tool on Freenode
---
You received this message because you are subscribed to the Google Groups "Packer" group.
To unsubscribe from this group and stop receiving emails from it, send an email to packer-tool...@googlegroups.com.



--
Alvaro

--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: https://github.com/mitchellh/packer/issues
IRC: #packer-tool on Freenode
---
You received this message because you are subscribed to a topic in the Google Groups "Packer" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/packer-tool/ICHx_mNS82A/unsubscribe.
To unsubscribe from this group and all its topics, send an email to packer-tool...@googlegroups.com.

--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: https://github.com/mitchellh/packer/issues
IRC: #packer-tool on Freenode
---
You received this message because you are subscribed to the Google Groups "Packer" group.
To unsubscribe from this group and stop receiving emails from it, send an email to packer-tool...@googlegroups.com.



--
Alvaro

--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: https://github.com/mitchellh/packer/issues
IRC: #packer-tool on Freenode
---
You received this message because you are subscribed to a topic in the Google Groups "Packer" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/packer-tool/ICHx_mNS82A/unsubscribe.
To unsubscribe from this group and all its topics, send an email to packer-tool...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages