{"id":722,"date":"2022-10-09T00:00:41","date_gmt":"2022-10-08T16:00:41","guid":{"rendered":"http:\/\/www.aqwu.net\/wp\/?p=722"},"modified":"2022-10-09T00:00:41","modified_gmt":"2022-10-08T16:00:41","slug":"windows-%e4%b8%8b%e5%91%bd%e4%bb%a4%e8%a1%8c%e5%88%9b%e5%bb%bavhd%e6%96%87%e4%bb%b6","status":"publish","type":"post","link":"https:\/\/www.aqwu.net\/wp\/?p=722","title":{"rendered":"Windows \u4e0b\u547d\u4ee4\u884c\u521b\u5efavhd\u6587\u4ef6"},"content":{"rendered":"\n<p>\u4f7f\u7528 diskpart \u53ef\u4ee5\u547d\u4ee4\u4e0b\u521b\u5efavhd\u6587\u4ef6\uff0c\u4ee3\u7801\u5982\u4e0b\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>diskpart\ncreate vdisk file=\"C:\\WinXX.vhd\" maximum=1000\nattach vdisk\ncreate partition primary\nassign letter=V\nformat fs=ntfs quick\nexit\n\n\u5176\u4ed6\u53c2\u6570\u5982\u4e0b\uff1a\n<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>DISKPART> help create vdisk\n\n    \u521b\u5efa\u865a\u62df\u78c1\u76d8\u6587\u4ef6\u3002\u5f53\u524d\u4ec5\u652f\u6301 VHD \u548c VHDX \u683c\u5f0f\u7684\u6587\u4ef6\uff0c\n    \u5b83\u4eec\u662f\u901a\u8fc7\u865a\u62df\u78c1\u76d8\u6587\u4ef6\u7684\n    \u6587\u4ef6\u6269\u5c55\u540d(.vhd \u548c .vhdx)\u6307\u5b9a\u7684\u3002\n\n\u8bed\u6cd5:  CREATE VDISK FILE=&lt;\"filename\"> MAXIMUM=&lt;N> &#91;TYPE={FIXED|EXPANDABLE}]\n             &#91;SD=&lt;SDDL string>] &#91;PARENT=&lt;\"filename\">] &#91;SOURCE=&lt;\"filename\">]\n             &#91;NOERR]\n\n    FILE=&lt;\"filename\">\n\n                \u6307\u5b9a\u865a\u62df\u78c1\u76d8\u6587\u4ef6\u7684\u5b8c\u6574\u8def\u5f84\u548c\u6587\u4ef6\u540d\u3002\n                \u8be5\u6587\u4ef6\u53ef\u4ee5\u4f4d\u4e8e\u7f51\u7edc\u5171\u4eab\u4e0a\u3002\n\n    MAXIMUM=&lt;N> \u865a\u62df\u78c1\u76d8\u516c\u5f00\u7684\u6700\u5927\u7a7a\u95f4\u91cf\uff0c\n                \u4ee5\u5146\u5b57\u8282(MB)\u4e3a\u5355\u4f4d\u3002\n\n    TYPE={FIXED|EXPANDABLE}\n\n                FIXED \u6307\u5b9a\u56fa\u5b9a\u5927\u5c0f\u7684\u865a\u62df\u78c1\u76d8\u6587\u4ef6\u3002EXPANDABLE\n                \u6307\u5b9a\u91cd\u65b0\u8c03\u6574\u5927\u5c0f\u4ee5\u9002\u5e94\u6240\u5206\u914d\u6570\u636e\u7684\n                \u865a\u62df\u78c1\u76d8\u6587\u4ef6\u3002\u9ed8\u8ba4\u503c\u4e3a FIXED\u3002\n\n    &#91;SD=&lt;SDDL string>]\n\n                \u6307\u5b9a\u5b89\u5168\u63cf\u8ff0\u7b26\u5b9a\u4e49\u8bed\u8a00(SDDL)\u683c\u5f0f\n                \u7684\u5b89\u5168\u63cf\u8ff0\u7b26\u3002\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c\n                \u5b89\u5168\u63cf\u8ff0\u7b26\u662f\u4ece\u7236\u76ee\u5f55\u4e2d\u83b7\u53d6\u7684\u3002\n\n                SDDL \u5b57\u7b26\u4e32\u53ef\u80fd\u6bd4\u8f83\u590d\u6742\uff0c\u4f46\u5f88\u7075\u6d3b\u3002\n                \u5176\u6700\u7b80\u5355\u7684\u683c\u5f0f\u662f\u4fdd\u62a4\u8bbf\u95ee\u7684\u5b89\u5168\u63cf\u8ff0\u7b26\uff0c\u79f0\u4e3a\u81ea\u5b9a\u4e49\u8bbf\u95ee\u63a7\u5236\u5217\u8868(DACL)\u3002\n                \u5176\u683c\u5f0f\u4e3a:\n\n                D:&lt;DACL_FLAGS>(&lt;STRING_ACE>)(&lt;STRING_ACE>)...(&lt;STRING_ACE>)\n\n                \u5e38\u7528\u7684 DACL_FLAGS \u4e3a:\n\n                   \"P\" - DACL \u4e0d\u5e94\u88ab\u6765\u81ea\u7236\u5bb9\u5668\u7684\n                         \u4efb\u4f55 ACL \u6240\u8986\u76d6(\u4fdd\u62a4)\u3002\n                         VHD \u6216 VHDX \u6587\u4ef6\u7684\u5bb9\u5668\u5c31\u662f\n                         \u5176\u76ee\u5f55\u3002\n                   \"AI\"- DACL \u5e94\u8be5\u4ece\u7236\u5bb9\u5668\u81ea\u52a8\n                         \u7ee7\u627f\u3002\n\n                STRING_ACE \u7684\u683c\u5f0f\u4e3a\n\n                   &lt;ACE_TYPE>;;&lt;RIGHTS>;;;&lt;ACCOUNT_ID>\n\n                \u5e38\u7528\u7684 ACE_TYPE \u4e3a:\n\n                   \"A\" - \u5141\u8bb8\u8bbf\u95ee\u3002\n                   \"D\" - \u62d2\u7edd\u8bbf\u95ee\u3002\n\n                \u5e38\u7528\u7684 RIGHTS \u4e3a:\n\n                   \"GA\" - \u6240\u6709\u8bbf\u95ee\u6743\u9650\u3002\n                   \"GR\" - \u8bfb\u53d6\u8bbf\u95ee\u6743\u9650\u3002\n                   \"GW' - \u5199\u5165\u8bbf\u95ee\u6743\u9650\u3002\n\n                \u5e38\u7528\u7684 ACCOUNT_ID \u4e3a:\n\n                   \"BA\" - \u5185\u7f6e\u7ba1\u7406\u5458\n                   \"AU\" - \u901a\u8fc7\u8eab\u4efd\u9a8c\u8bc1\u7684\u7528\u6237\u3002\n                   \"CO\" - \u521b\u5efa\u8005\u6240\u6709\u8005\u3002\n                   \"WD\" - \u4efb\u4f55\u4eba\u3002\n\n                \u5c06\u6240\u6709\u8fd9\u4e9b\u653e\u5728\u4e00\u8d77\uff0c\u4f8b\u5982\uff0c\n\n                  D:P:(A;;GR;;;AU)\n\n                \u4e3a\u6240\u6709\u901a\u8fc7\u8eab\u4efd\u9a8c\u8bc1\u7684\u7528\u6237\u6388\u4e88\u8bfb\u53d6\u8bbf\u95ee\u6743\u9650\u3002\n\n                \u540c\u6837\uff0c\n\n                  D:P:(A;;GA;;;WD)\n\n                \u4e3a\u4efb\u4f55\u4eba\u6388\u4e88\u5b8c\u5168\u8bbf\u95ee\u6743\u9650\u3002\n\n                \u53ef\u4ee5\u5728 Microsoft \u7684 MSDN \u7f51\u7ad9\u4e0a\n                \u627e\u5230\u6709\u5173 SDDL \u7684\u8be6\u7ec6\u4fe1\u606f\u3002\n\n    &#91;PARENT=&lt;\"filename\">]\n\n                \u7528\u4e8e\u521b\u5efa\u5dee\u5f02\u78c1\u76d8\u7684\u73b0\u6709\u7236\u865a\u62df\u78c1\u76d8\u6587\u4ef6\u7684\u8def\u5f84\u3002\n                \u5bf9\u4e8e PARENT \u53c2\u6570\uff0c\u4e0d\u5e94\u6307\u5b9a MAXIMUM\uff0c\n                \u56e0\u4e3a\u5dee\u5f02\u78c1\u76d8\u4ece\u5176\u7236\u76ee\u5f55\u83b7\u53d6\u5927\u5c0f\u3002\n                \u800c\u4e14\uff0c\u4e5f\u4e0d\u5e94\u6307\u5b9a TYPE\uff0c\n                \u56e0\u4e3a\u53ea\u80fd\u521b\u5efa EXPANDABLE \u5dee\u5f02\u78c1\u76d8\u3002\n\n\n    &#91;SOURCE=&lt;\"filename\">]\n\n                \u7528\u4e8e\u9884\u586b\u5145\u65b0\u865a\u62df\u78c1\u76d8\u6587\u4ef6\u7684\u73b0\u6709\u865a\u62df\u78c1\u76d8\u6587\u4ef6\u7684\u8def\u5f84\u3002\n                \u5f53\u6307\u5b9a SOURCE \u65f6\uff0c\n                \u8f93\u5165\u865a\u62df\u78c1\u76d8\u6587\u4ef6\u4e2d\u7684\u6570\u636e\n                \u5c06\u4ece\u8f93\u5165\u865a\u62df\u78c1\u76d8\u6587\u4ef6\u9010\u5757\u590d\u5236\u5230\u521b\u5efa\u7684\n                \u865a\u62df\u78c1\u76d8\u6587\u4ef6\u3002\n                \u4f46\u4e0d\u5efa\u7acb\u7236\u5b50\u5173\u7cfb\u3002\n\n\n    NOERR       \u4ec5\u7528\u4e8e\u811a\u672c\u3002\u9047\u5230\u9519\u8bef\u65f6\uff0cDiskPart\n                \u4f1a\u7ee7\u7eed\u5904\u7406\u547d\u4ee4\uff0c\u5982\u540c\u6ca1\u6709\u51fa\u73b0\u9519\u8bef\u4e00\u6837\u3002\n                \u5982\u679c\u4e0d\u4f7f\u7528 NOERR \u53c2\u6570\uff0c\u9519\u8bef\u4f1a\u5bfc\u81f4 DiskPart \u9000\u51fa\n                \u5e76\u8fd4\u56de\u9519\u8bef\u4ee3\u7801\u3002\n\u793a\u4f8b:\n\n    CREATE VDISK FILE=\"c:\\test\\test.vhd\" MAXIMUM=1000\n    CREATE VDISK FILE=\"c:\\test\\child.vhdx\" PARENT=\"c:\\test\\test.vhdx\"\n    CREATE VDISK FILE=\"c:\\test\\test.vhd\" MAXIMUM=1000 SD=\"D:P(A;;GA;;;WD)\"\n    CREATE VDISK FILE=\"c:\\test\\new.vhdx\" SOURCE=\"c:\\test\\test.vhd\"\n\n\nDISKPART>\n<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u4f7f\u7528 diskpart \u53ef\u4ee5\u547d\u4ee4\u4e0b\u521b\u5efavhd\u6587\u4ef6\uff0c\u4ee3\u7801\u5982\u4e0b\uff1a<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[102,43],"tags":[161,163,159,162],"class_list":["post-722","post","type-post","status-publish","format-standard","hentry","category-windows-infoarticle","category-infoarticle","tag-diskpat","tag-vdisk","tag-vhd","tag-vhdx"],"views":1379,"jetpack_sharing_enabled":true,"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/www.aqwu.net\/wp\/index.php?rest_route=\/wp\/v2\/posts\/722","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.aqwu.net\/wp\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.aqwu.net\/wp\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.aqwu.net\/wp\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.aqwu.net\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=722"}],"version-history":[{"count":1,"href":"https:\/\/www.aqwu.net\/wp\/index.php?rest_route=\/wp\/v2\/posts\/722\/revisions"}],"predecessor-version":[{"id":723,"href":"https:\/\/www.aqwu.net\/wp\/index.php?rest_route=\/wp\/v2\/posts\/722\/revisions\/723"}],"wp:attachment":[{"href":"https:\/\/www.aqwu.net\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=722"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.aqwu.net\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=722"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.aqwu.net\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=722"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}