StefanScherer / packer-windows

Windows Templates for Packer: Windows 11, Windows 10, Windows Server 2022, 2019, 2016, also with Docker
MIT License
1.29k stars 434 forks source link

The windows_10 (virtualbox, 2020.11.18) license will expire soon #285

Closed basictheprogram closed 3 years ago

basictheprogram commented 3 years ago

Friendly reminder the windows_10 (virtualbox, 2020.11.18) license will expire soon.

chocolatey_test_environment_windows_10__Running_
StefanScherer commented 3 years ago

Thanks for the heads-up. I already tried to rebuild, but the pipeline has issues https://app.circleci.com/pipelines/github/StefanScherer/packer-builder/314/workflows/a4b1fbb0-a382-4eed-9e2f-1418174ae176/jobs/1574 and I hadn't the time to look and fix it.

StefanScherer commented 3 years ago

Manually installed VMware Workstation 16.1.0 on that machine, but ran into https://github.com/hashicorp/packer/issues/10009

Giving up for now as the machines cost money per hour. I don't see a quick fix for my pipeline. 🐼

StefanScherer commented 3 years ago

Tried a few more things on Equinix, updated to Ubuntu 20.04, used bigger machines there, but still the "The operation was canceled" error. 😢

woa7dklb commented 3 years ago

@StefanScherer via the link https://app.circleci.com/pipelines/github/StefanScherer/packer-builder/314/workflows/a4b1fbb0-a382-4eed-9e2f-1418174ae176/jobs/1574 i see the job is run as: "Executor: Docker Medium: 2 CPU / 4 GB RAM" i bet 4GB RAM is to less or?

StefanScherer commented 3 years ago

@woa7dklb No worries. This is just the CircleCI worker. On that I install terraform and the packet CLI to spin up a baremetal machine at Equinox (formerly packet) and do the packer build there. CircleCI is just here for the logs 🙂

woa7dklb commented 3 years ago

ah, ok and if you run the terraform and the packet CLI directly, the problem is the same?

StefanScherer commented 3 years ago

The provisioning is not the problem. I logged into the equinix machine to investigate, and I get the same VMware error when running the packer build command. In the past it was because I chose a too small machine that has a smaller CPU with less capabilities. But I now tried the even more expensive machines. I have no clue and even the vmware logs under the hood don't tell me much more. 😕

woa7dklb commented 3 years ago

can you post me the direct build command? than i will try it also

StefanScherer commented 3 years ago

Depending on the hypervisor you want to use you can run a packer build with

packer build --only=virtualbox-iso windows_10.json
packer build --only=vmware-iso windows_10.json
packer build --only=hyperv-iso windows_10.json
basictheprogram commented 3 years ago

I normally (packer) build on a ubuntu linux computer. In an attempt to add more knowledge to this problem I spun up an old iMac with a brew installed toolchain. I am surprised the vagrant build worked!

$ sw_vers
ProductName:    Mac OS X
ProductVersion: 10.13.6
BuildVersion:   17G14042
$ packer --version
1.6.6
$ brew info virtualbox
virtualbox: 6.1.18,142142
https://www.virtualbox.org/
/usr/local/Caskroom/virtualbox/6.1.18,142142 (3 files, 119MB)
From: https://github.com/Homebrew/homebrew-cask/blob/HEAD/Casks/virtualbox.rb

I'll sanitize the build log (is that even necessary?) and upload gist of the build.

StefanScherer commented 3 years ago

Thanks @basictheprogram , virtualbox is not the problem. The packer build for virtualbox seems to work on the Equinix machine, but VMware Workstation is failing to start the VM. I personally use VMware so that's a blocker for me to pay for cloud machines that run my packer builds. Maybe I find some more time to find out what's causing the issue, but without a VMware my setup is rather useless for my use cases.

For virtualbox you can find other VM's on vagrant cloud, eg. this https://app.vagrantup.com/gusztavvargadr/boxes/windows-10 . @gusztavvargadr does a fantastic work to provide several different Windows machines and keeps them up to date. I only can recommend his vagrant boxes.

atwright147 commented 3 years ago

Should packer build --only=parallels-iso windows_10.json work?

I am getting the following errors:

$ packer build --only=parallels-iso windows_10.json
parallels-iso: output will be in this color.

Build 'parallels-iso' errored after 405 milliseconds 724 microseconds: Failed creating Parallels driver: Unable to initialize any driver. Supported Parallels Desktop versions: 11, 10, 9

==> Wait completed after 405 milliseconds 800 microseconds

==> Some builds didn't complete successfully and had errors:
--> parallels-iso: Failed creating Parallels driver: Unable to initialize any driver. Supported Parallels Desktop versions: 11, 10, 9

==> Builds finished but no artifacts were created.

I have installed parallels-virtualization-sdk via brew reinstall --cask parallels-virtualization-sdk

basictheprogram commented 3 years ago

Thanks for the recommendation for @gusztavvargadr virtualboxes.

Is there the possibility that you can change the build workflow to exclude the vmware build?

I have a ESXi node spinning up and I'll do some testing.

Not sure if this information help. But using macOS + VMware Fusion I could build a Windows_10 vmware-iso. Very old release of macOS. Ancient(?) release of VMware Fusion. I had to edit the VMX virtual hardware version.

$ sw_vers
ProductName:    Mac OS X
ProductVersion: 10.13.6
BuildVersion:   17G14042
$ packer --version
1.6.6
VMware Fusion 8.5.10

Is the bug in VMware Workstation? Just on Linux? Specific release of VMware Workstations and specific release of Linux?

StefanScherer commented 3 years ago

@basictheprogram Well, I could skip the VMware build, but that doesn't make sense for me 😅 I spent a couple of hours this morning to investigate the problem in a local nested VMware box and I think I found a fix. Current build is running https://app.circleci.com/pipelines/github/StefanScherer/packer-builder/345/workflows/99980120-7fc6-4ce0-80ba-cb030f1d04bc/jobs/1606

StefanScherer commented 3 years ago

And there are new 📦 🎉