Skip to content

Commit

Permalink
Add Debian/Linux 11 machine image
Browse files Browse the repository at this point in the history
  • Loading branch information
evilaliv3 committed Apr 12, 2022
1 parent e056b0b commit 6049bdc
Show file tree
Hide file tree
Showing 6 changed files with 763 additions and 0 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ The following builds are available:

**Linux Distributions**
* VMware Photon OS 4
* Debian 11
* Ubuntu Server 22.04 LTS
* Ubuntu Server 20.04 LTS
* Ubuntu Server 18.04 LTS
Expand Down Expand Up @@ -197,6 +198,8 @@ The files are distributed in the following directories.
**Linux Distributions**
* VMware Photon OS 4 Server
* [Download][download-linux-photon-server-4] the 4.0 Rev2 release of the **FULL** `.iso` image. (_e.g._ `photon-4.0-xxxxxxxxx.iso`)
* Debian 11
* [Download][download-linux-debian-11] the latest **netinst** release `.iso` image. (_e.g._ `debian-11.x.0-amd64-netinst.iso `)
* Ubuntu Server 22.04 LTS
* [Download][download-linux-ubuntu-server-22-04-lts] the latest **LIVE** release `.iso` image. (_e.g._ `ubuntu-22.04.x-live-server-amd64.iso`)
* Ubuntu Server 20.04 LTS
Expand Down Expand Up @@ -679,6 +682,7 @@ Happy building!!!
[download-linux-centos-server-7]: https://isoredirect.centos.org/centos/7/isos/x86_64/
[download-linux-centos-server-8]: https://isoredirect.centos.org/centos/8/isos/x86_64/
[download-linux-centos-stream-8]: https://isoredirect.centos.org/centos/8-stream/isos/x86_64/
[download-linux-debian-11]: https://cdimage.debian.org/debian-cd/current/amd64/iso-cd/
[download-linux-photon-server-4]: https://packages.vmware.com/photon/4.0/
[download-linux-redhat-server-8]: https://access.redhat.com/downloads/content/479/
[download-linux-redhat-server-7]: https://access.redhat.com/downloads/content/69/
Expand Down
3 changes: 3 additions & 0 deletions build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ menu:
- entry: "VMware Photon OS 4"
build:
path: "builds/linux/photon/4/"
- entry: "Debian 11"
build:
path: "builds/linux/debian/11/"
- entry: "Ubuntu Server 22.04 LTS Beta"
build:
path: "builds/linux/ubuntu/22-04-lts/"
Expand Down
178 changes: 178 additions & 0 deletions builds/linux/debian/11/data/ks.pkrtpl.hcl
Original file line number Diff line number Diff line change
@@ -0,0 +1,178 @@
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
# WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
# OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

# Debian 11

# Locale and Keyboard
d-i debian-installer/locale string ${vm_guest_os_language}
d-i keyboard-configuration/xkb-keymap select ${vm_guest_os_keyboard}

# Clock and Timezone
d-i clock-setup/utc boolean true
d-i clock-setup/ntp boolean true
d-i time/zone string ${vm_guest_os_timezone}

# Grub and Reboot Message
d-i finish-install/reboot_in_progress note
d-i grub-installer/only_debian boolean true

# Partitioning
d-i partman-auto/method string lvm
d-i partman-lvm/confirm boolean true
d-i partman-lvm/confirm_nooverwrite boolean true
d-i partman-lvm/device_remove_lvm boolean true
d-i partman-auto-lvm/new_vg_name string sysvg
d-i partman-efi/non_efi_system boolean true

d-i partman-auto/expert_recipe string \
custom :: \
1024 1024 1024 fat32 \
$primary{ } \
mountpoint{ /boot/efi } \
method{ efi } \
format{ } \
use_filesystem{ } \
filesystem{ vfat } \
label { EFIFS } \
. \
1024 1024 1024 xfs \
$bootable{ } \
$primary{ } \
mountpoint{ /boot } \
method{ format } \
format{ } \
use_filesystem{ } \
filesystem{ xfs } \
label { BOOTFS } \
. \
1024 1024 1024 linux-swap \
$lvmok{ } \
lv_name{ lv_swap } \
in_vg { sysvg } \
method{ swap } \
format{ } \
label { SWAPFS } \
. \
12288 12288 -1 xfs \
$lvmok{ } \
mountpoint{ / } \
lv_name{ lv_root } \
in_vg { sysvg } \
method{ format } \
format{ } \
use_filesystem{ } \
filesystem{ xfs } \
label { ROOTFS } \
. \
4096 4096 4096 xfs \
$lvmok{ } \
mountpoint{ /home } \
lv_name{ lv_home } \
in_vg { sysvg } \
method{ format } \
format{ } \
use_filesystem{ } \
filesystem{ xfs } \
label { HOMEFS } \
options/nodev{ nodev } \
options/nosuid{ nosuid } \
. \
2048 2048 2048 xfs \
$lvmok{ } \
mountpoint{ /opt } \
lv_name{ lv_opt } \
in_vg { sysvg } \
method{ format } \
format{ } \
use_filesystem{ } \
filesystem{ xfs } \
label { OPTFS } \
options/nodev{ nodev } \
. \
3072 3072 3072 xfs \
$lvmok{ } \
mountpoint{ /tmp } \
lv_name{ lv_tmp } \
in_vg { sysvg } \
method{ format } \
format{ } \
use_filesystem{ } \
filesystem{ xfs } \
label { TMPFS } \
options/nodev{ nodev } \
options/noexec{ noexec } \
options/nosuid{ nosuid } \
. \
4096 4096 4096 xfs \
$lvmok{ } \
mountpoint{ /var } \
lv_name{ lv_var } \
in_vg { sysvg } \
method{ format } \
format{ } \
use_filesystem{ } \
filesystem{ xfs } \
label { VARFS } \
options/nodev{ nodev } \
. \
4096 4096 4096 xfs \
$lvmok{ } \
mountpoint{ /var/log } \
lv_name{ lv_log } \
in_vg { sysvg } \
method{ format } \
format{ } \
use_filesystem{ } \
filesystem{ xfs } \
label { LOGFS } \
options/nodev{ nodev } \
options/noexec{ noexec } \
options/nosuid{ nosuid } \
. \
4096 4096 4096 xfs \
$lvmok{ } \
mountpoint{ /var/log/audit } \
lv_name{ lv_audit } \
in_vg { sysvg } \
method{ format } \
format{ } \
use_filesystem{ } \
filesystem{ xfs } \
label { AUDITFS } \
options/nodev{ nodev } \
options/noexec{ noexec } \
options/nosuid{ nosuid } \
. \

d-i partman-partitioning/confirm_write_new_label boolean true
d-i partman/choose_partition select finish
d-i partman/confirm boolean true
d-i partman/confirm_nooverwrite boolean true

# Network configuration
d-i netcfg/choose_interface select auto
d-i netcfg/get_hostname string unassigned-hostname
d-i netcfg/get_domain string unassigned-domain

# Mirror settings
d-i mirror/country string manual
d-i mirror/http/hostname string ftp.it.debian.org
d-i mirror/http/directory string /debian
d-i mirror/http/proxy string

# User Configuration
d-i passwd/root-login boolean false
d-i passwd/user-fullname string ${build_username}
d-i passwd/username string ${build_username}
d-i passwd/user-password-crypted password ${build_password_encrypted}

# Package Configuration
d-i pkgsel/run_tasksel boolean false
d-i pkgsel/include string openssh-server open-vm-tools

# Add User to Sudoers
d-i preseed/late_command string \
echo '${build_username} ALL=(ALL) NOPASSWD: ALL' > /target/etc/sudoers.d/${build_username} ; \
in-target chmod 440 /etc/sudoers.d/${build_username} ;
42 changes: 42 additions & 0 deletions builds/linux/debian/11/linux-debian.auto.pkrvars.hcl
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
/*
DESCRIPTION:
Debian 11 variables used by the Packer Plugin for VMware vSphere (vsphere-iso).
*/

// Guest Operating System Metadata
vm_guest_os_language = "en_US"
vm_guest_os_keyboard = "us"
vm_guest_os_timezone = "UTC"
vm_guest_os_family = "linux"
vm_guest_os_name = "debian"
vm_guest_os_version = "11"

// Virtual Machine Guest Operating System Setting
vm_guest_os_type = "debian11_64Guest"

// Virtual Machine Hardware Settings
vm_firmware = "efi-secure"
vm_cdrom_type = "sata"
vm_cpu_sockets = 2
vm_cpu_cores = 1
vm_cpu_hot_add = false
vm_mem_size = 2048
vm_mem_hot_add = false
vm_disk_size = 40960
vm_disk_controller_type = ["pvscsi"]
vm_disk_thin_provisioned = false
vm_network_card = "vmxnet3"

// Removable Media Settings
iso_path = "iso/linux/debian"
iso_file = "debian-11.3.0-amd64-netinst.iso"
iso_checksum_type = "sha256"
iso_checksum_value = "7892981e1da216e79fb3a1536ce5ebab157afdd20048fe458f2ae34fbc26c19b"

// Boot Settings
vm_boot_order = "disk,cdrom"
vm_boot_wait = "5s"

// Communicator Settings
communicator_port = 22
communicator_timeout = "30m"
Loading

0 comments on commit 6049bdc

Please sign in to comment.