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

Install form ISO does not eject ISO #194

Open
nbodewitz-alterra opened this issue Sep 5, 2024 · 15 comments
Open

Install form ISO does not eject ISO #194

nbodewitz-alterra opened this issue Sep 5, 2024 · 15 comments

Comments

@nbodewitz-alterra
Copy link

Running against a cluster that has AOS 6.5.6.5 After the Image install the ISO does not Eject I can run it on a 6.7 cluster and it ejects and continues the build as expected. I am not sure if this is Packer related or just an AOS bug.

@PS1c0m
Copy link

PS1c0m commented Sep 23, 2024

AOS 6.8 is not ejecting as well. Centos is in endless install loop.

@darthVikes
Copy link

Can also confirm 6.5.6.6 has this issue, I have
packer-plugin-nutanix_v0.9.0_x5.0_linux_amd64

@darthVikes
Copy link

One possible workaround if you are using RHEL v9 or equiv.

reboot --kexec

RHEL 9.x Documentation said is a tech preview feature, so use at own risk. So this may only work for 9.x, I didn't check older OS's.

@tuxtof
Copy link
Contributor

tuxtof commented Sep 30, 2024

Hello @nbodewitz-alterra @PS1c0m @darthVikes

I'd like to look into this problem with you, so that we can redirect him to the right team.

on my side, i have made the following successful test

AOS 6.6.2 + PC 2023.4.0.2 => OK
AOS 6.7.1.8 + PC 2023.4.0.2 => OK
AOS 6.7.1.8 + PC 2024.2 => OK
AOS 6.8.1.5 + PC 2024.2 => OK

could each of you share with me:

  • the OS you are using
  • your packer project
  • the exact PC + PE + AHV version

so i will try to reproduce

@PS1c0m looks like you are already in 6.8 , are you able to upgrade to 6.8.1.5 and made a test ?

Thanks

@PS1c0m
Copy link

PS1c0m commented Sep 30, 2024

@darthVikes thanks, the "reboot --kexec" works with rocky8 and 9 both as it loads kernel without reboot.
@tuxtof I already have AOS 6.8.1.5 + PC 2024.2 + AHV el8.nutanix.20230302.101026
My packer configuration where I tried to install Rocky-9.4-x86_64-dvd.iso from ISO (tested that Rocky-8.10-x86_64-dvd1.iso behaved the same):

packer {
  required_plugins {
    nutanix = {
      version = ">= 0.9.2"
      source  = "github.com/nutanix-cloud-native/nutanix"
    }
  }
}

variable "cluster" {
  type    = string
}

variable "password" {
  type    = string
}

variable "prismcentral" {
  type    = string
}

variable "username" {
  type    = string
}

source "nutanix" "rocky9" {
  cd_files         = ["rocky/ks.cfg"]
  cd_label         = "OEMDRV"
  cluster_name     = var.cluster
  force_deregister = true
  image_delete     = false
  image_name       = "rocky9"
  nutanix_endpoint = var.prismcentral
  nutanix_password = var.password
  nutanix_port     = "9440"
  nutanix_username = var.username
  os_type          = "Linux"
  shutdown_command = "echo 'packer' | sudo -S shutdown -P now"
  shutdown_timeout = "2m"
  ssh_password     = "packer"
  ssh_username     = "root"
  vm_disks {
    image_type        = "ISO_IMAGE"
    source_image_name = "Rocky-9.4-x86_64-dvd.iso"
  }
  vm_disks {
    disk_size_gb = 20
    image_type   = "DISK"
  }
  vm_name = "rocky9-build"
  vm_nics {
    subnet_name = "subnet_name"
  }
}

build {
  sources = ["source.nutanix.rocky9"]
  provisioner "shell" {
     script = "rocky/setup.sh"
     execute_command = "echo 'cloud-user' | {{.Vars}} sudo -S -E bash '{{.Path}}'"
     expect_disconnect = "true"
  }
}

and kickstarter:

cdrom
lang en_US.UTF-8
keyboard us
timezone Europe/Tallinn --isUtc
network --onboot yes --bootproto dhcp
rootpw --plaintext packer
firewall --disabled
selinux --permissive
bootloader --location=mbr
text
skipx
zerombr
clearpart --all --initlabel
part pv.0 --fstype="lvmpv" --ondisk=sda --size=8192 --grow
part /boot --fstype="ext4" --ondisk=sda --size=512
volgroup os --pesize=4096 pv.0
logvol swap --fstype="swap" --size=2048 --name=swap --vgname=os
logvol /tmp --fstype="ext4" --size=1024 --name=tmp --vgname=os
logvol / --fstype="ext4" --size=8192 --grow --name=root --vgname=os
auth --enableshadow --passalgo=sha512 --kickstart
firstboot --disabled
eula --agreed
services --enabled=NetworkManager,sshd
reboot --eject

%packages --ignoremissing --excludedocs
@Core

curl

%post
echo "PermitRootLogin yes" > /etc/ssh/sshd_config.d/01-permitrootlogin.conf
%end

Not sure if it's a rocky/kickstarter problem or packer nutanix plugin...

@tuxtof
Copy link
Contributor

tuxtof commented Sep 30, 2024

Hello @PS1c0m

just try right now with your packer config and kickstart file
on OS 6.8.1.5 + PC 2024.2 + AHV 20230302.101026

image

i just create an empty file for your rocky/setup.sh, so i hve not this part of your process

everything is working as expected, that's very strange

can you launch me the command with PACKER_LOG=1 and share the output

@PS1c0m
Copy link

PS1c0m commented Sep 30, 2024

Still no luck, it stays in the "==> nutanix.auto-rocky9: Waiting for SSH to become available..." section as SSH never becomes available. VM is not booting up and every time it restarts the first time after kickstarter install it stays in the boot menu and waits until the kickstarter loads again. see the picture:
Screenshot from 2024-09-30 18-39-22
I'm not sure if the boot order is the same for you @tuxtof? As the CR-ROM is first and it's not ejected it always will boot from there. If I manually click the eject button for CR-ROM ISO after the kickstarter install then the install finishes sucessfuly.
Screenshot from 2024-09-30 18-42-03

Full output with PACKER_LOG=1

PACKER_LOG=1 packer build --var-file=settings.pkrvars.hcl rocky/rocky9.pkr.hcl 
2024/09/30 18:33:03 [INFO] Packer version: 1.11.2 [go1.21.12 linux amd64]
2024/09/30 18:33:03 [INFO] PACKER_CONFIG env var not set; checking the default config file path
2024/09/30 18:33:03 [INFO] PACKER_CONFIG env var set; attempting to open config file: /root/.packerconfig
2024/09/30 18:33:03 [WARN] Config file doesn't exist: /root/.packerconfig
2024/09/30 18:33:03 [INFO] Setting cache directory: /root/.cache/packer
2024/09/30 18:33:03 [TRACE] listing potential installations for "github.com/nutanix-cloud-native/nutanix" that match ">= 0.9.2". plugingetter.ListInstallationsOptions{PluginDirectory:"/root/.config/packer/plugins", BinaryInstallationOptions:plugingetter.BinaryInstallationOptions{APIVersionMajor:"5", APIVersionMinor:"0", OS:"linux", ARCH:"amd64", Ext:"", Checksummers:[]plugingetter.Checksummer{plugingetter.Checksummer{Type:"sha256", Hash:(*sha256.digest)(0xc000731a00)}}, ReleasesOnly:false}}
2024/09/30 18:33:03 [TRACE] version "v0.9.0" of file "/root/.config/packer/plugins/github.com/nutanix-cloud-native/nutanix/packer-plugin-nutanix_v0.9.0_x5.0_linux_amd64" does not match constraint ">= 0.9.2"
2024/09/30 18:33:03 [TRACE] Found the following "github.com/nutanix-cloud-native/nutanix" installations: [{/root/.config/packer/plugins/github.com/nutanix-cloud-native/nutanix/packer-plugin-nutanix_v0.9.2_x5.0_linux_amd64 v0.9.2 x5.0}]
2024/09/30 18:33:03 [INFO] found external [-packer-default-plugin-name-] builders from nutanix plugin
2024/09/30 18:33:03 [TRACE] listing potential installations for <nil> that match "". plugingetter.ListInstallationsOptions{PluginDirectory:"/root/.config/packer/plugins", BinaryInstallationOptions:plugingetter.BinaryInstallationOptions{APIVersionMajor:"5", APIVersionMinor:"0", OS:"linux", ARCH:"amd64", Ext:"", Checksummers:[]plugingetter.Checksummer{plugingetter.Checksummer{Type:"sha256", Hash:(*sha256.digest)(0xc0000c8780)}}, ReleasesOnly:false}}
2024/09/30 18:33:04 [INFO] found external [-packer-default-plugin-name-] builders from nutanix plugin
2024/09/30 18:33:04 [INFO] found external [clone iso supervisor] builders from vsphere plugin
2024/09/30 18:33:04 [INFO] found external [-packer-default-plugin-name- template] post-processors from vsphere plugin
2024/09/30 18:33:04 found external [-packer-default-plugin-name-] provisioner from windows-update plugin
2024/09/30 18:33:04 [TRACE] validateValue: not active for cluster, so skipping
2024/09/30 18:33:04 [TRACE] validateValue: not active for password, so skipping
2024/09/30 18:33:04 [TRACE] validateValue: not active for prismcentral, so skipping
2024/09/30 18:33:04 [TRACE] validateValue: not active for username, so skipping
2024/09/30 18:33:04 [INFO] Starting external plugin /root/.config/packer/plugins/github.com/nutanix-cloud-native/nutanix/packer-plugin-nutanix_v0.9.2_x5.0_linux_amd64 start builder -packer-default-plugin-name-
2024/09/30 18:33:04 Starting plugin: /root/.config/packer/plugins/github.com/nutanix-cloud-native/nutanix/packer-plugin-nutanix_v0.9.2_x5.0_linux_amd64 []string{"/root/.config/packer/plugins/github.com/nutanix-cloud-native/nutanix/packer-plugin-nutanix_v0.9.2_x5.0_linux_amd64", "start", "builder", "-packer-default-plugin-name-"}
2024/09/30 18:33:04 Waiting for RPC address for: /root/.config/packer/plugins/github.com/nutanix-cloud-native/nutanix/packer-plugin-nutanix_v0.9.2_x5.0_linux_amd64
2024/09/30 18:33:04 packer-plugin-nutanix_v0.9.2_x5.0_linux_amd64 plugin: 2024/09/30 18:33:04 Plugin address: unix /tmp/packer-plugin2275564049
2024/09/30 18:33:04 Received unix RPC address for /root/.config/packer/plugins/github.com/nutanix-cloud-native/nutanix/packer-plugin-nutanix_v0.9.2_x5.0_linux_amd64: addr is /tmp/packer-plugin2275564049
2024/09/30 18:33:04 packer-plugin-nutanix_v0.9.2_x5.0_linux_amd64 plugin: 2024/09/30 18:33:04 Waiting for connection...
2024/09/30 18:33:04 packer-plugin-nutanix_v0.9.2_x5.0_linux_amd64 plugin: 2024/09/30 18:33:04 Serving a plugin connection...
2024/09/30 18:33:04 packer-plugin-nutanix_v0.9.2_x5.0_linux_amd64 plugin: 2024/09/30 18:33:04 [TRACE] starting builder -packer-default-plugin-name-
2024/09/30 18:33:04 packer-plugin-nutanix_v0.9.2_x5.0_linux_amd64 plugin: 2024/09/30 18:33:04 No Communicator Type set, setting to 'ssh'
2024/09/30 18:33:04 packer-plugin-nutanix_v0.9.2_x5.0_linux_amd64 plugin: 2024/09/30 18:33:04 No CPU configured, defaulting to '1'
2024/09/30 18:33:04 packer-plugin-nutanix_v0.9.2_x5.0_linux_amd64 plugin: 2024/09/30 18:33:04 No VM Memory configured, defaulting to '4096'
2024/09/30 18:33:04 packer-plugin-nutanix_v0.9.2_x5.0_linux_amd64 plugin: 2024/09/30 18:33:04 No correct VM Boot Type configured, defaulting to 'legacy'
2024/09/30 18:33:04 packer-plugin-nutanix_v0.9.2_x5.0_linux_amd64 plugin: 2024/09/30 18:33:04 SSHPort not set, defaulting to 22
2024/09/30 18:33:04 packer-plugin-nutanix_v0.9.2_x5.0_linux_amd64 plugin: 2024/09/30 18:33:04 SSHTimeout not set, defaulting to 20min
2024/09/30 18:33:04 [INFO] Starting internal plugin packer-provisioner-shell
2024/09/30 18:33:04 Starting plugin: /usr/bin/packer []string{"/usr/bin/packer", "execute", "packer-provisioner-shell"}
2024/09/30 18:33:04 Waiting for RPC address for: /usr/bin/packer
2024/09/30 18:33:04 packer-provisioner-shell plugin: [INFO] Packer version: 1.11.2 [go1.21.12 linux amd64]
2024/09/30 18:33:04 packer-provisioner-shell plugin: [INFO] PACKER_CONFIG env var not set; checking the default config file path
2024/09/30 18:33:04 packer-provisioner-shell plugin: [INFO] PACKER_CONFIG env var set; attempting to open config file: /root/.packerconfig
2024/09/30 18:33:04 packer-provisioner-shell plugin: [WARN] Config file doesn't exist: /root/.packerconfig
2024/09/30 18:33:04 packer-provisioner-shell plugin: [INFO] Setting cache directory: /root/.cache/packer
2024/09/30 18:33:04 packer-provisioner-shell plugin: args: []string{"packer-provisioner-shell"}
2024/09/30 18:33:04 packer-provisioner-shell plugin: Plugin address: unix /tmp/packer-plugin4291803822
2024/09/30 18:33:04 Received unix RPC address for /usr/bin/packer: addr is /tmp/packer-plugin4291803822
2024/09/30 18:33:04 packer-provisioner-shell plugin: Waiting for connection...
2024/09/30 18:33:04 packer-provisioner-shell plugin: Serving a plugin connection...
nutanix.auto-rocky9: output will be in this color.

2024/09/30 18:33:04 Build debug mode: false
2024/09/30 18:33:04 Force build: false
2024/09/30 18:33:04 On error: 
2024/09/30 18:33:04 Waiting on builds to complete...
2024/09/30 18:33:04 Starting build run: nutanix.auto-rocky9
2024/09/30 18:33:04 Running builder: nutanix
2024/09/30 18:33:04 [INFO] (telemetry) Starting builder nutanix.auto-rocky9
2024/09/30 18:33:04 packer-plugin-nutanix_v0.9.2_x5.0_linux_amd64 plugin: 2024/09/30 18:33:04 PC Host from config: utonium.ntx.estpak.ee
==> nutanix.auto-rocky9: Creating CD disk...
2024/09/30 18:33:04 packer-plugin-nutanix_v0.9.2_x5.0_linux_amd64 plugin: 2024/09/30 18:33:04 CD label is set to OEMDRV
2024/09/30 18:33:04 packer-plugin-nutanix_v0.9.2_x5.0_linux_amd64 plugin: 2024/09/30 18:33:04 CD path: /tmp/packer1986603437.iso
2024/09/30 18:33:04 packer-plugin-nutanix_v0.9.2_x5.0_linux_amd64 plugin: 2024/09/30 18:33:04 Wrote 866 bytes to ks.cfg
2024/09/30 18:33:04 packer-plugin-nutanix_v0.9.2_x5.0_linux_amd64 plugin: 2024/09/30 18:33:04 Executing: /usr/bin/mkisofs [-joliet -volid OEMDRV -o /tmp/packer1986603437.iso /tmp/packer_to_cdrom1499408645]
    nutanix.auto-rocky9: Warning: creating filesystem with Joliet extensions but without Rock Ridge
    nutanix.auto-rocky9: extensions. It is highly recommended to add Rock Ridge.
    nutanix.auto-rocky9: I: -input-charset not specified, using utf-8 (detected in locale settings)
    nutanix.auto-rocky9: Total translation table size: 0
    nutanix.auto-rocky9: Total rockridge attributes bytes: 0
    nutanix.auto-rocky9: Total directory bytes: 0
    nutanix.auto-rocky9: Path table size(bytes): 10
    nutanix.auto-rocky9: Max brk space used 0
    nutanix.auto-rocky9: 181 extents written (0 MB)
    nutanix.auto-rocky9: Done copying paths from CD_dirs
2024/09/30 18:33:04 packer-plugin-nutanix_v0.9.2_x5.0_linux_amd64 plugin: 2024/09/30 18:33:04 check for CD disk to attach
==> nutanix.auto-rocky9: Uploading CD disk...
2024/09/30 18:33:04 packer-plugin-nutanix_v0.9.2_x5.0_linux_amd64 plugin: 2024/09/30 18:33:04 CD disk found /tmp/packer1986603437.iso
2024/09/30 18:33:04 packer-plugin-nutanix_v0.9.2_x5.0_linux_amd64 plugin: 2024/09/30 18:33:04 creating image: packer1986603437.iso
2024/09/30 18:33:05 packer-plugin-nutanix_v0.9.2_x5.0_linux_amd64 plugin: 2024/09/30 18:33:05 checking task 4299f95e-0ba9-4fcf-a73e-77e3630abd93...
2024/09/30 18:33:05 packer-plugin-nutanix_v0.9.2_x5.0_linux_amd64 plugin: 2024/09/30 18:33:05 task status is QUEUED
2024/09/30 18:33:10 packer-plugin-nutanix_v0.9.2_x5.0_linux_amd64 plugin: 2024/09/30 18:33:10 task status is RUNNING
2024/09/30 18:33:15 packer-plugin-nutanix_v0.9.2_x5.0_linux_amd64 plugin: 2024/09/30 18:33:15 uploading image: /tmp/packer1986603437.iso
    nutanix.auto-rocky9: CD disk uploaded packer1986603437.iso
2024/09/30 18:33:21 packer-plugin-nutanix_v0.9.2_x5.0_linux_amd64 plugin: 2024/09/30 18:33:21 preparing vm auto-rocky9-build...
==> nutanix.auto-rocky9: Creating Packer Builder virtual machine...
2024/09/30 18:33:23 packer-plugin-nutanix_v0.9.2_x5.0_linux_amd64 plugin: 2024/09/30 18:33:23 creating vm auto-rocky9-build...
2024/09/30 18:33:23 packer-plugin-nutanix_v0.9.2_x5.0_linux_amd64 plugin: 2024/09/30 18:33:23 checking task 67b42927-bafc-43e5-ba93-826118d28858...
2024/09/30 18:33:23 packer-plugin-nutanix_v0.9.2_x5.0_linux_amd64 plugin: 2024/09/30 18:33:23 task status is QUEUED
2024/09/30 18:33:28 packer-plugin-nutanix_v0.9.2_x5.0_linux_amd64 plugin: 2024/09/30 18:33:28 vm succesfully created
2024/09/30 18:33:28 packer-plugin-nutanix_v0.9.2_x5.0_linux_amd64 plugin: 2024/09/30 18:33:28 [INFO] Waiting for IP, up to timeout: 15m0s
2024/09/30 18:33:28 packer-plugin-nutanix_v0.9.2_x5.0_linux_amd64 plugin: 2024/09/30 18:33:28 Waiting VM (9de6385b-1622-432a-802e-7191cba92243) ip configuration
2024/09/30 18:33:33 packer-plugin-nutanix_v0.9.2_x5.0_linux_amd64 plugin: 2024/09/30 18:33:33 Waiting VM (9de6385b-1622-432a-802e-7191cba92243) ip configuration
2024/09/30 18:33:38 packer-plugin-nutanix_v0.9.2_x5.0_linux_amd64 plugin: 2024/09/30 18:33:38 Waiting VM (9de6385b-1622-432a-802e-7191cba92243) ip configuration
2024/09/30 18:33:43 packer-plugin-nutanix_v0.9.2_x5.0_linux_amd64 plugin: 2024/09/30 18:33:43 Waiting VM (9de6385b-1622-432a-802e-7191cba92243) ip configuration
2024/09/30 18:33:49 packer-plugin-nutanix_v0.9.2_x5.0_linux_amd64 plugin: 2024/09/30 18:33:49 Waiting VM (9de6385b-1622-432a-802e-7191cba92243) ip configuration
2024/09/30 18:33:54 packer-plugin-nutanix_v0.9.2_x5.0_linux_amd64 plugin: 2024/09/30 18:33:54 Waiting VM (9de6385b-1622-432a-802e-7191cba92243) ip configuration
2024/09/30 18:33:59 packer-plugin-nutanix_v0.9.2_x5.0_linux_amd64 plugin: 2024/09/30 18:33:59 Waiting VM (9de6385b-1622-432a-802e-7191cba92243) ip configuration
2024/09/30 18:34:04 packer-plugin-nutanix_v0.9.2_x5.0_linux_amd64 plugin: 2024/09/30 18:34:04 Waiting VM (9de6385b-1622-432a-802e-7191cba92243) ip configuration
2024/09/30 18:34:09 packer-plugin-nutanix_v0.9.2_x5.0_linux_amd64 plugin: 2024/09/30 18:34:09 Waiting VM (9de6385b-1622-432a-802e-7191cba92243) ip configuration
2024/09/30 18:34:14 packer-plugin-nutanix_v0.9.2_x5.0_linux_amd64 plugin: 2024/09/30 18:34:14 Waiting VM (9de6385b-1622-432a-802e-7191cba92243) ip configuration
2024/09/30 18:34:19 packer-plugin-nutanix_v0.9.2_x5.0_linux_amd64 plugin: 2024/09/30 18:34:19 Waiting VM (9de6385b-1622-432a-802e-7191cba92243) ip configuration
2024/09/30 18:34:24 packer-plugin-nutanix_v0.9.2_x5.0_linux_amd64 plugin: 2024/09/30 18:34:24 Waiting VM (9de6385b-1622-432a-802e-7191cba92243) ip configuration
2024/09/30 18:34:29 packer-plugin-nutanix_v0.9.2_x5.0_linux_amd64 plugin: 2024/09/30 18:34:29 Waiting VM (9de6385b-1622-432a-802e-7191cba92243) ip configuration
2024/09/30 18:34:34 packer-plugin-nutanix_v0.9.2_x5.0_linux_amd64 plugin: 2024/09/30 18:34:34 Waiting VM (9de6385b-1622-432a-802e-7191cba92243) ip configuration
2024/09/30 18:34:40 packer-plugin-nutanix_v0.9.2_x5.0_linux_amd64 plugin: 2024/09/30 18:34:40 Waiting VM (9de6385b-1622-432a-802e-7191cba92243) ip configuration
2024/09/30 18:34:45 packer-plugin-nutanix_v0.9.2_x5.0_linux_amd64 plugin: 2024/09/30 18:34:45 Waiting VM (9de6385b-1622-432a-802e-7191cba92243) ip configuration
2024/09/30 18:34:50 packer-plugin-nutanix_v0.9.2_x5.0_linux_amd64 plugin: 2024/09/30 18:34:50 Waiting VM (9de6385b-1622-432a-802e-7191cba92243) ip configuration
2024/09/30 18:34:55 packer-plugin-nutanix_v0.9.2_x5.0_linux_amd64 plugin: 2024/09/30 18:34:55 Waiting VM (9de6385b-1622-432a-802e-7191cba92243) ip configuration
2024/09/30 18:35:00 packer-plugin-nutanix_v0.9.2_x5.0_linux_amd64 plugin: 2024/09/30 18:35:00 Waiting VM (9de6385b-1622-432a-802e-7191cba92243) ip configuration
2024/09/30 18:35:05 packer-plugin-nutanix_v0.9.2_x5.0_linux_amd64 plugin: 2024/09/30 18:35:05 Waiting VM (9de6385b-1622-432a-802e-7191cba92243) ip configuration
2024/09/30 18:35:10 packer-plugin-nutanix_v0.9.2_x5.0_linux_amd64 plugin: 2024/09/30 18:35:10 Waiting VM (9de6385b-1622-432a-802e-7191cba92243) ip configuration
2024/09/30 18:35:15 packer-plugin-nutanix_v0.9.2_x5.0_linux_amd64 plugin: 2024/09/30 18:35:15 Waiting VM (9de6385b-1622-432a-802e-7191cba92243) ip configuration
2024/09/30 18:35:20 packer-plugin-nutanix_v0.9.2_x5.0_linux_amd64 plugin: 2024/09/30 18:35:20 Waiting VM (9de6385b-1622-432a-802e-7191cba92243) ip configuration
2024/09/30 18:35:25 packer-plugin-nutanix_v0.9.2_x5.0_linux_amd64 plugin: 2024/09/30 18:35:25 Waiting VM (9de6385b-1622-432a-802e-7191cba92243) ip configuration
2024/09/30 18:35:31 packer-plugin-nutanix_v0.9.2_x5.0_linux_amd64 plugin: 2024/09/30 18:35:31 Waiting VM (9de6385b-1622-432a-802e-7191cba92243) ip configuration
2024/09/30 18:35:36 packer-plugin-nutanix_v0.9.2_x5.0_linux_amd64 plugin: 2024/09/30 18:35:36 Waiting VM (9de6385b-1622-432a-802e-7191cba92243) ip configuration
    nutanix.auto-rocky9: Virtual machine auto-rocky9-build created
    nutanix.auto-rocky9: Found IP for virtual machine: 80.235.1.147
2024/09/30 18:35:41 packer-plugin-nutanix_v0.9.2_x5.0_linux_amd64 plugin: 2024/09/30 18:35:41 VM (9de6385b-1622-432a-802e-7191cba92243) configured with ip address 80.235.1.147
2024/09/30 18:35:41 packer-plugin-nutanix_v0.9.2_x5.0_linux_amd64 plugin: 2024/09/30 18:35:41 Nutanix VM UUID: 9de6385b-1622-432a-802e-7191cba92243
2024/09/30 18:35:41 packer-plugin-nutanix_v0.9.2_x5.0_linux_amd64 plugin: 2024/09/30 18:35:41 [INFO] Waiting for SSH, up to timeout: 20m0s
2024/09/30 18:35:41 packer-plugin-nutanix_v0.9.2_x5.0_linux_amd64 plugin: 2024/09/30 18:35:41 [DEBUG] TCP connection to SSH ip/port failed: dial tcp 80.235.1.147:22: connect: connection refused
==> nutanix.auto-rocky9: Using SSH communicator to connect: 80.235.1.147
==> nutanix.auto-rocky9: Waiting for SSH to become available...
2024/09/30 18:35:46 packer-plugin-nutanix_v0.9.2_x5.0_linux_amd64 plugin: 2024/09/30 18:35:46 [DEBUG] TCP connection to SSH ip/port failed: dial tcp 80.235.1.147:22: connect: connection refused
2024/09/30 18:35:51 packer-plugin-nutanix_v0.9.2_x5.0_linux_amd64 plugin: 2024/09/30 18:35:51 [DEBUG] TCP connection to SSH ip/port failed: dial tcp 80.235.1.147:22: connect: connection refused
2024/09/30 18:35:56 packer-plugin-nutanix_v0.9.2_x5.0_linux_amd64 plugin: 2024/09/30 18:35:56 [DEBUG] TCP connection to SSH ip/port failed: dial tcp 80.235.1.147:22: connect: connection refused
2024/09/30 18:36:01 packer-plugin-nutanix_v0.9.2_x5.0_linux_amd64 plugin: 2024/09/30 18:36:01 [DEBUG] TCP connection to SSH ip/port failed: dial tcp 80.235.1.147:22: connect: connection refused
2024/09/30 18:36:06 packer-plugin-nutanix_v0.9.2_x5.0_linux_amd64 plugin: 2024/09/30 18:36:06 [DEBUG] TCP connection to SSH ip/port failed: dial tcp 80.235.1.147:22: connect: connection refused
2024/09/30 18:36:11 packer-plugin-nutanix_v0.9.2_x5.0_linux_amd64 plugin: 2024/09/30 18:36:11 [DEBUG] TCP connection to SSH ip/port failed: dial tcp 80.235.1.147:22: connect: connection refused
2024/09/30 18:36:16 packer-plugin-nutanix_v0.9.2_x5.0_linux_amd64 plugin: 2024/09/30 18:36:16 [DEBUG] TCP connection to SSH ip/port failed: dial tcp 80.235.1.147:22: connect: connection refused
2024/09/30 18:36:21 packer-plugin-nutanix_v0.9.2_x5.0_linux_amd64 plugin: 2024/09/30 18:36:21 [DEBUG] TCP connection to SSH ip/port failed: dial tcp 80.235.1.147:22: connect: connection refused
2024/09/30 18:36:26 packer-plugin-nutanix_v0.9.2_x5.0_linux_amd64 plugin: 2024/09/30 18:36:26 [DEBUG] TCP connection to SSH ip/port failed: dial tcp 80.235.1.147:22: connect: connection refused
2024/09/30 18:36:31 packer-plugin-nutanix_v0.9.2_x5.0_linux_amd64 plugin: 2024/09/30 18:36:31 [DEBUG] TCP connection to SSH ip/port failed: dial tcp 80.235.1.147:22: connect: connection refused
2024/09/30 18:36:36 packer-plugin-nutanix_v0.9.2_x5.0_linux_amd64 plugin: 2024/09/30 18:36:36 [DEBUG] TCP connection to SSH ip/port failed: dial tcp 80.235.1.147:22: connect: connection refused
2024/09/30 18:36:41 packer-plugin-nutanix_v0.9.2_x5.0_linux_amd64 plugin: 2024/09/30 18:36:41 [DEBUG] TCP connection to SSH ip/port failed: dial tcp 80.235.1.147:22: connect: connection refused
2024/09/30 18:36:46 packer-plugin-nutanix_v0.9.2_x5.0_linux_amd64 plugin: 2024/09/30 18:36:46 [DEBUG] TCP connection to SSH ip/port failed: dial tcp 80.235.1.147:22: connect: connection refused
2024/09/30 18:36:51 packer-plugin-nutanix_v0.9.2_x5.0_linux_amd64 plugin: 2024/09/30 18:36:51 [DEBUG] TCP connection to SSH ip/port failed: dial tcp 80.235.1.147:22: connect: connection refused
2024/09/30 18:36:56 packer-plugin-nutanix_v0.9.2_x5.0_linux_amd64 plugin: 2024/09/30 18:36:56 [DEBUG] TCP connection to SSH ip/port failed: dial tcp 80.235.1.147:22: connect: connection refused
2024/09/30 18:37:01 packer-plugin-nutanix_v0.9.2_x5.0_linux_amd64 plugin: 2024/09/30 18:37:01 [DEBUG] TCP connection to SSH ip/port failed: dial tcp 80.235.1.147:22: connect: connection refused
2024/09/30 18:37:06 packer-plugin-nutanix_v0.9.2_x5.0_linux_amd64 plugin: 2024/09/30 18:37:06 [DEBUG] TCP connection to SSH ip/port failed: dial tcp 80.235.1.147:22: connect: connection refused
2024/09/30 18:37:11 packer-plugin-nutanix_v0.9.2_x5.0_linux_amd64 plugin: 2024/09/30 18:37:11 [DEBUG] TCP connection to SSH ip/port failed: dial tcp 80.235.1.147:22: connect: connection refused
2024/09/30 18:37:16 packer-plugin-nutanix_v0.9.2_x5.0_linux_amd64 plugin: 2024/09/30 18:37:16 [DEBUG] TCP connection to SSH ip/port failed: dial tcp 80.235.1.147:22: connect: connection refused
2024/09/30 18:37:21 packer-plugin-nutanix_v0.9.2_x5.0_linux_amd64 plugin: 2024/09/30 18:37:21 [DEBUG] TCP connection to SSH ip/port failed: dial tcp 80.235.1.147:22: connect: connection refused
2024/09/30 18:37:26 packer-plugin-nutanix_v0.9.2_x5.0_linux_amd64 plugin: 2024/09/30 18:37:26 [DEBUG] TCP connection to SSH ip/port failed: dial tcp 80.235.1.147:22: connect: connection refused
2024/09/30 18:37:31 packer-plugin-nutanix_v0.9.2_x5.0_linux_amd64 plugin: 2024/09/30 18:37:31 [DEBUG] TCP connection to SSH ip/port failed: dial tcp 80.235.1.147:22: connect: connection refused
2024/09/30 18:37:36 packer-plugin-nutanix_v0.9.2_x5.0_linux_amd64 plugin: 2024/09/30 18:37:36 [DEBUG] TCP connection to SSH ip/port failed: dial tcp 80.235.1.147:22: connect: connection refused
2024/09/30 18:37:41 packer-plugin-nutanix_v0.9.2_x5.0_linux_amd64 plugin: 2024/09/30 18:37:41 [DEBUG] TCP connection to SSH ip/port failed: dial tcp 80.235.1.147:22: connect: connection refused
2024/09/30 18:37:46 packer-plugin-nutanix_v0.9.2_x5.0_linux_amd64 plugin: 2024/09/30 18:37:46 [DEBUG] TCP connection to SSH ip/port failed: dial tcp 80.235.1.147:22: connect: connection refused
2024/09/30 18:37:51 packer-plugin-nutanix_v0.9.2_x5.0_linux_amd64 plugin: 2024/09/30 18:37:51 [DEBUG] TCP connection to SSH ip/port failed: dial tcp 80.235.1.147:22: connect: connection refused
2024/09/30 18:37:56 packer-plugin-nutanix_v0.9.2_x5.0_linux_amd64 plugin: 2024/09/30 18:37:56 [DEBUG] TCP connection to SSH ip/port failed: dial tcp 80.235.1.147:22: connect: connection refused
2024/09/30 18:38:01 packer-plugin-nutanix_v0.9.2_x5.0_linux_amd64 plugin: 2024/09/30 18:38:01 [DEBUG] TCP connection to SSH ip/port failed: dial tcp 80.235.1.147:22: connect: connection refused
2024/09/30 18:38:06 packer-plugin-nutanix_v0.9.2_x5.0_linux_amd64 plugin: 2024/09/30 18:38:06 [DEBUG] TCP connection to SSH ip/port failed: dial tcp 80.235.1.147:22: connect: connection refused
2024/09/30 18:38:11 packer-plugin-nutanix_v0.9.2_x5.0_linux_amd64 plugin: 2024/09/30 18:38:11 [DEBUG] TCP connection to SSH ip/port failed: dial tcp 80.235.1.147:22: connect: connection refused
2024/09/30 18:38:16 packer-plugin-nutanix_v0.9.2_x5.0_linux_amd64 plugin: 2024/09/30 18:38:16 [DEBUG] TCP connection to SSH ip/port failed: dial tcp 80.235.1.147:22: connect: connection refused
2024/09/30 18:38:21 packer-plugin-nutanix_v0.9.2_x5.0_linux_amd64 plugin: 2024/09/30 18:38:21 [DEBUG] TCP connection to SSH ip/port failed: dial tcp 80.235.1.147:22: connect: connection refused
2024/09/30 18:38:26 packer-plugin-nutanix_v0.9.2_x5.0_linux_amd64 plugin: 2024/09/30 18:38:26 [DEBUG] TCP connection to SSH ip/port failed: dial tcp 80.235.1.147:22: connect: connection refused
2024/09/30 18:38:46 packer-plugin-nutanix_v0.9.2_x5.0_linux_amd64 plugin: 2024/09/30 18:38:46 [DEBUG] TCP connection to SSH ip/port failed: dial tcp 80.235.1.147:22: i/o timeout
2024/09/30 18:38:54 packer-plugin-nutanix_v0.9.2_x5.0_linux_amd64 plugin: 2024/09/30 18:38:54 [DEBUG] TCP connection to SSH ip/port failed: dial tcp 80.235.1.147:22: connect: no route to host
2024/09/30 18:39:02 packer-plugin-nutanix_v0.9.2_x5.0_linux_amd64 plugin: 2024/09/30 18:39:02 [DEBUG] TCP connection to SSH ip/port failed: dial tcp 80.235.1.147:22: connect: no route to host
2024/09/30 18:39:08 packer-plugin-nutanix_v0.9.2_x5.0_linux_amd64 plugin: 2024/09/30 18:39:08 [DEBUG] TCP connection to SSH ip/port failed: dial tcp 80.235.1.147:22: connect: no route to host
2024/09/30 18:39:14 packer-plugin-nutanix_v0.9.2_x5.0_linux_amd64 plugin: 2024/09/30 18:39:14 [DEBUG] TCP connection to SSH ip/port failed: dial tcp 80.235.1.147:22: connect: no route to host
2024/09/30 18:39:20 packer-plugin-nutanix_v0.9.2_x5.0_linux_amd64 plugin: 2024/09/30 18:39:20 [DEBUG] TCP connection to SSH ip/port failed: dial tcp 80.235.1.147:22: connect: no route to host
2024/09/30 18:39:26 packer-plugin-nutanix_v0.9.2_x5.0_linux_amd64 plugin: 2024/09/30 18:39:26 [DEBUG] TCP connection to SSH ip/port failed: dial tcp 80.235.1.147:22: connect: no route to host
2024/09/30 18:39:33 packer-plugin-nutanix_v0.9.2_x5.0_linux_amd64 plugin: 2024/09/30 18:39:33 [DEBUG] TCP connection to SSH ip/port failed: dial tcp 80.235.1.147:22: connect: no route to host
2024/09/30 18:39:39 packer-plugin-nutanix_v0.9.2_x5.0_linux_amd64 plugin: 2024/09/30 18:39:39 [DEBUG] TCP connection to SSH ip/port failed: dial tcp 80.235.1.147:22: connect: no route to host
2024/09/30 18:39:45 packer-plugin-nutanix_v0.9.2_x5.0_linux_amd64 plugin: 2024/09/30 18:39:45 [DEBUG] TCP connection to SSH ip/port failed: dial tcp 80.235.1.147:22: connect: no route to host
2024/09/30 18:39:51 packer-plugin-nutanix_v0.9.2_x5.0_linux_amd64 plugin: 2024/09/30 18:39:51 [DEBUG] TCP connection to SSH ip/port failed: dial tcp 80.235.1.147:22: connect: no route to host
2024/09/30 18:39:57 packer-plugin-nutanix_v0.9.2_x5.0_linux_amd64 plugin: 2024/09/30 18:39:57 [DEBUG] TCP connection to SSH ip/port failed: dial tcp 80.235.1.147:22: connect: no route to host
2024/09/30 18:40:03 packer-plugin-nutanix_v0.9.2_x5.0_linux_amd64 plugin: 2024/09/30 18:40:03 [DEBUG] TCP connection to SSH ip/port failed: dial tcp 80.235.1.147:22: connect: no route to host
2024/09/30 18:40:09 packer-plugin-nutanix_v0.9.2_x5.0_linux_amd64 plugin: 2024/09/30 18:40:09 [DEBUG] TCP connection to SSH ip/port failed: dial tcp 80.235.1.147:22: connect: no route to host
2024/09/30 18:40:16 packer-plugin-nutanix_v0.9.2_x5.0_linux_amd64 plugin: 2024/09/30 18:40:16 [DEBUG] TCP connection to SSH ip/port failed: dial tcp 80.235.1.147:22: connect: no route to host
2024/09/30 18:40:22 packer-plugin-nutanix_v0.9.2_x5.0_linux_amd64 plugin: 2024/09/30 18:40:22 [DEBUG] TCP connection to SSH ip/port failed: dial tcp 80.235.1.147:22: connect: no route to host
2024/09/30 18:40:27 packer-plugin-nutanix_v0.9.2_x5.0_linux_amd64 plugin: 2024/09/30 18:40:27 [DEBUG] TCP connection to SSH ip/port failed: dial tcp 80.235.1.147:22: connect: connection refused
2024/09/30 18:40:32 packer-plugin-nutanix_v0.9.2_x5.0_linux_amd64 plugin: 2024/09/30 18:40:32 [DEBUG] TCP connection to SSH ip/port failed: dial tcp 80.235.1.147:22: connect: connection refused
2024/09/30 18:40:37 packer-plugin-nutanix_v0.9.2_x5.0_linux_amd64 plugin: 2024/09/30 18:40:37 [DEBUG] TCP connection to SSH ip/port failed: dial tcp 80.235.1.147:22: connect: connection refused
2024/09/30 18:40:42 packer-plugin-nutanix_v0.9.2_x5.0_linux_amd64 plugin: 2024/09/30 18:40:42 [DEBUG] TCP connection to SSH ip/port failed: dial tcp 80.235.1.147:22: connect: connection refused
2024/09/30 18:40:47 packer-plugin-nutanix_v0.9.2_x5.0_linux_amd64 plugin: 2024/09/30 18:40:47 [DEBUG] TCP connection to SSH ip/port failed: dial tcp 80.235.1.147:22: connect: connection refused
2024/09/30 18:40:52 packer-plugin-nutanix_v0.9.2_x5.0_linux_amd64 plugin: 2024/09/30 18:40:52 [DEBUG] TCP connection to SSH ip/port failed: dial tcp 80.235.1.147:22: connect: connection refused
2024/09/30 18:40:57 packer-plugin-nutanix_v0.9.2_x5.0_linux_amd64 plugin: 2024/09/30 18:40:57 [DEBUG] TCP connection to SSH ip/port failed: dial tcp 80.235.1.147:22: connect: connection refused
2024/09/30 18:41:02 packer-plugin-nutanix_v0.9.2_x5.0_linux_amd64 plugin: 2024/09/30 18:41:02 [DEBUG] TCP connection to SSH ip/port failed: dial tcp 80.235.1.147:22: connect: connection refused
2024/09/30 18:41:07 packer-plugin-nutanix_v0.9.2_x5.0_linux_amd64 plugin: 2024/09/30 18:41:07 [DEBUG] TCP connection to SSH ip/port failed: dial tcp 80.235.1.147:22: connect: connection refused
2024/09/30 18:41:12 packer-plugin-nutanix_v0.9.2_x5.0_linux_amd64 plugin: 2024/09/30 18:41:12 [DEBUG] TCP connection to SSH ip/port failed: dial tcp 80.235.1.147:22: connect: connection refused
2024/09/30 18:41:17 packer-plugin-nutanix_v0.9.2_x5.0_linux_amd64 plugin: 2024/09/30 18:41:17 [DEBUG] TCP connection to SSH ip/port failed: dial tcp 80.235.1.147:22: connect: connection refused
2024/09/30 18:41:22 packer-plugin-nutanix_v0.9.2_x5.0_linux_amd64 plugin: 2024/09/30 18:41:22 [DEBUG] TCP connection to SSH ip/port failed: dial tcp 80.235.1.147:22: connect: connection refused

@tuxtof
Copy link
Contributor

tuxtof commented Oct 4, 2024

Hi @PS1c0m
can you also try to add boot_type = "UEFI" in your source hcl

@PS1c0m
Copy link

PS1c0m commented Oct 7, 2024

Hi @PS1c0m can you also try to add boot_type = "UEFI" in your source hcl

I can confirm that boot_type = "UEFI" worked and the build succeeded properly.

@M1gh7yP1r473
Copy link

Still a problem here using plugin 0.9.4. Our AOS is 6.5.6.6 (AHV-20220304.511). The "Windows Server 2019" setup loops until we manually stop the VM and eject the Windows ISO after setup starts the first reboot. We had no problem before with AOS 6.5.5 (AHV-20220304.478).

The boot_type is and was already set to uefi. The hcl files are untouched. Only Nutanix was updated and the plugin to try the new version. Sadly no changes.

We checked if we can use the internal Nutanix Playbooks (X-Play) to eject the ISO when WIndows setup reboots but this is a software triggered reboot inside the VM and so the event is not visible to the host/prism and cannot be used as a trigger here.

@riccsnet
Copy link

I am having the same problem.

OS of Packer image build RHEL8.6

Packer Project
packer.zip

AOS 6.10 + PC 2024.2.0.1 + AHV 20230302.102001

@tuxtof
Copy link
Contributor

tuxtof commented Jan 3, 2025

The problem occurs randomly across different versions, and we cannot find a consistent method to reproduce it.

in the meantime the boot_priority is a good workaround so just set

boot_priority = "disk"

in your config file and it will be normally OK

@darthVikes
Copy link

Where does boot_priority = disk get set in the config?

@tuxtof
Copy link
Contributor

tuxtof commented Jan 3, 2025

i will publish the release and the docs in few minutes :-D

@tuxtof
Copy link
Contributor

tuxtof commented Jan 3, 2025

@darthVikes v0.10.0 is available with the corresponding doc, i let you check

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

No branches or pull requests

6 participants