VMware vSphere

 View Only
Expand all | Collapse all

Cannot copy vmdk file properly using scp

  • 1.  Cannot copy vmdk file properly using scp

    Posted May 07, 2019 07:18 AM

    Hi :smileyhappy:

    I am attempting to migrate a lot of VMs from old ESXi server (6.5) to new ESXi server (6.7)

    I don't have VMware vCenter (i don't know if i can install vcenter into VM)

    for that; i use scp to copy the VMs files between the two ESXI,  but, when i connect to my ESXI (6.5) and tape scp "Mailcatcher.vmdk" root@172.16.88.22:/vmfs/volumes/datastore1/Mailcatcher , only 505B is copied :smileycry: , the real size is 25GB. author file like ctk.vmdk and -flat.vmdk is copied properly

    I don't have any snapshot in my VM

    Any idea or any suggestions to do this migration?



  • 2.  RE: Cannot copy vmdk file properly using scp

    Posted May 07, 2019 08:08 AM

    Hi youssefC

    Do you have any shared storage which is common to these hosts ?

    Without vCenter (in turn vMotion will not be available) , there is one way to move your VM files from 1st host to other datastore which is hared and then register on 2nd host but you need at-least shared datastore.

    Thanks

    Vysakh Nair

    Blog:- https://www.vxpert.in



  • 3.  RE: Cannot copy vmdk file properly using scp

    Posted May 07, 2019 08:18 AM

    I don't have a shared storage

    i can't use scp ?



  • 4.  RE: Cannot copy vmdk file properly using scp

    Posted May 07, 2019 08:22 AM

    Hi youssefC

    You have below options to do

    • Standalone converter
    • Datastore browser (download and upload files)
    • SCP and then add the VM to the inventory with datastore browser

    scp -r /vmfs/volumes/volume1/path/to/vm-directory esx2:/vmfs/volumes/volume1

    Thanks

    Vysakh Nair

    Blog:- https://www.vxpert.in



  • 5.  RE: Cannot copy vmdk file properly using scp

    Posted May 07, 2019 08:29 AM

    Thank you

    I will try Standalone converter and also with scp

    with datastore browser, i can't upload disk to remote datastore (author server)



  • 6.  RE: Cannot copy vmdk file properly using scp

    Posted May 07, 2019 08:33 AM

    Hi youssefC

    With Datastore browser you can download to your machine and from there upload to second esxi host datastore

    Thanks

    Vysakh Nair

    Blog:- https://www.vxpert.in



  • 7.  RE: Cannot copy vmdk file properly using scp

    Posted May 07, 2019 10:11 AM

    i can use Vcenter into simple VM ? or i need a specific server ?



  • 8.  RE: Cannot copy vmdk file properly using scp

    Posted May 07, 2019 10:30 AM

    Hi youssefC

    vCenter Server Appliance,vCSA a virtual appliance that is based on Linux which you can run on ESXi host.

    Thanks

    Vysakh Nair

    Blog:- https://www.vxpert.in



  • 9.  RE: Cannot copy vmdk file properly using scp

    Posted May 07, 2019 11:07 AM

    mailcatcher.vmdk is only 505 bytes ?

    mailcatcher-flat.vmdk is 25 gb ?

    Then your scp operation was  successful

    You can use the same procedure to copy the other VMs.

    Only thing left to do is to open mailcatcher.vmdk with a texteditor and read it !

    This hopefully will teach you that your assumption that mailcatcher.vmdk has a size of 25 gb was wrong.



  • 10.  RE: Cannot copy vmdk file properly using scp

    Posted May 07, 2019 01:39 PM

    mailcatcher.vmdk is 25 gb

    scp can copy from mailcatcher.vmdk  only 505 bytes



  • 11.  RE: Cannot copy vmdk file properly using scp

    Posted May 07, 2019 02:07 PM

    You obviously did not follow my suggestion to actually read the 505 bytes file.

    If you do that you will realize that your problem exists between keyboard and chair only.

    By the way .... what do you think  the 25 gb flat.vmdk you copied is good for ???

    So read that 505 bytes file NOW



  • 12.  RE: Cannot copy vmdk file properly using scp

    Posted May 07, 2019 03:56 PM

    the 25 gb flat.vmdk is copied fully



  • 13.  RE: Cannot copy vmdk file properly using scp

    Posted May 07, 2019 04:41 PM

    And ?

    Did you try to launch the copied VM already ?

    It should work ...

    Maybe you are not aware that the Datastorebrowser over simplifies the display of the files in a VM directory.

    Wonder why the engineers thought that displaying VMDKs as a single file while they actually consist of one small text file plus one large binary file would be userfriendly.

    Obviously this just confuses unexperienced users.