XCP-ng
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login
    1. Home
    2. auspugs
    A
    Offline
    • Profile
    • Following 0
    • Followers 0
    • Topics 0
    • Posts 2
    • Groups 0

    Luke Attard

    @auspugs

    4
    Reputation
    1
    Profile views
    2
    Posts
    0
    Followers
    0
    Following
    Joined
    Last Online
    Age 43
    Location Melborune, Australia

    auspugs Unfollow Follow

    Latest posts made by auspugs

    • RE: Preventing "new network" detection on different XCP-NG hosts

      @zevgeny

      That does make it easier, I would say the easiest way to do what you are after is to use a NFS/SMB share for the VM storage. Have the VM setup on the second site with the current mac address.

      If you have that already setup, then all you need to do ensure the clone from your DR is exported to the correct location and named correctly, then you can start the VM and you are all set.

      Just some extra information for others people who may have a similar issue, the reason I am suggesting a SMB/NFS share, is both these SR, are file based storage, therefore you have the VHD listed as a file on the system. Unlike Block storage ext, ext4, iscsi, FC etc, these SR use block addresses to separate the different drives.

      The other option would be to use the ovf format of the VM. If you export the current VM in the OVF format then add in the network section as per below replacing the 88:88:88:88:88 with your mac address.

      With this setup you would replace the vhd listed int he OVF with the cloned device from your DR, then import the OVF. If you DR system output the VHD to a certain location, you can simple store the ovf in that location, removing a step.

      <VirtualHardwareSection>
            <Item>
              <rasd:AddressOnParent>7</rasd:AddressOnParent>
              <rasd:AutomaticAllocation>true</rasd:AutomaticAllocation>
              <rasd:Connection>Network 1</rasd:Connection>
              <rasd:Address>88:88:88:88:88:88</rasd:Address>
              <rasd:Description>E1000 ethernet adapter on "Network 1"</rasd:Description>
              <rasd:ElementName>Network adapter 1</rasd:ElementName>
              <rasd:InstanceID>8</rasd:InstanceID>
              <rasd:ResourceSubType>E1000</rasd:ResourceSubType>
              <rasd:ResourceType>10</rasd:ResourceType>
            </Item>
      </VirtualHardwareSection>
      
      posted in Xen Orchestra
      A
      auspugs
    • RE: Preventing "new network" detection on different XCP-NG hosts

      @zevgeny
      Solutions inside windows itself:

      One option would be a script that would check if the static IP is assigned to an interface and if it is not, then assign it to the first interface of the Windows Server, you could use a VBscript, and use wscript or cscript to run the code.

      You could also use a netsh script (I know Microsoft claims netsh is depreciated it has been included in windows 11), or a powershell script would also work.

      On the Linux VM's

      Depending on the distro and the version you are using, netplan can be setup so it applies the static IP address using the order of the device, mac address, label, or even the card and port of the network device. If it is an older version, then ifupdown can also be setup to allocate the IP based on the order the interfaces appear, or via a label.

      However I would not do it that way.

      I dont fully understand how you are doing HA, and ensuring the VM that starts in the second site is up to date? If you are moving the VM after the site goes down, does that mean there is a second link, that joins the two sites?

      If there is a second link, do you have the VM on a shared storage? If you do, then you should be able to migrate the VM over, and therefore the mac will stay the same. iSCSI can work between sites, it really depends on if the services you are running are hard drive intense or memory intense. Alternatively, if there is a second link, can you route the site through the second link, and have the VM's running from the first site?

      Assuming you can not do a migrate, and you somehow get a copy of the VM to the other site. Then when you create the VM in the secondary site, you can always create the VIF that you attach to the new VM. Using the command below, in a simple script, can keep the mac the same on the new VM, I would suggest to script the whole VM creation in this case.

      xe vif-create vm-uuid=uuid_of_the_vm device=0 (or the number of the physical interface you want to use on the xcp box) network-uuid=uuid_of_network_to_connect_to mac=mac_address
      
      

      Keep in mind with a windows server, spinning up a VM that has a snapshot, or a image of a server that is not current at the time the other Server was taken offline, then you will be creating issues with Active Directory (assuming you are using AD), and this could lead to corruption within the AD that you will not be able to fix without MS help.

      The ideally solution in my view, would be having VM running at both sites, in a active passive setup. Again depending on the services you have on the servers, and the network equipment you have. You can setup a VRRP (Virtual Router Redundancy protocol) or do a reverse proxy with something like NGINX to direct the traffic to the second site if the main link is down.

      I understand you may not be able to share too much information in a public forum due to security, If you want to send me a private with more details I can help you out more with reference to your setup.

      posted in Xen Orchestra
      A
      auspugs