VMware vSphere

 View Only
  • 1.  Recreate a VM from two vmdk Flat files

    Posted Mar 24, 2021 09:52 PM

    Hello,

    I have done a reboot for the the whole esxi without shutdown the VMs.

    Once rebooted, the VMs are display as unknown . After some reseach I found that I can rebuild every VM with the VMDK Flat file using vmkfstools .

    I'm stuck on a VM who has two Flat files : 

    1 - Machine-flat.vmdk (50Go)

    2 - Machine_2-flat.vmdk (300Go)

    On the first attempt I created a vmdk only for the one flat file (Machine-flat.vmdk) and tried to boot the VM who use Ubunut 12 as OS.

    Ubuntu doesn't boot and it tells me that something is going wrong (serious errors were found while checking disk for /storage)

    So, I suppose that this VM has two partitions but can't find the way to mount them. 

    I created the second virtaul partition on VM esxi parameters and select the VMDK for the second flat file (Machine_2-flat.vmdk) but doesn't work. Does this the right way and I'm missing something ?

    Please if someone has passed by this or can help me ?



  • 2.  RE: Recreate a VM from two vmdk Flat files
    Best Answer

    Posted Mar 24, 2021 10:57 PM

    Create Machine.vmdk

    # Disk DescriptorFile
    version=1
    encoding="UTF-8"
    CID=12345678
    parentCID=12345678
    createType="vmfs"

    # Extent description
    RW XXX VMFS "Machine-flat.vmdk"

    # The Disk Data Base
    #DDB

    ddb.adapterType = "lsilogic"
    ddb.geometry.cylinders = "YYY"
    ddb.geometry.heads = "255"
    ddb.geometry.sectors = "63"

    ---------------------------------------

     

    and Machine_2.vmdk

    # Disk DescriptorFile
    version=1
    encoding="UTF-8"
    CID=12345678
    parentCID=12345678
    createType="vmfs"

    # Extent description
    RW XXX VMFS "Machine_2-flat.vmdk"

    # The Disk Data Base
    #DDB

    ddb.adapterType = "lsilogic"
    ddb.geometry.cylinders = "YYY"
    ddb.geometry.heads = "255"
    ddb.geometry.sectors = "63"

     

    Look up the siye on disk of the 2 files and calculate XXX and YYY like I explined here:

    https://communities.vmware.com/t5/VMware-vSphere-Discussions/Please-remove-https-kb-vmware-com-s-article-1002511/td-p/2829241

     

    Stop using any more vmkfstoolsß commands.

    Assign Machine.vmdk to scsi0:0

    assign Machine_2.vmdk to scsi0:1

    set bootorder and put scsi0:0 on top of the list.

    That would be most probable fix if all you have is the 2 flat.vmdks in an empty dir.

    If you have older logs or existing vmx, vmsn or vmsd-files then use details according to them.
    Most important: no more vmkfstools - commands and no new GUI-created ones

     

    Ulli



  • 3.  RE: Recreate a VM from two vmdk Flat files

    Posted Mar 24, 2021 11:15 PM
     
     

    Thank you very much for your quick response:

    #Machine.vmdk file look like 

    # Disk DescriptorFile
    version=1
    encoding="UTF-8"
    CID=f5471a1f
    parentCID=ffffffff
    isNativeSnapshot="no"
    createType="vmfs"

    # Extent description
    RW 104857600 VMFS "Machine-flat.vmdk"

    # The Disk Data Base
    #DDB

    ddb.adapterType = "buslogic"
    ddb.geometry.cylinders = "6527"
    ddb.geometry.heads = "255"
    ddb.geometry.sectors = "63"
    ddb.longContentID = "04f95867d51ce1740d1f248cf5471a1f"
    ddb.uuid = "60 00 C2 9a 55 1a a9 e4-73 07 f6 9a 4b 92 3d 8b"
    ddb.virtualHWVersion = "10"

     

    --------------------------------------------------------

    #Machine_2.vmdk file look like 

    # Disk DescriptorFile
    version=1
    encoding="UTF-8"
    CID=c5f4c175
    parentCID=ffffffff
    isNativeSnapshot="no"
    createType="vmfs"

    # Extent description
    RW 629145600 VMFS "Machine_2-flat.vmdk"

    # The Disk Data Base
    #DDB

    ddb.adapterType = "buslogic"
    ddb.geometry.cylinders = "39162"
    ddb.geometry.heads = "255"
    ddb.geometry.sectors = "63"
    ddb.longContentID = "cdbb65a207bfa65c60183ffec5f4c175"
    ddb.uuid = "60 00 C2 95 11 a4 18 f1-e2 fa 94 ff ae da a3 0e"
    ddb.virtualHWVersion = "10"

    ------------------------------------------------------------------

    My vm configuratione like 

    DD2.PNGDD1.PNG

     

    But my VM while booting give me this error :

     

     

    error.PNG



  • 4.  RE: Recreate a VM from two vmdk Flat files
    Best Answer

    Posted Mar 25, 2021 11:25 PM

    most triviaj explanation could be that the disk uuid has changed and so mount according to fstab fails

    can you mount manually ?

     

     



  • 5.  RE: Recreate a VM from two vmdk Flat files

    Posted Mar 26, 2021 12:11 PM

    Yes, you're right, I've been able to remount it manually by editing the /etc/fstab and setting the new uuid (/dev/sdb1). The old one was /dev/sda1, so linux cannot recognize the partition.

     

    Thank you a lot for your replies.