2 Replies Latest reply on Nov 6, 2012 3:38 PM by Eric Steed

    Migrating VM's between two repositories

    Eric Steed
      I'm working with a customer that has OVM 3.1.1 running on 2 servers. They originally provisioned a repository of 2T but it turns out that was oversized for their environment. I have helped them create an 800GB repo and now wish to migrate all the VM's from the big one to the smaller one. There are also physical disks assigned to the VM's in question.

      I assume the best way to do this would be to use a clone customizer and "move" the vm from one repo to the other- unchecking the physical disks so they don't get cloned as well. One problem I did run into was that on the cloned VM, the disks that were assigned are out of order (the first two are fine, but the swap virtual disk somehow got stuffed into a different slot number way down the list in the middle of the other physical disks. Thankfully I used ext3 LABELs to mount everything including swap, so that didn't affect things. We're also using ASM and I assume it puts some sort of signature on the disk once the ASM disk group is created so that if the disks show up out of order it won't matter. But it very well could have mattered- this seems like a big big problem and a bug in OVM Manager.

      Either way- is there a better/easier way to move VM's between repos?
        • 1. Re: Migrating VM's between two repositories
          You can clone virtual disks to different repos.

          Physical attachments shouldn't be an issue. Just detach them from your VM guests before you clone the VM. Attach them in the proper order. You're not changing VM servers. So..... ASM disks shouldn't matter as asmlib (if you're using asmlib and you should be) does mark the ASM disks with the proper headers/names. It does not matter what order they appear. The asmlib will find the path to the disk. UNLESS, you have restricted ASMlib to only search for certain disk paths. Most of the time this is necessary unless you have a lot of disks attached.

          I never use more than one virtual system disk per host. I've never found a reason to do such. Its all the same repo. Same IO path/ IO paths. Why would you use different disks for swap? You just create a swap partition for your hosts on the same system disk...
          • 2. Re: Migrating VM's between two repositories
            Eric Steed
            I wound up doing a "move" which is like a clone but it deletes the VM from the source location when it's done. One thing that did happen though like I mentioned above is that it reordered a couple disks. It's a good thing ASM writes signatures like Solaris's ZFS, otherwise it could have been ugly.

            The reason I put swap on a different disk is that I deployed that VM from a template to keep all the VM's the same. I had a base config of 2G swap and then add more with other disks to make the amount of swap I need in the target VM- some of them have different requirements for swap than others and it's easier to keep a small base of 2gb swap. Thanks for your input and sharing of info on ASM- it helps!

            Best Regards,
            Eric Steed