Linux VM clone or restore with Oracle

Salves 501 Reputation points
2020-06-30T23:30:36.867+00:00

Hi,

we have a VM with Linux and Oracle installed on Azure protected with Azure Backup.

When we restore the VM using Azure Backup, if this VM is connected to the same vnet as the lan network, I will have a problem with the production VM, because there is already a VM with the same hostname and IP.

What is the correct procedure to perform this procedure?

  • Restore the VM with another name;
  • Connect a vnet that has no connectivity to the lan vnet;
  • Add a public IP to access this restored VM;
  • Change the name of the VM on the Linux operating system;
  • Change the VM IP on the Linux operating system;

How to know the MAC ADDRESS of a VM in Azure to change the linux operating system? Or when adding vnet to the VM that is going to be restored, does azure backup fix a mac adrress problem in the operating system?

In the case of Oracle Standlone, just exchange the information on TNSORAANME.

Does this procedure make sense?

Thank you.

Azure Backup
Azure Backup
An Azure backup service that provides built-in management at scale.
1,491 questions
{count} votes

2 answers

Sort by: Most helpful
  1. SadiqhAhmed-MSFT 49,326 Reputation points Microsoft Employee Moderator
    2020-07-03T14:26:41.917+00:00

    Not an expert with Oracle or Linux, so my input is limited. However, in general, when you perform any VM-level restore (using Azure Backup or 3rd party solutions), you are the one that controls which VNet it is created in.

    Obviously, if you do a full VM restore in the same VNet, there is going to be a duplication of VMs with the same hostname. The IP Address should not be the same, as (assuming you’re restoring in Azure), the VM will get a DHCP address from the VNet it’s being created in.

    But, in a restore operation, it should be Standard Operating Procedure (SOP) to ensure the original VM is shutdown and not broadcasting on the same VNet (for obvious, and observed reasons). Else, perform the restore in a bubble-VNet that’s isolated.

    In Azure, even if you perform a restore to a “new” VM with another name, that will not solve your problem. This is because, there is a difference/disconnect between the Azure VM name, and the actual FQDN/Hostname that the VM itself sees/knows. You could have the VM (in the Azure portal) be restored as “VM2”, but since it’s a VM-level restore, inside the OS, the VM itself is still named “VM1”.

    Adding a Public IP Address is not a solution either. It’s not recommended (generally), depending on the environment, etc. For example, you wouldn’t want to restore your database VM with a Public IP, and expose it.

    You also should not change the IP Address from within the VM itself (again, assuming it’s running in Azure). Even if you want it to have a static IP, you have to manage this through the Azure control-plane, via the NIC object configuration, and not inside the VM (as this will break connectivity, etc. to the VM).

    As for the MAC Address question, note the following in the Create, change, or delete a network interface documentation:

    Azure assigns a MAC address to the network interface only after the network interface is attached to a virtual machine and the virtual machine is started the first time. You cannot specify the MAC address that Azure assigns to the network interface. The MAC address remains assigned to the network interface until the network interface is deleted or the private IP address assigned to the primary IP configuration of the primary network interface is changed.

    Since, during a VM-level restore, you’re creating a new VM, then there won’t be a duplicate MAC Address issue, since a new NIC will be created and assigned.

    Hope that helps a little.

    1 person found this answer helpful.

  2. Leon Laude 86,026 Reputation points
    2020-07-01T00:04:37.667+00:00

    Hi,

    There are simpler methods rather than restoring from a backup, you could easily clone if you would have created a managed image of a virtual machine, or VHD, you can read more about it here:

    How to create a managed image of a virtual machine or VHD
    https://learn.microsoft.com/en-us/azure/virtual-machines/linux/capture-image

    You could also create a copy of your Linux VM by using Azure CLI:

    Create a copy of a Linux VM by using Azure CLI and Managed Disks
    https://learn.microsoft.com/en-us/azure/virtual-machines/linux/copy-vm

    Best regards,
    Leon


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.