1
I have described the context of the problem in great detail, however if you just want to get to the point, read only the last paragraph.
I was experimenting with ESXi on a box rented from Kimsufi. This device unfortunately only comes with 1 public IP. This IP is assigned to the VMkernel switch which is connected to the 1 NIC card on the server. And this IP is used to manage the box. I have access to the whole set up only via this IP.
I created one switch not connected to the NIC and named this LAN. Created a Desktop VM and assigned its NIC to the LAN. Created another switch and called it WAN. Attached it to the NIC.
After which I created a Firewall VM with 2 NICS - 1 serving as the WAN and another serving as the LAN. Assigned the WAN NIC to the WAN switch and assigned the LAN NIC to the LAN switch. Now the ideal thing to do was to have a second public IP and assign it to the WAN interface of the Firewall after which Desktop VMs connected to the LAN would have internet access. But the problem is that Kimsufi just doesn't give you a second public IP. (Something I decided to overlook thinking that I would somehow get it to work). I decided to fool around and assigned the public IP to the WAN interface on Firewall VM.
Obviously this didn't work. Then I decided to take another approach. I created a VMkernel switch, configured it with an IP address from the LAN and assigned it to the LAN switch. I would use this interface to manage the ESXi host, but I would have to use it from the LAN. I would enable RDP on the desktop VM. Create a rule that forwards RDP traffic from the WAN to this Desktop. Then from this Desktop manage the ESXi host and since my WAN interface is configured with a public IP, VMs on the LAN would have access to the internet. Only problem is that the only public IP I had was assigned to the VMkernel. I decided that I had everything in place to remove this VMkernel. Once I click the remove button, I immediately lose my connectivity to the box and only a reboot bring it back. After the reboot that VMkernel was still there. So the situation until now is I have 1 public IP assigned to the Firewall WAN interface and same is assigned to the VMkernel switch.
Now some weird idea struck me and I decided to configure the VMkernel with some random public IP address, hoping that the public IP on the WAN interface would then become usable and accessible from the WAN. Well, it didn't work. And now I have lost connectivity to the box completely. No reboot brings it back.
My hosting provider does provide a rescue mode. I have booted into it. I am hoping to mount the hard disk with the configuration file and manually change the config back to what it was. The problem is I dont know which partition and which file contains the configuration that I am looking for. I am not even sure if this is even possible.
In short I want to know if and how can I reconfigure the VMkernel switch with the right IP address once I boot into a Linux rescue environment. This is what the fdisk -l output looks like -
Device Boot Start End Blocks Id System
/dev/sda1 8192 1843199 917504 5 Extended
/dev/sda2 1843200 10229759 4193280 6 FAT16
/dev/sda3 10229760 1953525167 971647704 fb VMware VMFS
/dev/sda4 * 32 8191 4080 4 FAT16 <32M
/dev/sda5 8224 520191 255984 6 FAT16
/dev/sda6 520224 1032191 255984 6 FAT16
/dev/sda7 1032224 1257471 112624 fc VMware VMKCORE
/dev/sda8 1257504 1843199 292848 6 FAT16