0

I have changed the MAC address of a Google compute engine vm. After that, I can't access from rdp to that vm any more. The vm is not pingable also. I've tried to access from serial port with no luck. It just dropped me to a SAC console and I can't revert the change from SAC. I've also tried to make a snapshot of the hard disk and create a new vm with that snapshot. The new vm can't be pingable also.

Is there any way I can do to recovery the machine or at least I can get the data on the disk?

3

If your instance cannot be directly accessed, you will need to delete it without deleting the boot disk and then attach the disk to another working instance from the same zone in order to be able to access the disk contents or troubleshoot the operating system.

The steps would be the following:

  1. Delete the VM instance without deleting the boot disk. If the instance has an ephemeral IP you wish to retain, you can promote it to static before deleting the instance.
  2. Attach that disk to another working instance from the same zone as a secondary disk.
  3. Mount the disk on that instance without formatting it.

You should now have access to the disk contents and may be able to troubleshoot your Operating System and/or recover needed data. In case that you have been able to fix your Operating System you may follow the next steps in order to recover a working instance:

  1. Unmount the disk and then detach it.
  2. Use the disk to create a new VM instance with the same characteristics (name, network, etc) as the original.
  • Accessing the VM via the serial console might also work, but only if a user password was previously defined. In any case attaching the disk to an accessible VM will always work. – Carlos Jan 19 '18 at 14:46
1

Another Solution Borrowing from dezhi's answer above. If you can't remember your mac address.

  1. enable serial access from Google compute engine console in the vm details
  2. access the SAC console via serial port 2 from Google compute engine console in the vm details
  3. type cmd to access the command line
  4. use ch and ch -si to switch to cmd prompt. You can access the vm's cli env now. (ch-si 1 to go to cmd mode)
  5. run powershell in cmd env
  6. run getmac to get the current MAC address
  7. install TMAC you can use various cmd tools to download it
  8. Use there cmd install guide here
  9. Navigate to the TMAC installation folder using cd
  10. Run ipconfig to know the mis-configured adapter name
  11. Run TMACv6.0>tmac -n Ethernet -nr -re to reset your adapters Mac Address.Where Ethernet is you adapter's name.

Hope this helps some one out there :) Ref:

0

I've managed to revert the MAC address change following the steps below finally:

  1. enable serial access from Google compute engine console in the vm details
  2. access the SAC console via serial port 2 from Google compute engine console in the vm details
  3. type cmd to access the command line
  4. use ch and ch -si to switch to cmd prompt. You can access the vm's cli env now.
  5. run powershell in cmd env
  6. run getmac to get the current MAC address
  7. run Set-NetAdapter -name $name -macaddress $mac to revert the MAC address change. In my case, I've only changed the last digit of the MAC address, so it's very easy to revert it.
  8. exit powershell and cmd to go back to SAC console, then restart the vm. After reboot, everything is OK.

Ref:

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.