{"id":922,"date":"2014-03-10T21:45:58","date_gmt":"2014-03-10T20:45:58","guid":{"rendered":"http:\/\/labalec.fr\/erwan\/?p=922"},"modified":"2025-01-29T21:51:25","modified_gmt":"2025-01-29T20:51:25","slug":"vmount-a-vhd-command-line-tool","status":"publish","type":"post","link":"https:\/\/labalec.fr\/erwan\/?p=922","title":{"rendered":"vMount : a VHD command line tool"},"content":{"rendered":"<p>For some time I needed a tool to create, attach, detach, etc MS Virtual Disk HardDrives (VHD) from the command line.<br \/>\nSure I could do it using diskpart or MS <a href=\"http:\/\/technet.microsoft.com\/en-us\/library\/cc708295(v=ws.10).aspx\" target=\"_blank\" rel=\"noopener\">VhdMount <\/a>but I was always lacking this or that&#8230;<\/p>\n<p>Therefore, based on <a href=\"http:\/\/reboot.pro\/topic\/8480-clonedisk\/\" target=\"_blank\" rel=\"noopener\">CloneDisk <\/a>source code, I took 5 mns to write vMount.<br \/>\nIt uses MS native <a href=\"http:\/\/msdn.microsoft.com\/en-us\/library\/windows\/desktop\/dd323699(v=vs.85).aspx\" target=\"_blank\" rel=\"noopener\">virtdisk<\/a> API available with Windows 7 (x86\/x64) and up<\/p>\n<p>Command line arguments :<\/p>\n<p>vmount createfixed path_to_vhd size(MB)<br \/>\nvmount createdynamic path_to_vhd size(MB)<br \/>\nvmount createchild path_to_child path_to_parent<br \/>\nvmount attach path_to_vhd [NOLETTER]<br \/>\nvmount attach path_to_iso<br \/>\nvmount detach \\\\.\\PhysicalDriveX<br \/>\nvmount detach path_to_vhd<br \/>\nvmount expand path_to_vhd size(MB)<br \/>\nvmount compact path_to_vhd<br \/>\nvmount merge path_to_child<br \/>\nvmount disks [filter]<br \/>\nvmount partitions [filter]<br \/>\nvmount mount x: \\device\\harddiskX\\partitionX<br \/>\nvmount umount letter<br \/>\nvmount online disk_id<br \/>\nvmount offline disk_id<br \/>\nvmount ro disk_id<br \/>\nvmount rw disk_id<br \/>\nvmount attributes disk_id<\/p>\n<p>Regards,<br \/>\nErwan<\/p>\n<p>Download <a href=\"https:\/\/erwan.labalec.fr\/clonedisk\/vmount.zip\">here<\/a><\/p>\n<p>Discuss it <a href=\"http:\/\/reboot.pro\/topic\/19622-vmount\/\" target=\"_blank\" rel=\"noopener\">here<\/a>.<br \/>\n<a href=\"https:\/\/labalec.fr\/erwan\/wp-content\/uploads\/2014\/03\/vmount.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-923\" src=\"https:\/\/labalec.fr\/erwan\/wp-content\/uploads\/2014\/03\/vmount-300x151.png\" alt=\"vmount\" width=\"300\" height=\"151\" srcset=\"https:\/\/labalec.fr\/erwan\/wp-content\/uploads\/2014\/03\/vmount-300x151.png 300w, https:\/\/labalec.fr\/erwan\/wp-content\/uploads\/2014\/03\/vmount.png 677w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>For some time I needed a tool to create, attach, detach, etc MS Virtual Disk HardDrives (VHD) from the command line. Sure I could do it using diskpart or MS VhdMount but I was always lacking this or that&#8230; Therefore, based on CloneDisk source code, I took 5 mns to write vMount. It uses MS <a href='https:\/\/labalec.fr\/erwan\/?p=922' class='excerpt-more'>[&#8230;]<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[26],"tags":[],"class_list":["post-922","post","type-post","status-publish","format-standard","hentry","category-clonedisk","category-26-id","post-seq-1","post-parity-odd","meta-position-corners","fix"],"_links":{"self":[{"href":"https:\/\/labalec.fr\/erwan\/index.php?rest_route=\/wp\/v2\/posts\/922","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/labalec.fr\/erwan\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/labalec.fr\/erwan\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/labalec.fr\/erwan\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/labalec.fr\/erwan\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=922"}],"version-history":[{"count":4,"href":"https:\/\/labalec.fr\/erwan\/index.php?rest_route=\/wp\/v2\/posts\/922\/revisions"}],"predecessor-version":[{"id":2557,"href":"https:\/\/labalec.fr\/erwan\/index.php?rest_route=\/wp\/v2\/posts\/922\/revisions\/2557"}],"wp:attachment":[{"href":"https:\/\/labalec.fr\/erwan\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=922"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/labalec.fr\/erwan\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=922"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/labalec.fr\/erwan\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=922"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}