Giter Club home page Giter Club logo

packer-baseboxes's Introduction

Packer-BaseBoxes

LICENSE

Apache 2.0 - see LICENSE.txt

Running HyperV builds

Until HyperV builder is included in Packer, the latest version with Hyper-V support can be found at: https://dl.bintray.com/taliesins/Packer/. Download Nuget package with HyperV in it. Unzip Nuget package to get Packer.exe.

Source for Packer with HyperV can be found at: hashicorp/packer#2576

Approach

Every attempt has been made to minimize the size of the baseboxes to ensure that they can be deployed as quick as possible. The assumption is that the latest updates are to be applied when creating a basebox.

Windows baseboxes are also sysprepped so they should be safe to spin up.

Templates

  • Windows Server 2012
  • HyperV
  • Virtual Box
  • Vmware
  • VSphere via Vmware
  • VSphere directly
  • Windows 10
  • HyperV
  • Virtual Box
  • Vmware
  • VSphere via Vmware
  • VSphere directly
  • Ubuntu 14.04
  • HyperV
  • Virtual Box
  • Vmware
  • VSphere via Vmware
  • VSphere directly
  • Ubuntu 15.04
  • HyperV
  • Virtual Box
  • Vmware
  • VSphere via Vmware
  • VSphere directly

Source

Clone to repository locally: git clone [email protected]:taliesins/packer-baseboxes.git

packer-baseboxes's People

Contributors

slawomir-brzezinski-at-interxion avatar taliesins avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

packer-baseboxes's Issues

hyperv-iso: Waiting for WinRM to become available

Hello,

i tried the hyperv-windows-2016-serverstandard-amd64.json, adapted the variables to my enviroment, changed the ports in the powershell files to 5986 and added:
"winrm_use_ssl": true,
"winrm_insecure": true,

The result is "==> hyperv-iso: Waiting for WinRM to become available" with that error in the Logfile:

[ERROR] WinRM connection err: unknown error Post https://169.254.171.97:5986/wsman: dial tcp 169.254.171.97:5986: connectex: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.

The Host is Hyper-V host is Windows2012R2.
What could be the problem?
Many thanks in advance.

Regards Mathias

Ubuntu installs hang on hyperv-iso builder - firewall blocks access to preseed.cfg

I'm using the 104 build of your branch, and ran into a problem where the Ubuntu install was hanging. I'm curious if you hit this or not in your setup. I suspect it could be a difference because my laptop is domain joined so I'm going to see if there are any default deny policies that could cause this.

Steps

  1. packer build --only hyperv-iso -var 'hyperv_switchname=Ethernet' .\hyperv-ubuntu-16.04.json
  2. Wait a while - it will get to a purple screen and hang
  3. Go to VT2 (alt-f2), run ps - wget was hung
  4. Look at firewall rules on Hyper-V host:
PS C:\Users\Patrick\Source\packer\builder\hyperv> Get-NetFirewallRule -name *pack*


Name                  : UDP Query User{A737BEBC-D140-435A-B83D-EA9E15B130AD}C:\packer\packer.exe
DisplayName           : packer
Description           : packer
DisplayGroup          :
Group                 :
Enabled               : True
Profile               : Domain, Public
Platform              : {}
Direction             : Inbound
Action                : Block
EdgeTraversalPolicy   : Block
LooseSourceMapping    : False
LocalOnlyMapping      : False
Owner                 :
PrimaryStatus         : OK
Status                : The rule was parsed successfully from the store. (65536)
EnforcementStatus     : NotApplicable
PolicyStoreSource     : PersistentStore
PolicyStoreSourceType : Local

Name                  : TCP Query User{473B0AEF-617B-415C-8229-B3A7A725898C}C:\packer\packer.exe
DisplayName           : packer
Description           : packer
DisplayGroup          :
Group                 :
Enabled               : True
Profile               : Domain, Public
Platform              : {}
Direction             : Inbound
Action                : Block
EdgeTraversalPolicy   : Block
LooseSourceMapping    : False
LocalOnlyMapping      : False
Owner                 :
PrimaryStatus         : OK
Status                : The rule was parsed successfully from the store. (65536)
EnforcementStatus     : NotApplicable
PolicyStoreSource     : PersistentStore
PolicyStoreSourceType : Local



PS C:\Users\Patrick\Source\packer\builder\hyperv> Get-NetFirewallRule -name *pack* | Get-NetFirewallAddressFilter


LocalAddress  : Any
RemoteAddress : Any

LocalAddress  : Any
RemoteAddress : Any



PS C:\Users\Patrick\Source\packer\builder\hyperv> Get-NetFirewallRule -name *pack* | Get-NetFirewallPortFilter


Protocol      : TCP
LocalPort     : Any
RemotePort    : Any
IcmpType      : Any
DynamicTarget : Any

Protocol      : UDP
LocalPort     : Any
RemotePort    : Any
IcmpType      : Any
DynamicTarget : Any
  1. Change firewall rules to allow ports on all networks. This isn't really ideal, but it showed it was a firewall problem
Get-NetFirewallRule -name *pack* | Set-NetFirewallRule -Profile Private, Public, Domain -Enabled True -Action Allow

Bug in linux/ubuntu/hyperv-gen2.sh script on Ubuntu Server 18.04.1

Hi,

I've tried to build the ubuntu 18.04 server box on hyper-v, and the path and filename for bootx64.efi are not correct.

The correct script is (note the difference in case):
cp -r /boot/efi/EFI/ubuntu/ /boot/efi/EFI/BOOT
mv /boot/efi/EFI/BOOT/ubuntu/shimx64.efi /boot/efi/EFI/BOOT/BOOTX64.efi

Don't know if this breaks the build for other versions of Ubuntu. Tested only on 18.04.1-server-amd64 ISO.

Vmware/VSphere.

Can you clarify the difference between these and when each should be used:

Vmware
VSphere via Vmware
VSphere directly

Bug in Ubuntu network.sh script causes kernel upgrades to fail for Ubuntu 16.04

Hello, the part of your network.sh script for ubuntu that tries to disable udev persistent net rules causes some undesirable side effects. If you make /etc/udev/rules.d/70-persistent-net.rules a directory, then some very low-level scripts used by the kernel update process for the linux-firmware and update-initramfs will fail.

(The script that fails is /usr/share/initramfs-tools/hooks/udev. It performs a cp on files in the /etc/udev/rules.d/ folder. Since there is now a directory here, that copy will fail, causing the script to break.)

I'm not sure what the "right" way is to disable persistent net rules, this method may work but has a big downside!

Windows could not apply the unattend answer file's <DiskConfiguration> setting.

I get this when attempting to create a vmware-iso using
packer build -force -only vmware-iso .\vmware-windows-2016-serverstandard-amd64.json.

I attach VMWare to the packer VM "windows2016", where I see a Windows setup window, and a dilaog box displaying the error message from the subject.
Packer itself hangs while "Waiting for WinRM to become available...".

I am running on a Windows 8.1 machine, VMWare 11.1.4.

This is the packer output:
==> vmware-iso: Downloading or copying ISO
vmware-iso: Downloading or copying: http://care.dlservice.microsoft.com/dl/download/1/6/F/16FA20E6-4662-482A-920B-1A45CF5AAE3C/14393.0.160715-1616.RS1_RELEASE_SERVER_EVAL_X64FRE_EN-US.ISO
==> vmware-iso: Creating floppy disk...
vmware-iso: Copying files flatly from floppy_files
vmware-iso: Copying file: ./windows/windows-2016-serverstandard-amd64/autounattend.xml
vmware-iso: Copying file: ./windows/windows-2016-serverstandard-amd64/sysprep-unattend.xml
vmware-iso: Copying file: ./windows/common/variables.ps1
vmware-iso: Copying file: ./windows/common/set-power-config.ps1
vmware-iso: Copying file: ./windows/common/microsoft-updates.ps1
vmware-iso: Copying file: ./windows/common/win-updates.ps1
vmware-iso: Copying file: ./windows/common/run-sysprep.ps1
vmware-iso: Copying file: ./windows/common/run-sysprep.cmd
vmware-iso: Copying file: ./windows/common/enable-winrm.ps1
vmware-iso: Copying file: ./windows/common/enable-winrm.task.ps1
vmware-iso: Copying file: ./windows/common/fixnetwork.ps1
vmware-iso: Copying file: ./windows/common/elevate.exe
vmware-iso: Copying file: ./windows/common/sdelete.exe
vmware-iso: Copying file: ./windows/common/sdelete.ps1
vmware-iso: Copying file: ./windows/common/Set-ClientWSUSSetting.ps1
vmware-iso: Copying file: ./windows/common/Set-ClientWSUSSetting.task.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 HTTP server on port 8433
==> 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 "PCiPGfIH" to
vmware-iso: vnc://127.0.0.1:5924
==> vmware-iso: Waiting 5s for boot...
==> vmware-iso: Connecting to VM via VNC
==> vmware-iso: Typing the boot command over VNC...
==> vmware-iso: Waiting for WinRM to become available...

Please find the packer log file attached: Log.zip

I saw that in the windows\windows-2016-serverstandard-amd64\Autounattend.xml file there is a commented-out Non-UEFI ; I tried to use that in place of the commented-in UEFI compatible, but with the same result.

I also tried to use "scsi0.virtualDev": "lsisas1068", instead of "scsi0.virtualDev": "pvscsi" in the json file (fixing this error message for other packer scripts), but no effect. I combined this two measures, no effect.

Help would be appreciated!

pvscsi drivers

I have got windows 2012 r2 standard template which is working fine with SCSI controller as LSI and now I am looking to update the same to use pvscsi instead of LSI. I was going through your build process but couldn't get from where (scripts) you are trying to install pvscsi drivers. I'm just looking to update drivers so that i can build template using SCSI controller as pvscsi. Could please let me know, how this be done.

Issue with Virtualbox-ubuntu-16.04.json

Looks like the boot command is no longer correct.

If you replace the first three lines of boot_command:

"<esc><wait10><esc><esc><enter><wait>",
            "set gfxpayload=1024x768<enter>",
            "linux /install/vmlinuz "

with:

"<enter><wait>",
            "<f6><esc>",
            "<bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>",
            "<bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>",
            "<bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>",
            "<bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>",
            "<bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>",
            "<bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>",
            "<bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>",
            "<bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>",
            "<bs><bs><bs>",
            "/install/vmlinuz ",

Looks like this gets you to the correct prompt to type in the boot command. It didn't like the linux command there.

I've left the rest of boot command lines as is.
And when I vrdp in, I see it's got a Kernel panic:

not syncing: VFS: Unable to mount root fs on unknown-block(0,0)

hyper-v ISO builder - how to assign IP address the VM????

hyper-v ISO builder - how to assign static IP address the to the VM????

I am trying to build a hyper-v VM through the JSON hyperv-windows-2012R2-serverstandard-amd64.json, Since there are no options to specify the IP address, the build could not connect to internet to get the windows update, Please advise, if I am missing anything.

Even the VM not getting the IP from DHCP server installed on the same Hyper-v HOST

Issues with hyperv-ubuntu-16.04.json

Hi, I'm trying to test these with this version of Packer w/ Hyper-V support, but getting the following errors:

PS C:\Users\Evan\vagrant> packer validate .\hyperv-ubuntu-16.04.json
Template validation failed. Errors are shown below.

Errors validating build 'hyperv-iso'. 2 error(s) occurred:

* unknown configuration key: "headless"
* unknown configuration key: "ram_size_mb"

Any ideas?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.