packer-examples-for-vsphere icon indicating copy to clipboard operation
packer-examples-for-vsphere copied to clipboard

feat: Add Debian 11 machine image

Open evilaliv3 opened this issue 3 years ago • 11 comments

Note

PR template updated by @tenthirtyam.

Summary of Pull Request

With this pull request, I would like to propose the addition of a Debian 11 machine. The code produced starts from the scripts already loaded in the repository for Ubuntu and preserves the same exact configuration.

Type of Pull Request

  • [ ] This is a bugfix.
  • [x] This is an enhancement or feature.
  • [ ] This is a code style / formatting update.
  • [ ] This is a documentation update.
  • [ ] This is a refactoring update.
  • [ ] This is something else. Please describe:

Closes #194

Test and Documentation Coverage

  • [ ] Tests have been completed (for bugfixes / features).
  • [ ] Documentation has been added / updated (for bugfixes / features).

Breaking Changes?

  • [x] Yes, there are breaking changes.
  • [ ] No, there are no breaking changes.

Note

Added by @tenthirtyam.

Current Gaps:

  • Ansible coverage
  • Boot from CD-based kickstart vs HTTPS when the data source is toggled to disk

evilaliv3 avatar Apr 11 '22 10:04 evilaliv3

@tenthirtyam : i've improved my pull request aligning all the configurations and files where Debian should be listed.

I've not manually edited the build.sh script manually but instead edited the build.yml template so that you will be able just to re-generate the build.s script when you will eventually integrate the pull request.

Thank you

evilaliv3 avatar Apr 12 '22 16:04 evilaliv3

Thanks, @evilaliv3! 🚀

Have you reviewed the Ansible roles to see if any changes are needed specifically for Debian or reuse between Debian and Ubuntu?

Ryan Johnson Staff II Solutions Architect | VMware, Inc.

tenthirtyam avatar Apr 12 '22 16:04 tenthirtyam

You are welcome @tenthirtyam

At the moment not as i'm new to ansible in general an learning it now through this valid set of examples.

As a feedback as user of your scripts and examples in my opinion your set of examples are such a great resource but too way much complete; i would probably avoid to include such reach set of ansible playbook but just guide and instruct users with few examples.

In my scenario for example I'm looking at this repo to automate the preparation of few virtual machines templates and to use this repository i need to forkit it because in your examples you install many tools like git, curl, and bash-completion that are not needed in our production systems but in this way we wont be able to easily pull back your updates.

I would like instead to have an easy scaffolding that i could use directly being able to fetch the upstream updates.

evilaliv3 avatar Apr 12 '22 17:04 evilaliv3

Hi @evilaliv3, could you resolve the conflicts that have arisen after the v22.05 release?

I'll target this one for v22.07 once I get the Ansible tasks updated, which seem fairly minor.

Ryan Johnson Staff II Solutions Architect | VMware, Inc.

tenthirtyam avatar May 31 '22 13:05 tenthirtyam

Great work, testing myself here.

stefangweichinger avatar Jun 08 '22 13:06 stefangweichinger

For CD-based kickstart when the data source is toggled from http to disk

I will update the local data source to mount the second cd-rom only when the disk option is set:

boot_command = [
     "c<wait>", 
     "linux /install.amd/vmlinuz", 
     " auto-install/enable=true", 
     " debconf/priority=critical",
     " preseed/file=/mnt/cdrom2/preseed.cfg<enter><wait>", 
     "initrd /install.amd/initrd.gz<enter><wait>", 
     "boot<enter><wait>", 
     "<leftAltOn><f2><leftAltOff>", 
     "<enter><wait>", 
     "mkdir /mnt/cdrom2<enter>", 
     "mount /dev/sr1 /mnt/cdrom2<enter>", 
     "<leftAltOn><f1><leftAltOff>", 
     "<enter><wait><enter>", 
     "<down><down><down><down><enter>" 
]

Add determine if the preseed can be updated based on the disk source to remove the device.

d-i preseed/early_command string umount /mnt/cdrom2 && echo 1 > /sys/block/sr1/device/delete

Ryan Johnson Staff II Solutions Architect | VMware, Inc.

tenthirtyam avatar Jul 12 '22 23:07 tenthirtyam

Note

Guest OS identifier will need to be updated due to KB 85845.

tenthirtyam avatar Jul 12 '22 23:07 tenthirtyam

Guest automatically resets from other4xLinux64Guest to debian11_64Guest during clone operation from the content library and fails customization with the following.

Customization of the guest operating system is not supported due to the given reason: 
The guest OS 'Debian GNU/Linux 11 (64-bit)' installed in the VM is not supported for customization. 
Refer to vCenter documentation for supported configurations: 
http://partnerweb.vmware.com/programs/guestOS/guest-os-customization-matrix.pdf

Opening up an internal issue to review and resolve this issue before committing this feature as it needs to support both traditional template and OVF template in the content library.

In the meantime, I'll work on addressing the gaps for Ansible and the CD-based kickstart while this is tracked internally.

Label: status/track-internal under BZ-3003889.

Ryan Johnson Staff II Solutions Architect | VMware, Inc.

tenthirtyam avatar Jul 13 '22 00:07 tenthirtyam

For now, moving from v22.07 milestone to the Backlog as the cloning issue needs to be resolved for Debian 11-based OVF templates.

Ryan Johnson Staff II Solutions Architect | VMware, Inc.

tenthirtyam avatar Jul 13 '22 17:07 tenthirtyam

Thank you @tenthirtyam for the update.

Which are the current issues that you would like to fix?

evilaliv3 avatar Jul 16 '22 16:07 evilaliv3

Hey @evilaliv3 - the outstanding items include:

  • the Ansible playbook updates - simple, will address that.
  • update the disk-based data source option for kickstart to use the methods mentions earlier in the thread, but retain the http-based option by default.
  • there's an open internal engineering issue for VM clone of Debian 11 for guest customization. OS needs to be set to other4xLinux64Guest by default per KB, but when cloned from content library it automatically changes it to Debian 11 and customizations fail. I filed and am tracking a fix internal for a vCenter Server update.

Ryan Johnson Staff II Solutions Architect | VMware, Inc.

tenthirtyam avatar Jul 16 '22 16:07 tenthirtyam

  1. Regarding:

*...there's an open internal engineering issue for VM clone of Debian 11 for guest customization. OS needs to be set to other4xLinux64Guest by default per KB, but when cloned from content library it automatically changes it to Debian 11 and customizations fail. I filed and am tracking a fix internal for a vCenter Server update."

I have a fix for this issue that will be addressed in the Ansible playbook.

TL;DR:

/etc/open-vm-tools/tools.conf

[guestosinfo]
short-name = other4xLinux64Guest
  1. Regarding:

"...update the disk-based data source option for kickstart to use the methods mentions earlier in the thread, but retain the http-based option by default."

This will be HTTP-only for the first inclusion, much like SLES 15. We can add the disk method later.

Ryan Johnson Senior Staff Solutions Architect | Product Engineering @ VMware, Inc.

tenthirtyam avatar Aug 18 '22 20:08 tenthirtyam

Merged! 🚀

Ryan Johnson Senior Staff Solutions Architect | Product Engineering @ VMware, Inc.

tenthirtyam avatar Aug 19 '22 02:08 tenthirtyam

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

github-actions[bot] avatar Sep 19 '22 00:09 github-actions[bot]