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

Vmware-iso cannot correctly mount CD-ROM (DEBIAN) #11095

Closed
KyuOthmane opened this issue Jun 15, 2021 · 3 comments
Closed

Vmware-iso cannot correctly mount CD-ROM (DEBIAN) #11095

KyuOthmane opened this issue Jun 15, 2021 · 3 comments

Comments

@KyuOthmane
Copy link

KyuOthmane commented Jun 15, 2021

Overview of the Issue

I'm trying to build a debian 9 image using (vmware-iso builder) but stuck on mouting CD-ROM
the iso image is selected but not recognized by vmware.
https://ibb.co/qYMPcRM

Reproduction Steps

Build a Debian using vmware-iso builder

Packer version

From 1.7.2

Simplified Packer Buildfile

{
  "builders":[
  {
      "name": "vmware",
      "type": "vmware-iso",
      "remote_type": "esx5",
      "remote_host": "my_host",
      "remote_username": "username,
      "remote_password": "password",
      "remote_datastore": "my_datastore",
      "ssh_host": "host_ssh",
      "ssh_username": "ssh_username",
      "ssh_password": "ssh_password",
      "vnc_over_websocket": true,
      "insecure_connection": true,
      "keep_registered": true,
      "disk_adapter_type": "ide",
      "cdrom_adapter_type": "ide",
      "iso_url": "https://cdimage.debian.org/cdimage/archive/9.13.0/amd64/iso-cd/debian-9.13.0-amd64-xfce-CD-1.iso",
      "iso_checksum": "57d542383401985920d5cd65cc66f24e946e846b32ae3359cfbe9274bd489dea",
      "iso_target_path": "packer_cache/08cec4ad4b6a9096e8cde4b31b224bfc7984333b.iso",
      "boot_wait": "5s",
      "memory": "4096",
      "disk_size": "12000",
      "skip_export": true,
      "ovftool_options": [
      "--noSSLVerify"
      ],
      "tools_upload_flavor": "linux",
      "guest_os_type": "debian9-64",
      "headless": true,
      "shutdown_command": "shutdown -P now",
      "http_directory": "http",
      "http_port_min" : 8001,
      "http_port_max": 8001,
      "cleanup_remote_cache": false,
      "boot_command": [
      "<esc><wait>",
      "debconf/frontend=noninteractive <wait>",
      "keyboard-configuration/xkb-keymap=fr <wait>",
      "grub-installer/bootdev=/dev/sda <enter>"
      ],
      "display_name": "packer_install",
      "vm_name": "packer_install",
      "vmdk_name": "packer_vmdk",
      "vmx_data": {
        "memory": "3072",
        "cpus": "3",
        "ethernet0.networkName": "VM Network 1"
      }
    }]
}

Operating system and Environment details

Debian 9

Log Fragments and crash.log files

2021/06/15 16:29:03 [INFO] Packer version: 1.7.2 [go1.16.3 linux amd64]
2021/06/15 16:29:03 [TRACE] discovering plugins in /usr/bin
2021/06/15 16:29:03 [TRACE] discovering plugins in /home/USER/.packer.d/plugins
2021/06/15 16:29:03 [TRACE] discovering plugins in .
2021/06/15 16:29:03 [INFO] PACKER_CONFIG env var not set; checking the default config file path
2021/06/15 16:29:03 [INFO] PACKER_CONFIG env var set; attempting to open config file: /home/USER/.packerconfig
2021/06/15 16:29:03 [WARN] Config file doesn't exist: /home/USER/.packerconfig
2021/06/15 16:29:03 [INFO] Setting cache directory: /home/USER/devops_tools/packer/debian_v9/packer_cache
2021/06/15 16:29:03 [TRACE] Starting internal plugin packer-builder-vmware-iso
2021/06/15 16:29:03 Starting plugin: /usr/bin/packer []string{"/usr/bin/packer", "plugin", "packer-builder-vmware-iso"}
2021/06/15 16:29:03 Waiting for RPC address for: /usr/bin/packer
2021/06/15 16:29:04 packer-builder-vmware-iso plugin: [INFO] Packer version: 1.7.2 [go1.16.3 linux amd64]
2021/06/15 16:29:04 packer-builder-vmware-iso plugin: [INFO] PACKER_CONFIG env var not set; checking the default config file path
2021/06/15 16:29:04 packer-builder-vmware-iso plugin: [INFO] PACKER_CONFIG env var set; attempting to open config file: /home/USER/.packerconfig
2021/06/15 16:29:04 packer-builder-vmware-iso plugin: [WARN] Config file doesn't exist: /home/USER/.packerconfig
2021/06/15 16:29:04 packer-builder-vmware-iso plugin: [INFO] Setting cache directory: /home/USER/devops_tools/packer/debian_v9/packer_cache
2021/06/15 16:29:04 packer-builder-vmware-iso plugin: args: []string{"packer-builder-vmware-iso"}
2021/06/15 16:29:04 Received unix RPC address for /usr/bin/packer: addr is /tmp/packer-plugin374531288
2021/06/15 16:29:04 packer-builder-vmware-iso plugin: Plugin address: unix /tmp/packer-plugin374531288
2021/06/15 16:29:04 packer-builder-vmware-iso plugin: Waiting for connection...
2021/06/15 16:29:04 packer-builder-vmware-iso plugin: Serving a plugin connection...
2021/06/15 16:29:04 Preparing build: vmware
2021/06/15 16:29:04 Build debug mode: false
2021/06/15 16:29:04 Force build: true
2021/06/15 16:29:04 On error:
2021/06/15 16:29:04 Waiting on builds to complete...
vmware: output will be in this color.
2021/06/15 16:29:04 Starting build run: vmware

2021/06/15 16:29:04 Running builder: vmware-iso
2021/06/15 16:29:04 [INFO] (telemetry) Starting builder vmware-iso
2021/06/15 16:29:04 packer-builder-vmware-iso plugin: [DEBUG] reconnecting to TCP connection for SSH
2021/06/15 16:29:04 packer-builder-vmware-iso plugin: [DEBUG] handshaking with SSH
2021/06/15 16:29:04 packer-builder-vmware-iso plugin: Keyboard interactive challenge:
2021/06/15 16:29:04 packer-builder-vmware-iso plugin: -- User:
2021/06/15 16:29:04 packer-builder-vmware-iso plugin: -- Instructions:
2021/06/15 16:29:04 packer-builder-vmware-iso plugin: -- Question 1: Password:
2021/06/15 16:29:04 packer-builder-vmware-iso plugin: Keyboard interactive challenge:
2021/06/15 16:29:04 packer-builder-vmware-iso plugin: -- User:
2021/06/15 16:29:04 packer-builder-vmware-iso plugin: -- Instructions:
2021/06/15 16:29:04 packer-builder-vmware-iso plugin: [DEBUG] handshake complete!
2021/06/15 16:29:04 packer-builder-vmware-iso plugin: [INFO] no local agent socket, will not connect agent
2021/06/15 16:29:04 packer-builder-vmware-iso plugin: [DEBUG] Opening new ssh session
2021/06/15 16:29:04 packer-builder-vmware-iso plugin: [DEBUG] starting remote command: esxcli --formatter csv system version get
2021/06/15 16:29:04 packer-builder-vmware-iso plugin: Connected to VMware ESXi 7.0.1 Releasebuild-16850804
2021/06/15 16:29:04 packer-builder-vmware-iso plugin: [DEBUG] Opening new ssh session
2021/06/15 16:29:04 packer-builder-vmware-iso plugin: [DEBUG] starting remote command: esxcli --formatter csv system settings advanced list -o /Net/GuestIPHack
2021/06/15 16:29:04 packer-builder-vmware-iso plugin: Testing against vmware driver *common.ESX5Driver, Success: true
==> vmware: Retrieving ISO
==> vmware: Trying https://cdimage.debian.org/cdimage/archive/9.13.0/amd64/iso-cd/debian-9.13.0-amd64-xfce-CD-1.iso
2021/06/15 16:29:04 packer-builder-vmware-iso plugin: Acquiring lock for: https://cdimage.debian.org/cdimage/archive/9.13.0/amd64/iso-cd/debian-9.13.0-amd64-xfce-CD-1.i                                                                     so?checksum=sha256%3A57d542383401985920d5cd65cc66f24e946e846b32ae3359cfbe9274bd489dea (packer_cache/08cec4ad4b6a9096e8cde4b31b224bfc7984333b.iso.lock)
==> vmware: Trying https://cdimage.debian.org/cdimage/archive/9.13.0/amd64/iso-cd/debian-9.13.0-amd64-xfce-CD-1.iso?checksum=sha256%3A57d542383401985920d5cd65cc66f24e94                                                                     6e846b32ae3359cfbe9274bd489dea
2021/06/15 16:29:06 packer-builder-vmware-iso plugin: Leaving retrieve loop for ISO
==> vmware: https://cdimage.debian.org/cdimage/archive/9.13.0/amd64/iso-cd/debian-9.13.0-amd64-xfce-CD-1.iso?checksum=sha256%3A57d542383401985920d5cd65cc66f24e946e846b3                                                                     2ae3359cfbe9274bd489dea => packer_cache/08cec4ad4b6a9096e8cde4b31b224bfc7984333b.iso
==> vmware: Configuring output and export directories...
2021/06/15 16:29:06 packer-builder-vmware-iso plugin: [DEBUG] Opening new ssh session
2021/06/15 16:29:06 packer-builder-vmware-iso plugin: [DEBUG] starting remote command: test -e "/vmfs/volumes/RAID5_LOCAL/packer_install"
2021/06/15 16:29:06 packer-builder-vmware-iso plugin: [ERROR] Remote command exited with '1': test -e "/vmfs/volumes/RAID5_LOCAL/packer_install"
2021/06/15 16:29:06 packer-builder-vmware-iso plugin: [DEBUG] Opening new ssh session
2021/06/15 16:29:06 packer-builder-vmware-iso plugin: [DEBUG] starting remote command: mkdir -p "/vmfs/volumes/RAID5_LOCAL/packer_install"
2021/06/15 16:29:06 packer-builder-vmware-iso plugin: No floppy files specified. Floppy disk will not be made.
2021/06/15 16:29:06 packer-builder-vmware-iso plugin: No CD files specified. CD disk will not be made.
2021/06/15 16:29:06 packer-builder-vmware-iso plugin: running: 57d542383401985920d5cd65cc66f24e946e846b32ae3359cfbe9274bd489dea  /vmfs/volumes/RAID5_LOCAL/packer_cache/                                                                     08cec4ad4b6a9096e8cde4b31b224bfc7984333b.iso | [sha256sum -c]
2021/06/15 16:29:06 packer-builder-vmware-iso plugin: [DEBUG] Opening new ssh session
2021/06/15 16:29:06 packer-builder-vmware-iso plugin: [DEBUG] starting remote command: sha256sum -c
==> vmware: Remote cache was verified skipping remote upload...
==> vmware: Creating required virtual machine disks
2021/06/15 16:29:10 packer-builder-vmware-iso plugin: [INFO] Creating disk with Path: packer_install/packer_vmdk.vmdk and Size: 12000M
2021/06/15 16:29:10 packer-builder-vmware-iso plugin: [DEBUG] Opening new ssh session
2021/06/15 16:29:10 packer-builder-vmware-iso plugin: [DEBUG] starting remote command: vmkfstools -c 12000M -d zeroedthick -a ide "/vmfs/volumes/RAID5_LOCAL/packer_inst                                                                     all/packer_vmdk.vmdk"
==> vmware: Building and writing VMX file
2021/06/15 16:29:10 packer-builder-vmware-iso plugin: Writing VMX to: /tmp/vmw-iso116615255/packer_install.vmx
2021/06/15 16:29:10 packer-builder-vmware-iso plugin: Configuring VMX...
2021/06/15 16:29:10 packer-builder-vmware-iso plugin: Setting VMX: 'ethernet0.networkName' = 'VM Network 1'
2021/06/15 16:29:10 packer-builder-vmware-iso plugin: Setting VMX: 'memory' = '3072'
2021/06/15 16:29:10 packer-builder-vmware-iso plugin: Setting VMX: 'cpus' = '3'
2021/06/15 16:29:10 packer-builder-vmware-iso plugin: Writing VMX to: /tmp/vmw-iso116615255/packer_install.vmx
2021/06/15 16:29:10 packer-builder-vmware-iso plugin: Suppressing messages in VMX
2021/06/15 16:29:10 packer-builder-vmware-iso plugin: Host IP for the VMware machine: IP_RUNNER
2021/06/15 16:29:10 packer-builder-vmware-iso plugin: Found available port: 8001 on IP: 0.0.0.0
==> vmware: Starting HTTP server on port 8001
2021/06/15 16:29:10 packer-builder-vmware-iso plugin: Skipping VNC configuration step...
==> vmware: Registering remote VM...
2021/06/15 16:29:10 packer-builder-vmware-iso plugin: [DEBUG] Opening new ssh session
2021/06/15 16:29:10 packer-builder-vmware-iso plugin: [DEBUG] Starting remote scp process:  scp -vt /vmfs/volumes/RAID5_LOCAL/packer_install
2021/06/15 16:29:10 packer-builder-vmware-iso plugin: [DEBUG] Started SCP session, beginning transfers...
2021/06/15 16:29:10 packer-builder-vmware-iso plugin: [DEBUG] Copying input data into temporary file so we can read the length
2021/06/15 16:29:10 packer-builder-vmware-iso plugin: [DEBUG] scp: Uploading packer_install.vmx: perms=C0644 size=2815
2021/06/15 16:29:10 packer-builder-vmware-iso plugin: [DEBUG] SCP session complete, closing stdin pipe.
2021/06/15 16:29:10 packer-builder-vmware-iso plugin: [DEBUG] Waiting for SSH session to complete.
2021/06/15 16:29:10 packer-builder-vmware-iso plugin: [DEBUG] scp stderr (length 36): Sink: C0644 2815 packer_install.vmx
2021/06/15 16:29:10 packer-builder-vmware-iso plugin: [DEBUG] Opening new ssh session
2021/06/15 16:29:10 packer-builder-vmware-iso plugin: [DEBUG] starting remote command: vim-cmd solo/registervm "/vmfs/volumes/RAID5_LOCAL/packer_install/packer_install.                                                                     vmx"
==> vmware: Starting virtual machine...
    vmware: If the run isn't succeeding as you expect, please enable the GUI
    vmware: to inspect the progress of the build.
    vmware: The VM will be run headless, without a GUI, as configured.
2021/06/15 16:29:11 packer-builder-vmware-iso plugin: [DEBUG] Opening new ssh session
    vmware: If the run isn't succeeding as you expect, please enable the GUI
    vmware: to inspect the progress of the build.
2021/06/15 16:29:11 packer-builder-vmware-iso plugin: [DEBUG] starting remote command: vim-cmd vmsvc/power.on 116
2021/06/15 16:29:12 packer-builder-vmware-iso plugin: [DEBUG] Opening new ssh session
2021/06/15 16:29:12 packer-builder-vmware-iso plugin: [DEBUG] starting remote command: vim-cmd vmsvc/power.getstate 116
==> vmware: Connecting to VNC over websocket...
2021/06/15 16:29:12 packer-builder-vmware-iso plugin: [DEBUG] websocket url: wss://IP_REMOTE:443/ticket/9fba87963526a982
==> vmware: Waiting 5s for boot...
==> vmware: Typing the boot command over VNC...
2021/06/15 16:29:17 packer-builder-vmware-iso plugin: Special code '<esc>' found, replacing with: 0xFF1B
2021/06/15 16:29:17 packer-builder-vmware-iso plugin: [INFO] Waiting 1s
2021/06/15 16:29:18 packer-builder-vmware-iso plugin: Sending char 'i', code 0x69, shift false
2021/06/15 16:29:18 packer-builder-vmware-iso plugin: Sending char 'n', code 0x6E, shift false
2021/06/15 16:29:19 packer-builder-vmware-iso plugin: Sending char 's', code 0x73, shift false
2021/06/15 16:29:19 packer-builder-vmware-iso plugin: Sending char 't', code 0x74, shift false
2021/06/15 16:29:19 packer-builder-vmware-iso plugin: Sending char 'a', code 0x61, shift false
2021/06/15 16:29:19 packer-builder-vmware-iso plugin: Sending char 'l', code 0x6C, shift false
2021/06/15 16:29:19 packer-builder-vmware-iso plugin: Sending char 'l', code 0x6C, shift false
2021/06/15 16:29:20 packer-builder-vmware-iso plugin: Sending char ' ', code 0x20, shift false
2021/06/15 16:29:20 packer-builder-vmware-iso plugin: [INFO] Waiting 1s
2021/06/15 16:29:21 packer-builder-vmware-iso plugin: Sending char 'p', code 0x70, shift false
2021/06/15 16:29:21 packer-builder-vmware-iso plugin: Sending char 'r', code 0x72, shift false
2021/06/15 16:29:21 packer-builder-vmware-iso plugin: Sending char 'e', code 0x65, shift false
2021/06/15 16:29:21 packer-builder-vmware-iso plugin: Sending char 's', code 0x73, shift false
2021/06/15 16:29:22 packer-builder-vmware-iso plugin: Sending char 'e', code 0x65, shift false
2021/06/15 16:29:22 packer-builder-vmware-iso plugin: Sending char 'e', code 0x65, shift false
2021/06/15 16:29:22 packer-builder-vmware-iso plugin: Sending char 'd', code 0x64, shift false
2021/06/15 16:29:22 packer-builder-vmware-iso plugin: Sending char '/', code 0x2F, shift false
2021/06/15 16:29:22 packer-builder-vmware-iso plugin: Sending char 'u', code 0x75, shift false
2021/06/15 16:29:23 packer-builder-vmware-iso plugin: Sending char 'r', code 0x72, shift false
2021/06/15 16:29:23 packer-builder-vmware-iso plugin: Sending char 'l', code 0x6C, shift false
2021/06/15 16:29:23 packer-builder-vmware-iso plugin: Sending char '=', code 0x3D, shift false
2021/06/15 16:29:23 packer-builder-vmware-iso plugin: Sending char 'h', code 0x68, shift false
2021/06/15 16:29:23 packer-builder-vmware-iso plugin: Sending char 't', code 0x74, shift false
2021/06/15 16:29:24 packer-builder-vmware-iso plugin: Sending char 't', code 0x74, shift false
2021/06/15 16:29:24 packer-builder-vmware-iso plugin: Sending char 'p', code 0x70, shift false
2021/06/15 16:29:24 packer-builder-vmware-iso plugin: Sending char ':', code 0x3A, shift true
2021/06/15 16:29:24 packer-builder-vmware-iso plugin: Sending char '/', code 0x2F, shift false
2021/06/15 16:29:25 packer-builder-vmware-iso plugin: Sending char '/', code 0x2F, shift false
2021/06/15 16:29:25 packer-builder-vmware-iso plugin: Sending char '1', code 0x31, shift false
2021/06/15 16:29:25 packer-builder-vmware-iso plugin: Sending char '9', code 0x39, shift false
2021/06/15 16:29:25 packer-builder-vmware-iso plugin: Sending char '2', code 0x32, shift false
2021/06/15 16:29:25 packer-builder-vmware-iso plugin: Sending char '.', code 0x2E, shift false
2021/06/15 16:29:26 packer-builder-vmware-iso plugin: Sending char '1', code 0x31, shift false
2021/06/15 16:29:26 packer-builder-vmware-iso plugin: Sending char '6', code 0x36, shift false
2021/06/15 16:29:26 packer-builder-vmware-iso plugin: Sending char '8', code 0x38, shift false
@SwampDragons
Copy link
Contributor

Hi, thanks for reaching out. We'll try to take a look when we get a chance.

@ghost
Copy link

ghost commented Jun 29, 2021

This issue has been automatically migrated to hashicorp/packer-plugin-vmware#28 because it looks like an issue with that plugin. If you believe this is not an issue with the plugin, please reply to hashicorp/packer-plugin-vmware#28.

@ghost ghost closed this as completed Jun 29, 2021
@github-actions
Copy link

I'm going to lock this issue 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 similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 30, 2021
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants