Code Monkey home page Code Monkey logo

packer-examples's People

Contributors

alevlasu avatar bineesh-n avatar cjlapao avatar davosian avatar martinh2011 avatar notmeta avatar stephenulmer avatar zcutlip 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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

packer-examples's Issues

Error in minimize.sh: parallels-iso.image: dd: error writing '/tmp/whitespace': No space left on device

When I run script ./scripts/ubuntu/base/minimize.sh line 16 triggered an error.

# Whiteout /boot
count=$(df --sync -kP /boot | tail -n1 | awk -F ' ' '{print $4}')
count=$((count - 1))
dd if=/dev/zero of=/boot/whitespace bs=1M count=$count || echo "dd exit code $? is suppressed";
rm /boot/whitespace

I got an error:

==> parallels-iso.image: Provisioning with shell script: ./scripts/ubuntu/base/minimize.sh
==> parallels-iso.image: + awk -F   {print $4}
==> parallels-iso.image: + tail -n1
==> parallels-iso.image: + df --sync -kP /
==> parallels-iso.image: + count=24176156
==> parallels-iso.image: + count=24176155
==> parallels-iso.image: + dd if=/dev/zero of=/tmp/whitespace bs=1M count=24176155
    parallels-iso.image: dd exit code 1 is suppressed
==> parallels-iso.image: dd: error writing '/tmp/whitespace': No space left on device
==> parallels-iso.image: 25170+0 records in
==> parallels-iso.image: 25169+0 records out
==> parallels-iso.image: 26392330240 bytes (26 GB, 25 GiB) copied, 7.57125 s, 3.5 GB/s
==> parallels-iso.image: + echo dd exit code 1 is suppressed
==> parallels-iso.image: + rm /tmp/whitespace
==> parallels-iso.image: + + awk -F   {print $4}
==> parallels-iso.image: df --sync -kP /boot
==> parallels-iso.image: + tail -n1
==> parallels-iso.image: + count=1739576
==> parallels-iso.image: + count=1739575
==> parallels-iso.image: + dd if=/dev/zero of=/boot/whitespace bs=1M count=1739575
==> parallels-iso.image: dd: error writing '/boot/whitespace': No space left on device
    parallels-iso.image: dd exit code 1 is suppressed
==> parallels-iso.image: 1802+0 records in
==> parallels-iso.image: 1801+0 records out
==> parallels-iso.image: 1888694272 bytes (1.9 GB, 1.8 GiB) copied, 0.494161 s, 3.8 GB/s
==> parallels-iso.image: + echo dd exit code 1 is suppressed
==> parallels-iso.image: + rm /boot/whitespace
==> parallels-iso.image: + set +e
==> parallels-iso.image: + /sbin/blkid -o value -l -s UUID -t TYPE=swap
==> parallels-iso.image: + swapuuid=
==> parallels-iso.image: + set -e
==> parallels-iso.image: + [ x != x ]
==> parallels-iso.image: + sync

Parallels Tools not installed for RHEL

Let me start with: I am not Packer fluent, just barely literate.

When building a box with redhat/build.pkr.hcl, the resulting image doesn't have Parallels Tools installed, despite running scripts/rhel/base/parallels.sh.

I believe that this is due to a race condition, introduced by scripts/rhel/base/init.sh.

Most of the provisioners run in a list in the same provisioner block. init.sh is the first one to run, and ends with a reboot command. I separated all of these provisioners, and eventually added breakpoints, and discovered that the reboot takes some time to take effect. So the next provisoning script, sshd.sh, runs and completes, but the parallels.sh gets interrupted while preparing to install prerequisites. The next script, parallels_folders.sh, runs after the box reboots.

I have a version of redhat/build.pkr.hcl in which I've separated the provisoners into three groups, and had the second group wait before executing. This makes sure that the box starts booting before Packer tries to run the parallels.sh script. This doesn't eliminate the problem, but seems to make it much less likely.

Are the maintainers willing to accept this half-step-fix for the problem? I can do more restructuring of the provisioners, but that would make them less like the other platforms, and I didn't want to make a mess without asking about direction...

Thank you!

macOS builds broken

79d5985 is a huge step forward for the user and building for multiple versions of macOS!

Unfortunately, when validating variables:

Error: Unknown source parallels-macvm.sonoma

  on build.pkr.hcl line 1:
  (source code not available)

Known: [parallels-ipsw.monterey parallels-ipsw.sequoia parallels-ipsw.sonoma
parallels-ipsw.ventura]

The file provisioner.pkr.hcl defines variable version_source. Most of the values have macvm in them, and I'm guessing it's supposed to be ipsw.

I don't really understand how this part works, but I think that I could start the build with an existing virtual machine, and somehow reference it's name, rather than using the macOS installer to create a brand new one?

At any rate, there is now #54 in case that is actually correct. I tested it and it seems to work.

Unknown source type parallels-iso

Following this documentation windows-readme
I got this error:

windows git:(main) โœ— packer validate -var-file variables.pkrvars.hcl . 
Warning: Bundled plugins used

This template relies on the use of plugins bundled into the Packer binary.
The practice of bundling external plugins into Packer will be removed in an
upcoming version.

To remove this warning, add the following section to your template:


packer {
  required_plugins {
    vagrant = {
      source  = "github.com/hashicorp/vagrant"
      version = "~> 1"
    }
  }
}

Then run 'packer init' to manage installation of the plugins

Error: Unknown source type parallels-iso

  on build.pkr.hcl line 1:
  (source code not available)

known builders: [virtualbox-vm azure-chroot virtualbox-ovf azure-arm amazon-ebs
vsphere-iso vmware-vmx virtualbox-iso vagrant amazon-chroot googlecompute qemu
amazon-instance amazon-ebsvolume file vmware-iso docker amazon-ebssurrogate null
azure-dtl vsphere-clone]

My setup:
MacBook Pro M1

I installed:
Packer - by following this for macos packer-install
PD-19 - already was on my laptop

Steps to reproduce:

  1. clone repository
  2. go to windows directory
  3. change variables.TEMPLATE.pkrvars.hcl according to the readme
iso_url      = "~/Downloads/win11-arm.iso" #path to your generated iso
iso_checksum = "" #the generated iso checksum in this format "sha256:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", check readme in how to generate
machine_specs = {
  cpus      = 2,
  memory    = 8182,
  disk_size = "65536",
}
addons             = ["git", "vscode"]    # list of addons to be installed, check readme for more info
create_vagrant_box = false # set to true if you want to create a vagrant bo
  1. rename variables.TEMPLATE.pkrvars.hcl to variables.override.pkrvars.hcl
  2. run:
packer validate -var-file variables.override.pkrvars.hcl .

macOS variable validation yields "Error: Unsupported argument"

After creating a local variables file, running packer validate -var-file variables.local.pkrvars.hcl . results in an error.

ulmer@SLU-MacBook-Pro-2 macos % packer validate -var-file variables.local.pkrvars.hcl .
Error: Unsupported argument

  on build.pkr.hcl line 2:
  (source code not available)

An argument named "count" is not expected here.

Removing count=0 from build.pkr.hcl makes the error go away, but I don't know if it affects anything else. I couldn't find any obvious references with grep, but I'm definitely not a packer expert.

This is variables.local.pkvars.hcl:

machine_name = "macOS-14.5"
machine_specs = {
  cpus   = 4,
  memory = 8192,
}
addons = [
]
create_vagrant_box = true
ipsw_url = "/Users/ulmer/Downloads/UniversalMac_14.5_23F79_Restore.ipsw"

I created #53, which just removes that line, just in case this looks like an obvious mistake to you.

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.