Skip to content
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

Closed
wants to merge 42 commits into from

Conversation

ThinGuy
Copy link
Contributor

@ThinGuy ThinGuy commented Aug 31, 2023

Changes to vmware-esxi to build ESXi 8.0b
Change any call that attempts fusermount -u to fusermount -z -u

ThinGuy added 21 commits August 31, 2023 10:30
- Set packer version to 1.9+
- Use latest packer plugin
- Fix missing spaces in boot_cmd and use <spacebar> command
- Change base RAM to 8GB
- Change qemu -cpu arg from host to max to "Enables all features supported by the accelerator in the current host"
Instruct fusermount to perform a lazy unmounts to prevent image  hanging on a device busy message
Have fusermount perform lazy unmounts to prevent hanging
@CodeBleu
Copy link

@ThinGuy I was looking around to see if any newer forks had any updates in them to fix the fuse stuff, and possibly Fedora38 OS as well...or any Fedora Server for that matter. I then found your fork and was noticing you knocking stuff out. Appreciate it!

I'm assuming this will fix #126 ?

@ThinGuy
Copy link
Contributor Author

ThinGuy commented Sep 1, 2023

@ThinGuy I was looking around to see if any newer forks had any updates in them to fix the fuse stuff, and possibly Fedora38 OS as well...or any Fedora Server for that matter. I then found your fork and was noticing you knocking stuff out. Appreciate it!

I'm assuming this will fix #126 ?

I hope so! Currently, rhel 9.2 builds clean but the installation hits the 30-minute timeout. Curtin runs without error, server is set up correctly, but it never tells MAAS that the installation is completed.

Copy link
Contributor

@alexsander-souza alexsander-souza left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

awesome job, but it needs some tweaks

@@ -27,12 +27,12 @@ exec &> /var/log/maas.log
set +e

# Enable SSH
# vim-cmd hostsvc/enable_ssh
Copy link
Contributor

Choose a reason for hiding this comment

The 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.


# Enable ESXi shell
# vim-cmd hostsvc/enable_esx_shell
# vim-cmd hostsvc/start_esx_shell
vim-cmd hostsvc/enable_esx_shell
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same as above, keep this disabled

@@ -10,7 +10,11 @@ export PACKER_LOG KS_PROXY
all: rhel9.tar.gz

check-deps:
dpkg -s libnbd-bin nbdkit packer fuse2fs > /dev/null
@if [ $(shell lsb_release -sr|cut -d. -f1) -le 20 ];then \
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
@if [ $(shell lsb_release -sr|cut -d. -f1) -le 20 ];then \
@if [ $(shell lsb_release -sr|cut -d. -f1) -ge 22 ];then \
dpkg -s libnbd-bin nbdkit packer fuse2fs > /dev/null; \
else \
dpkg -s libnbd0 nbdkit packer fuse2fs > /dev/null; \
fi

@@ -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
Copy link
Contributor

Choose a reason for hiding this comment

The 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.

@@ -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 \
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

see suggestion in the RHEL makefile above

@@ -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 \
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

see suggestion in the makefiles above

@@ -25,9 +25,9 @@ source "qemu" "esxi" {
headless = true
iso_checksum = "none"
iso_url = var.vmware_esxi_iso_path
memory = 4096
memory = 8192
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it this really necessary?

when fuse-tar-root creates an tarball of \$ROOT_MOUNT it should exclude unix sockets (created by lxd, ssh, etc), otherwise these non-fatal errors are in the log:

tar: ./tmp/ssh-7tMRv9PdwU/agent.1402: socket ignored
tar: ./var/snap/lxd/common/lxd/unix.socket: socket ignored
tar: ./var/snap/lxd/common/lxd-user/unix.socket: socket ignored
@alexsander-souza
Copy link
Contributor

superseded by #137, #138, #139 and #140

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants