11 Replies Latest reply on Dec 26, 2016 9:29 AM by DanielJGF

    Migrate ESXi6 to new disks

    Stefu Lurker

      Hi,

       

      I have to migrate my actual installation to new ssd disks and here is the situation:

      Disks:

      1. 320GB rotating disk with main esxi 6.0u2 installation plus some storage for vm and boot images
      2. 320GB rotating disk with storage for vm and boot images
      3. 2TB rotating disk used as RDM in vm1 part of a sw raid5 inside the vm
      4. 2TB rotating disk used as RDM in vm1 part of a sw raid5 inside the vm
      5. 2TB rotating disk used as RDM in vm1 part of a sw raid5 inside the vm
      6. 2TB rotating disk used as RDM in vm1 part of a sw raid5 inside the vm

      Now, I bought 2 new 250 GB SSD drives which i want to use instead of the 2 320GB (no matter about lower size, I have free space).

      I can't find any description how to securely replace the disk without losing the RDM sw raid devices.

      Also I have no other internal sata port available but I have usb disk docking station (a clone station but not suitable for lower size disk cloning) to temporary put other max 4 devices.

       

      Any kind suggestion?

       

      Thanks in advance.

       

      SR

        • 1. Re: Migrate ESXi6 to new disks
          Luciano Patrao Hot Shot
          vExpert

          Hi,

           

          First you cannot move the ESXi install to another disk. For that you need a new install. If you have a USB key, or Flash Card(depeding on your Server) you can install the ESXi on those devices(with the option preserve VMFS Volumes).

          For the VMs you have in those 320Gb, if you don't have any other Storage to migrated them, and have no slots to add the new disks(hotplug, or just power down the ESXi and add them), I don't see how you can do that.

           

          You can copy, backup the VMs to an external HDD and restore them again after you add the new disks.

           

          That is the only solution I see here.

           

          Hope this can help.

          • 2. Re: Migrate ESXi6 to new disks
            Stefu Lurker

            Thanks Luciano,

            I understand there's no way to "copy" vmware installed disks to others and I'm thinking I have to:

            1. Backup VM configuration only (not vm disks, i have not enough  room for them) on external USB spare device
              • Problems:
                • How can this backup have to be done? it's esxi and afaik there's no free tool: can vm/ESXi configuration be "exported"? I have to look around and try.
                • How vmware can see those USB storage? I had problems in the past, but i recently update to latest 6u2 + patches and I have to check again
            2. Pull out both 320GB disks and plug them as USB connected device (I can do, I have a dual USB base available)
            3. Leave 4 * 2TB disk connected as before
            4. Plug the two new SSD disks on place of old 320GB
              • The situation then will be:
                • 2 * 250GB SSD connected to internal sata
                • 4 * 4TB still connected to internal sata as before
                • 2 * 320GB connected to external USB base
            5. Fresh install the ESXi on the new SSD (first of the 2)
            6. Copy the 2 storage containing vms disks and configurations from old 320s to new ssds
            7. Restore the vm inside ESXi
              • Problems:
                • Will the be, the directly attached devices (the 4* 2 TB disks), still visible to the vm in the same way they were seen before? I have a SW raid inside the machine and I don't want to lose my data which I can't backup because I have no 6 TB available to store those data...

             

            Any suggestion?

             

            Thanks

             

            SR

            • 3. Re: Migrate ESXi6 to new disks
              Luciano Patrao Hot Shot
              vExpert

              Hi,

               

              First you have so many configurations on your ESXi that you need to backup?? If not, just do a clean install ESXi will recognize the Datastores that are already in that server(always remember to choose the option, preserve VMFS, and then just add the VMs to the the Inventory manually.

              But even you want to backup the ESXi configuration, you can use this: http://slymsoft.com/esxi-conf-backup/

               

              Regarding this:

              Will the be, the directly attached devices (the 4* 2 TB disks), still visible to the vm in the same way they were seen before? I have a SW raid inside the machine and I don't want to lose my data which I can't backup because I have no 6 TB available to store those data...

              As long you do not touch the server RAID configurations, I don't see any issues. This is as just a Volume that is presented to the ESXi, nothing else.

               

              But if was me, to separate everything, I would use a USB Key(like 32Gb) to install the ESXi. Not install in the Local Disks. NExt time you have any issue like this, you just need to work on that USB key, the rest you don't need to touch.

               

              Hope this can help.

              • 4. Re: Migrate ESXi6 to new disks
                wila Guru
                User ModeratorsCommunity WarriorsvExpert

                Hi,

                 

                Make backups!

                 

                At least from your VMs and data before updating. Your choice of using a RDM configuration within a software RAID on one of your VMs as storage complicates matters and it depends on implementation details on if that will work fine or not.

                vSphere will not be able to discover that when you migrate.

                Yes it should be possible to upgrade, but you cannot "migrate to new disks" without a risk of data loss due to your RDM dependency.

                 

                --

                Wil

                | Author of Vimalin. The virtual machine Backup app for VMware Desktop Products
                | Vimalin : Automated backups for VMware Fusion and VMware Workstation Professional
                | More info at https://www.vimalin.com
                | Twitter @wilva
                | VMware Wiki at http://www.vi-toolkit.com
                • 5. Re: Migrate ESXi6 to new disks
                  Luciano Patrao Hot Shot
                  vExpert

                  Hi,

                   

                  Yes any this type of changes, should always be planned with a proper Backup of all VMs. But it seems that space is an issue here, so don't know if he would be possible Backup those VMs. So if he will do it without a proper Backup, will be a risk yes.

                   

                  Regarding the RDM, as long he install the same ESXi version(and build) and dont touch the RAID, I don't see a big issue with the RDM disks. Even with a VM problem, should always be possible to add/attach them to a new VM. But again, without a Backup, is always a risk.

                  • 6. Re: Migrate ESXi6 to new disks
                    Stefu Lurker

                    Thanks a lot Luciano and Wil,

                    Now I'm sure (as inside myself already was) that backup is needed anyway, then I decided (once money let it be) to do another kind of migration which open new scenarios:

                    1. Do a backup of VM disks and configuration as:
                      1. Cleanup file inside vms
                      2. Shrink disks: is it possible and how? all my disk are dynamically allocated but I can't find a way to shrink the used size once i make room inside fs...
                      3. Copy disk and vm configuration on external USB/network connected device: any suggestion for a quick move of Huge amount of data? I'm thinking rsync (because do some check) over network/mounted nas/device on other pc...
                    2. Buy a compatible HW raid controller:
                      • It must be compliant with my supermicro A1SRi-2758F (https://www.supermicro.nl/products/motherboard/Atom/X10/A1SRi-2758F.cfm)
                      • with at least 8 ports to connect 8*2TB drive (raid 5) and expose them as single device to be used as RDM from a VM (I have room in the case for 8 and already have 7 mounted and only 4 used)
                      • I'm thinking about LSI 9240-8i, 9260-8i, 9261-8i, 9266-8i which seems cheaper, effective and compliant with my pci express 2.0, but I can't find any sure source it will work as HW RAID to connect all 8 *2TB: any other cheap suggestions?
                    3. Connect the 2 new SSD as primary and secondary disk directly on the mainboard
                    4. Plug the controller of point 2, connect the 8*2TB devices and create single HW volume to expose as RDM
                    5. Fresh install vmware ESXi rel 6.0u2 (or 6.5? afaIk is not possible to install it but only to upgrade to it: is it true?)
                    6. Restore VM from backup at point 1 but the one with the big storeg which I can recrate from scratch and then restore data (5TB)

                    How this look like in your opinion? Should it works?

                    In case I need a quick (honest) way to earn money to buy controller and device to backup at least 6TB

                    Thanks in advance

                    SR

                    • 7. Re: Migrate ESXi6 to new disks
                      wila Guru
                      vExpertUser ModeratorsCommunity Warriors

                      Hi,

                       

                      Technically/theoretically Luciano is correct that the migrate can be done, but it depends on so many factors not known to us that my suggestion was "backup first" which is a good recommendation either way with the changes like the one you are after.

                       

                      So many questions, don't have the time to look at all the details for you, but can give some pointers.

                       

                      1.2. Shut down the VMs you have zeroo'd out the data you want to reclaim. It is not enough to "make room inside the fs" you have to actually write out zero's to the free space. After that one way to reclaim is to use the vmkfstools command. For details see: http://vi-toolkit.com/wiki/index.php/Vmkfstools#punchzero

                       

                      1.3. Network attached (using NFS/iSCSI) usually works best as you can then use that as storage from within your host and move/clone the VMs. While nowadays you can actually get usb to work (search virtuallyghetto.com for details) at host level AFAIK you still can't use the VMFS filesystem and use a datastore over USB. Even if you can, it won't be recommended.

                       

                      2. I would expect those LSI's to work, but can't guarantee it. It would be best to select a controller on the VMware HCL (VMware Compatibility Guide - I/O Device Search )

                       

                      You can install vSphere fresh, but if you want to keep your settings then upgrade might be better for your use case.

                      The general consensus is however to install fresh and then use something like host profiles to configure. But IIRC you are using ESXi free and then you don't have host profiles.

                       

                      --

                      Wil

                      | Author of Vimalin. The virtual machine Backup app for VMware Desktop Products
                      | Vimalin : Automated backups for VMware Fusion and VMware Workstation Professional
                      | More info at https://www.vimalin.com
                      | Twitter @wilva
                      | VMware Wiki at http://www.vi-toolkit.com
                      • 8. Re: Migrate ESXi6 to new disks
                        Stefu Lurker

                        Thanks again Wil, your suggestions are very precious.

                         

                        2 The controllers are in the compatibility list (but 9066) then I'm confident they work: what I have to understand is if they are real HW raid and how them can be configured "outside" operating system boot-up

                         

                        1.2 Ok, in windows I find a tool which theoretically zeroes the free space but I have all linux servers inside (mainly centos or ubuntu) and I already haven't found a way to zeroes free space (I have to dig deeply): VI-Toolkit seems a gold mine for those kind of tasks

                         

                        1.3 Ok, got it: no USB datastore, make sense. Remain that NFS is not the best network solution and it's prone on errors during copy. iSCSI should be an option but I'll need to manage an external USB attacjed on my pc as iSCSI lun and I can't think this is a god idea for usb stability.

                        I found that there an "open" solution with rsync (and then limited in speed for shell limitation) here: Free VMware backup software for ESXi OS download | SourceForge.net but as stated here (Free VMware backup software for ESXi OS / Discussion /  General Discussion:Incremental backup to same host with rsync?) my 5 TB will last forever during the copy.
                        I'm figuring out what can i do it with vmkfstools and local big device of 6 TB for the huge vm, and remaining vms with xsibackup.

                         

                        I'll dig some more and let you know.

                         

                        Still waiting for someone which can suggest me a cheaper HW RAID controller for 8 disks or confirm my choice

                         

                        SR

                        • 9. Re: Migrate ESXi6 to new disks
                          wila Guru
                          User ModeratorsvExpertCommunity Warriors

                          Hi,

                           

                          You configure the LSI controllers normally during the boot phase.

                          After the RAID volumes have been setup, vSphere will be able to use them.

                          For configuring outside of the boot sequence you are most likely out of luck. I've seen some feature for that in the past, but not with recent vSphere editions. You would need support from the hardware manufacturer of the server for that as LSI (nowadays called Avago) does not provide that. I might be wrong on that, but fear it isn't so.

                           

                          1.2 For more tips in regards to cleaning out the zero space and reclaiming space on linux guests, see Shrink guest on hosted platform - VI-Toolkit

                          Actually the basic tip was on there already, but added a line to refer to that article as well.

                           

                          1.3 For free backups I think you could also use Veeam (there are some limitations, not sure what) or use William Lam's vGhetto backup script. ( GitHub - lamw/ghettoVCB: ghettoVCB )

                           

                          As for NFS not being reliable, I don't share that experience and happily migrate VMs to/from NFS datastores. Not sure what you have seen, but it might depend on other factors like the NICs used (mine are almost always intel server NICs)

                          --

                          Wil

                          | Author of Vimalin. The virtual machine Backup app for VMware Desktop Products
                          | Vimalin : Automated backups for VMware Fusion and VMware Workstation Professional
                          | More info at https://www.vimalin.com
                          | Twitter @wilva
                          | VMware Wiki at http://www.vi-toolkit.com
                          • 10. Re: Migrate ESXi6 to new disks
                            Luciano Patrao Hot Shot
                            vExpert

                            Hi.

                             

                            For Backup you can use the Veeam free edition to do that. But doesn't support ESXi free edition.

                             

                            https://www.veeam.com/virtual-machine-backup-solution-free.html

                             

                            Regarding NFS vs iSCSI, I have work and have hundreds of ESXi hosts running on both types and never seen any issues. Like Wil says, it all depends on the Storage, interfaces and the configuration of course. Both have pros and cons.

                            • 11. Re: Migrate ESXi6 to new disks
                              DanielJGF Novice

                              Hi, I'm Daniel J. García from 33hops.com:


                              XSIBackup is one of our products, you can use our Free version wich offers full functionality without any constraint in the number of VMs or their size, or get the Pro version, which will offer you extended fetures like: instant differential backups, full deduplication backend, etc.... Compare editions here: https://33hops.com/xsibackup-pro-vmware-esxi-backup.html#compfreevspro


                              About XSIBACKUP-FREE:

                              Those posts at Sourceforge refer to using rsync for "over IP" backups. XSIBackup uses vmkfstools for local backups (datastore to datastore), thus you should get maximum speed if you keep in the context of the local datastores. As stated, Rsync is used for IP backups, this feature is part of the Free version too. Unfortunately Rsync was conceived many years ago, and it's not able to "jump" over zeroed holes, so it walks throughout all the files' nominal size to copy it to the other end, thus, you're right, moving a 5TB. file over IP by using this method would take a wormhole. If you use compression (zip at minimum campression rate) in the SSH tunnel, you can speed up transfers over WAN, but this is no magic. OpenSSH has a small buffersize and although it will lower your overall requested time by a factor of 2 or 3, we would still be talking about interstellar magnitudes of time. This is for the first full copy, so if you are able not to Ctrl+C during the first copy, which would in turn require a connection stable enough to last for days or weeks without a flaw... You might think at this point that everything will be much easier now, as Rsync will take care of transfering only changed bytes. But again, Rsync was not designed to sync huge fixed length size files, but smaller files of variable size. At this point Rsync will start to calculate checksums to get to the changed bytes in a 5 TB. file, but the ESXi shell will only use a core, and it will use it fully until it has the diff data.


                              Conclusion: XSIBACKUP-FREE will offer you maximum speed in datastore to datastore backups, so you can use it for small to huge .vmdk files. Over IP backups via Rsync will be useful for small to mid sized .vmdk files. 


                              XSIBACKUP-PRO ( https://33hops.com/xsibackup-pro-vmware-esxi-backup.htmlhttps://33hops.com/xsibackup-pro-vmware-esxi-backup.htmlhttps://33hops.com/xsibackup-pro-vmware-esxi-backup.html ) has an option called OneDiff that stores changed blocks between backups and sends them locally or over IP to a mirrored copy, this allows syncronizing two VMs without the need to calculate delta checksums. The expected backup time with OneDiff is what it takes to take a snapshot plus the time required to transfer the changed blocks plus some more seconds for stats output. With vmkfstools you can expect 70-80 mb/s on commodity hardware with regular hard disks and from that figures up for proper servers.


                              For any question related to XSIBACKUP-FREE, please post to Sourceforge's discussion group here: https://sourceforge.net/p/xsibackup/discussion/