[Solved] How do I capture the wim from VMware ?

Discussion in 'Virtualization' started by ceo54, Mar 15, 2018.

  1. ceo54

    ceo54 MDL Addicted

    Aug 13, 2015
    867
    361
    30
    Hi,

    I'm creating a personalised Windows ISO and finished doing all the things. Now how do I capture the image from VMWare with Dism ? This is the path to the virtual machine's disk
    "C:\Users\Faudel\Documents\Virtual Machines\Windows 8.x x64 (2)\Windows 8.x x64 (2).vmdk"

    I referred to a related thread that gives some idea. Here's how it is said to be done
    Code:
    dism /capture-image /imagefile:c:\temp\install.wim /capturedir:X:\mount /name:"Windows x.x 32-bit" /description:"You can make a really long, convoluted description here if you want. This part will show at the bottom of the screen after selecting the index during setup" /compress:max /checkintegrity /verify
    This is the part where I'm getting confused "capturedir:X:\mount" what should I replace it with ?

    Please, if possible

    Thanks.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  2. Tito

    Tito Super Mod / Adviser
    Staff Member

    Nov 30, 2009
    18,681
    18,587
    340
  3. LiteOS

    LiteOS Windowizer

    Mar 7, 2014
    2,204
    978
    90
    u can also run dism from windows setup iso
     
  4. mehdibleu

    mehdibleu MDL Expert

    Jun 14, 2017
    1,009
    251
    60
    i do it using the usual procedure :

    i sysprep the image disk by simply running "sysprep.exe" (c:\windows\system32), the operation lasts few minutes before rebooting or shuting down (it depends on the chosen option)

    then when booting i choose "command prompt" option then type this command :

    Code:
    Dism /Capture-Image /ImageFile:X:\install.wim /CaptureDir:Z:\ /Name:"windows 7 pro"
    (x is the drive when you will save the captured image "install.wim", i usually save the image in external hard drive so i can save time instead of waiting for the system to finish completely so i can get the image file)

    z is the drive that corresponds to the installed windows version with all applications, to know which drive letter corresponds to the installed windows version, type these command lines :

    Code:
    diskpart
    list disk (you choose the right disk)
    list volume ( you will see the right drive letter that corresponds to the installed windows version)
    Now you know which drive letter it is, all you will have to do is place it in /CaptureDir:Z:\

    That's it, this is the procedure i do everytime when i want to sysprep then capture either from VM or from real machine and it always worked for me. i hope i was clear enough in my explanation.
     
  5. ceo54

    ceo54 MDL Addicted

    Aug 13, 2015
    867
    361
    30
    Thanks for help Tito Enthousiast It appears like Windows explorer has build in support for VMDK file. I just right clicked the image and select "Map selected Disk..." and assigned it letter Z

    When I called Dism to capture the image, it returned the error "System can't find the path specified"

    I went into Diskpart as mehdibleu suggested and the it didn't list the volume. However, I could browse all the files in it.

    What am I doing wrong ?

    @mehdibleu thanks for the input bud.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  6. mehdibleu

    mehdibleu MDL Expert

    Jun 14, 2017
    1,009
    251
    60
    cmd
    diskpart
    list disk (if more than one disk is listed, you have to choose the right one)
    select disk 0 (i suppose it will be disk 0)
    list volume (and you will be able to see the right drive letter that corresponds to your installed windows version)
     
  7. ceo54

    ceo54 MDL Addicted

    Aug 13, 2015
    867
    361
    30
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  8. ceo54

    ceo54 MDL Addicted

    Aug 13, 2015
    867
    361
    30
    Virtual drive still ain't listed under volumes and grabbed the Image with Dism. Used the procedure as mentioned and it showed other volumes just not the Virtual drive's. Okay it's completed thanks for the help Mehdi.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  9. Da14te7

    Da14te7 MDL Novice

    Dec 4, 2018
    8
    0
    0
    Can Some Body Please Please Kindly Explain Me This....I am looking for this over a long and long time