You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've been using this code for quite some time and lately I started to get an issue in the step where it's trying to reach the Bastion VM and trying to copy the ssh key.
I don't know whether this is a change in the IBM Cloud for VMware itself or terraform provider but initially when a VM is created with the provided code, the Enable guest customization was enabled by default. It looks like this behavior got changed and when a VM is created it is not enabled default and therefore VM is not accessible from internet at all (I checked the firewall and NAT rule, they seemed OK)
This is the error that I got;
null_resource.setup_ssh (local-exec): ssh: connect to host xx.177.58.57 port 22: No route to host
╷
│ Error: local-exec provisioner error
│
│ with null_resource.setup_ssh,
│ on bastion-vm.tf line 354, in resource "null_resource" "setup_ssh":
│ 354: provisioner "local-exec" {
│
│ Error running command 'sleep 90
│ echo "waiting 90 seconds for vm to boot"
│ echo "n" | ssh-keygen -t ed25519 -N '' -f ~/.ssh/id_bastion
│ ssh-keygen -R xx.177.58.57
│ #ssh-agent bash
│ #ssh-add ~/.ssh/id_bastion
│ sshpass -p password ssh-copy-id -o StrictHostKeyChecking=no -i ~/.ssh/id_bastion root@xx.177.58.57 -f
│
│ ': exit status 1. Output: waiting 90 seconds for vm to boot
│ Generating public/private ed25519 key pair.
│ Your identification has been saved in /root/.ssh/id_bastion
│ Your public key has been saved in /root/.ssh/id_bastion.pub
│ The key fingerprint is:
│ SHA256:PfIYwqMfT5rr4RYG77KgerpBTuCxbnlDn1oA0E6xBfM root@terraform-test-vm1.fyre.ibm.com
│ The key's randomart image is:
│ +--[ED25519 256]--+
│ |..+o. |
│ |. o= |
│ |.=. E |
│ |o = .. . |
│ | = o o+ S o |
│ |= o o.=o = . |
│ |.=.o.*o.o . |
│ |.oo.=ooB |
│ |*+ ..=B.. |
│ +----[SHA256]-----+
│ Host xx.177.58.57 not found in /root/.ssh/known_hosts
│ /usr/bin/ssh-copy-id: INFO: Source of key(s) to be installed: "/root/.ssh/id_bastion.pub"
│ ssh: connect to host xx.177.58.57 port 22: No route to host
After I added the following lines to the vcd_vapp_vmbastion I could proceed without any problem.
I've been using this code for quite some time and lately I started to get an issue in the step where it's trying to reach the Bastion VM and trying to copy the ssh key.
I don't know whether this is a change in the IBM Cloud for VMware itself or terraform provider but initially when a VM is created with the provided code, the
Enable guest customization
was enabled by default. It looks like this behavior got changed and when a VM is created it is not enabled default and therefore VM is not accessible from internet at all (I checked the firewall and NAT rule, they seemed OK)This is the error that I got;
After I added the following lines to the
vcd_vapp_vm
bastion
I could proceed without any problem.So I would be happy if you can check if this is a local issue that I get or something more general as I explained.
Thanks.
The text was updated successfully, but these errors were encountered: