-
Notifications
You must be signed in to change notification settings - Fork 175
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixes for vmware-esxi builder and any builders that the fuse scripts. #131
Changes from 37 commits
316c44d
75d8cb5
956a29e
7d441f3
8f3eb48
df9cb08
45b98f7
564891b
2e2e5bc
2c160d3
b9e9c69
9fc46c5
1f1a5c6
b5871cc
0d5c0e6
66cd434
d62e566
4c4511e
001e308
d57589b
406d8dd
d0b924c
a029356
2c8fc47
afd0a89
b3175b6
9761506
6f13830
1126242
2dbf2f8
58d1c11
a9c8918
153586b
1b2b9e8
910723f
946d881
9438dcf
093c017
f1902eb
cbfbee7
a80d04a
b842bed
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,7 +8,14 @@ The Packer template in this directory creates a RHEL 9 AMD64 image for use with | |
|
||
* A machine running Ubuntu 22.04+ with the ability to run KVM virtual machines. | ||
* qemu-utils, libnbd-bin, nbdkit and fuse2fs | ||
* [Packer](https://www.packer.io/intro/getting-started/install.html), v1.8.0 or newer | ||
* packer - from Hashicorp repository, v1.9.0 or newer | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. keep the reference to Packer install page. It's easier to keep docs up to date if we rely on external resources. |
||
|
||
```shell | ||
wget -O- https://apt.releases.hashicorp.com/gpg | sudo gpg --dearmor -o /etc/apt/trusted.gpg.d/hashicorp-archive-keyring.gpg | ||
echo "deb [signed-by=/etc/apt/trusted.gpg.d/hashicorp-archive-keyring.gpg] https://apt.releases.hashicorp.com $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/hashicorp.list | ||
sudo apt update && sudo apt install packer | ||
``` | ||
|
||
* The [RHEL 9 DVD ISO](https://developers.redhat.com/products/rhel/download) | ||
|
||
## Requirements (to deploy the image) | ||
|
@@ -43,7 +50,7 @@ be in packer-maas/rhel9, where this file is located. Once in packer-maas/rhel9 | |
you can generate an image with: | ||
|
||
```shell | ||
sudo packer init | ||
sudo packer init . | ||
sudo PACKER_LOG=1 packer build -var 'rhel9_iso_path=/PATH/TO/rhel-baseos-9.1-x86_64-dvd.iso' . | ||
``` | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,8 +8,11 @@ SUDO ?= sudo | |
all: custom-cloudimg.tar.gz | ||
|
||
check-deps: | ||
dpkg -s libnbd-bin nbdkit packer fuse2fs cloud-image-utils ovmf > /dev/null | ||
|
||
@if [ $(shell lsb_release -sr|cut -d. -f1) -le 20 ];then \ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. see suggestion in the RHEL makefile above |
||
dpkg -s libnbd0 nbdkit packer fuse2fs fusefat cloud-image-utils ovmf > /dev/null; \ | ||
elif [ $(shell lsb_release -sr|cut -d. -f1) -gt 20 ];then \ | ||
dpkg -s libnbd-bin nbdkit packer fuse2fs fusefat cloud-image-utils ovmf > /dev/null; \ | ||
fi | ||
lint: | ||
packer validate . | ||
packer fmt -check -diff . | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,7 @@ vmaccepteula | |
# If changed be sure to update the vcenter script below. | ||
rootpw password123! | ||
|
||
install --firstdisk | ||
install --firstdisk --ignoreprereqwarnings --ignoreprereqerrors --forceunsupportedinstall | ||
|
||
# Sets VMware ESXi licensing key. If not included installs in | ||
# evaluation mode. | ||
|
@@ -27,12 +27,12 @@ exec &> /var/log/maas.log | |
set +e | ||
|
||
# Enable SSH | ||
# vim-cmd hostsvc/enable_ssh | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. we should keep this disabled, it may pose a security risk for some users and we don't have a good way to alert them of this change. |
||
# vim-cmd hostsvc/start_ssh | ||
vim-cmd hostsvc/enable_ssh | ||
vim-cmd hostsvc/start_ssh | ||
|
||
# Enable ESXi shell | ||
# vim-cmd hostsvc/enable_esx_shell | ||
# vim-cmd hostsvc/start_esx_shell | ||
vim-cmd hostsvc/enable_esx_shell | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. same as above, keep this disabled |
||
vim-cmd hostsvc/start_esx_shell | ||
|
||
# Track whether any network configuration failed. | ||
failed=0 | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,7 +10,11 @@ VENV := .ve | |
all: vmware-esxi.dd.gz | ||
|
||
check-deps: | ||
dpkg -s libnbd-bin nbdkit packer fusefat > /dev/null | ||
@if [ $(shell lsb_release -sr|cut -d. -f1) -le 20 ];then \ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. see suggestion in the makefiles above |
||
dpkg -s libnbd0 nbdkit packer fuse2fs fusefat > /dev/null; \ | ||
elif [ $(shell lsb_release -sr|cut -d. -f1) -gt 20 ];then \ | ||
dpkg -s libnbd-bin nbdkit packer fuse2fs fusefat > /dev/null; \ | ||
fi | ||
|
||
scripts.tar.xz: | ||
export TMP_DIR=$$(mktemp -d /tmp/packer-maas-XXXX);\ | ||
|
@@ -42,4 +46,4 @@ format: $(VENV) | |
clean: | ||
${SUDO} ${RM} -rf output-esxi vmware-esxi.dd vmware-esxi.dd.gz $(VENV) | ||
|
||
.INTERMEDIATE: scripts.tar.xz | ||
.INTERMEDIATE: scripts.tar.xz |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
packer { | ||
required_version = ">= 1.7.0" | ||
required_version = ">= 1.9.0" | ||
required_plugins { | ||
qemu = { | ||
version = "~> 1.0" | ||
version = ">= 1.0.9" | ||
source = "github.com/hashicorp/qemu" | ||
} | ||
} | ||
|
@@ -14,7 +14,7 @@ variable "vmware_esxi_iso_path" { | |
} | ||
|
||
source "qemu" "esxi" { | ||
boot_command = ["<enter><wait>", "<leftShift>O", " ks=cdrom:/KS.CFG", " cpuUniformityHardCheckPanic=FALSE", "systemMediaSize=min", " com1_Port=0x3f8 tty2Port=com1", "<enter>"] | ||
boot_command = ["<enter><wait>", "<leftShift>O", "<spacebar>", "ks=cdrom:/KS.CFG", "<spacebar>", "cpuUniformityHardCheckPanic=FALSE", "<spacebar>", "systemMediaSize=min", "<spacebar>", "com1_Port=0x3f8", "<spacebar>", "tty2Port=com1", "<enter>"] | ||
boot_wait = "3s" | ||
cd_files = ["./KS.CFG"] | ||
cd_label = "kickstart" | ||
|
@@ -25,9 +25,9 @@ source "qemu" "esxi" { | |
headless = true | ||
iso_checksum = "none" | ||
iso_url = var.vmware_esxi_iso_path | ||
memory = 4096 | ||
memory = 8192 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. it this really necessary? |
||
net_device = "vmxnet3" | ||
qemuargs = [["-cpu", "host"], ["-smp", "2,sockets=2,cores=1,threads=1"], ["-serial", "stdio"]] | ||
qemuargs = [["-cpu", "max"], ["-smp", "2,sockets=2,cores=1,threads=1"], ["-serial", "stdio"]] | ||
shutdown_timeout = "1h" | ||
} | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.