{"id":82631,"date":"2026-07-25T10:43:10","date_gmt":"2026-07-25T02:43:10","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/82631.html"},"modified":"2026-07-25T10:43:10","modified_gmt":"2026-07-25T02:43:10","slug":"%e5%9c%a8%e5%9b%bd%e4%ba%a7%e6%9c%8d%e5%8a%a1%e5%99%a8%e4%b8%8a%e9%80%9a%e8%bf%87-docker-%e9%83%a8%e7%bd%b2-windows-%e8%99%9a%e6%8b%9f%e6%9c%ba","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/82631.html","title":{"rendered":"\u5728\u56fd\u4ea7\u670d\u52a1\u5668\u4e0a\u901a\u8fc7 Docker \u90e8\u7f72 Windows \u865a\u62df\u673a"},"content":{"rendered":"<h2>\u535a\u5ba2\u6587\u7ae0<\/h2>\n<hr \/>\n<h2>&#x1f4dd; \u5728\u56fd\u4ea7\u670d\u52a1\u5668&#xff08;\u9e92\u9e9f V10&#xff09;\u4e0a\u901a\u8fc7 Docker \u90e8\u7f72 Windows \u865a\u62df\u673a\u5b8c\u6574\u6307\u5357<\/h2>\n<p>\u80cc\u666f&#xff1a;\u5728\u4e00\u53f0\u57fa\u4e8e\u6d77\u5149\u5904\u7406\u5668\u7684\u9e92\u9e9f Linux V10 \u670d\u52a1\u5668\u4e0a&#xff0c;\u901a\u8fc7 Docker &#043; KVM \u65b9\u5f0f\u865a\u62df\u5316\u8fd0\u884c Windows \u7cfb\u7edf\u3002\u9002\u7528\u4e8e\u56fd\u4ea7\u4fe1\u521b\u73af\u5883\u4e0b\u9700\u8981\u8fd0\u884c Windows \u5e94\u7528\u7684\u573a\u666f\u3002<\/p>\n<hr \/>\n<h3>\u4e00\u3001\u73af\u5883\u8bf4\u660e<\/h3>\n<h4>1.1 \u670d\u52a1\u5668\u786c\u4ef6<\/h4>\n<table>\n<tr>\u9879\u76ee\u914d\u7f6e<\/tr>\n<tbody>\n<tr>\n<td>\u64cd\u4f5c\u7cfb\u7edf<\/td>\n<td>Kylin Linux Advanced Server V10 (Halberd)<\/td>\n<\/tr>\n<tr>\n<td>CPU<\/td>\n<td>\u6d77\u5149 C86-3G 7380 32\u6838 \u00d7 2\u8def &#061; 128\u6838<\/td>\n<\/tr>\n<tr>\n<td>\u5185\u5b58<\/td>\n<td>502GB DDR4<\/td>\n<\/tr>\n<tr>\n<td>\u78c1\u76d8<\/td>\n<td>838GB&#xff08;\u7cfb\u7edf\u76d8&#xff09;&#043; \u989d\u5916\u6570\u636e\u76d8<\/td>\n<\/tr>\n<tr>\n<td>\u865a\u62df\u5316<\/td>\n<td>AMD-V \u786c\u4ef6\u865a\u62df\u5316\u652f\u6301<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h4>1.2 \u4e3a\u4ec0\u4e48\u9009\u62e9 Docker \u65b9\u6848&#xff1f;<\/h4>\n<p>\u76f4\u63a5\u5b89\u88c5 qemu-kvm \u9700\u8981\u4ece\u8f6f\u4ef6\u4ed3\u5e93\u4e0b\u8f7d\u5927\u91cf\u4f9d\u8d56\u5305&#xff0c;\u4f46\u5728\u5355\u673a\u79bb\u7ebf\u73af\u5883\u4e0b&#xff08;\u65e0\u6cd5\u8054\u7f51&#xff09;&#xff0c;yum \u6e90\u4e2d\u53ef\u80fd\u7f3a\u5c11\u6838\u5fc3\u7ec4\u4ef6\u3002Docker \u955c\u50cf\u5305\u542b\u4e86\u5b8c\u6574\u7684 QEMU\/KVM \u73af\u5883&#xff0c;\u53ea\u9700\u5bfc\u5165\u4e00\u4e2a\u955c\u50cf\u5373\u53ef\u4f7f\u7528&#xff0c;\u662f\u79bb\u7ebf\u73af\u5883\u4e0b\u6700\u4fbf\u6377\u7684\u65b9\u6848\u3002<\/p>\n<p>\u65b9\u6848\u5bf9\u6bd4&#xff1a;<br \/>\n\u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510<br \/>\n\u2502      \u65b9\u6848        \u2502   \u96be\u5ea6       \u2502      \u9002\u7528\u573a\u666f     \u2502<br \/>\n\u251c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2524<br \/>\n\u2502 \u76f4\u63a5\u5b89\u88c5 qemu-kvm\u2502  \u4e2d\u7b49        \u2502 \u80fd\u8054\u7f51\u7684\u73af\u5883      \u2502<br \/>\n\u2502 Docker &#043; QEMU    \u2502  \u7b80\u5355 \u2b50     \u2502 \u79bb\u7ebf\/\u5feb\u901f\u90e8\u7f72     \u2502<br \/>\n\u2502 VMware\/vBox      \u2502  \u7b80\u5355        \u2502 \u684c\u9762\u73af\u5883          \u2502<br \/>\n\u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518<\/p>\n<hr \/>\n<h3>\u4e8c\u3001\u73af\u5883\u68c0\u67e5&#xff08;\u5173\u952e\u6b65\u9aa4&#xff09;<\/h3>\n<h4>2.1 \u68c0\u67e5 CPU \u865a\u62df\u5316\u652f\u6301<\/h4>\n<p><span class=\"token comment\"># \u68c0\u67e5\u662f\u5426\u652f\u6301 SVM&#xff08;AMD \u865a\u62df\u5316&#xff09;\u6216 VT-x&#xff08;Intel \u865a\u62df\u5316&#xff09;<\/span><br \/>\n<span class=\"token function\">grep<\/span> <span class=\"token parameter variable\">-E<\/span> <span class=\"token string\">&#039;svm|vmx&#039;<\/span> \/proc\/cpuinfo <span class=\"token operator\">|<\/span> <span class=\"token function\">head<\/span> <span class=\"token parameter variable\">-1<\/span><br \/>\n<span class=\"token comment\"># \u8f93\u51fa svm \u8868\u793a\u652f\u6301 AMD-V<\/span><\/p>\n<p><span class=\"token comment\"># \u7edf\u8ba1\u652f\u6301\u865a\u62df\u5316\u7684 CPU \u6838\u5fc3\u6570<\/span><br \/>\n<span class=\"token function\">grep<\/span> <span class=\"token parameter variable\">-c<\/span> svm \/proc\/cpuinfo<br \/>\n<span class=\"token comment\"># \u8f93\u51fa 128 \u8868\u793a\u6240\u6709\u6838\u5fc3\u90fd\u652f\u6301<\/span><\/p>\n<p>\u9884\u671f\u8f93\u51fa&#xff1a;<\/p>\n<p>flags: fpu vme de pse &#8230; svm &#8230;<\/p>\n<h4>2.2 \u68c0\u67e5 KVM \u5185\u6838\u6a21\u5757<\/h4>\n<p><span class=\"token comment\"># \u68c0\u67e5 KVM \u6a21\u5757\u662f\u5426\u52a0\u8f7d<\/span><br \/>\nlsmod <span class=\"token operator\">|<\/span> <span class=\"token function\">grep<\/span> kvm<\/p>\n<p>\u9884\u671f\u8f93\u51fa&#xff1a;<\/p>\n<p>kvm_amd               135168  0<br \/>\nkvm                   786432  1 kvm_amd<br \/>\nirqbypass              16384  1 kvm<\/p>\n<p>\u5982\u679c\u672a\u52a0\u8f7d&#xff0c;\u624b\u52a8\u52a0\u8f7d&#xff1a;<\/p>\n<p><span class=\"token function\">sudo<\/span> modprobe kvm<br \/>\n<span class=\"token function\">sudo<\/span> modprobe kvm_amd<\/p>\n<h4>2.3 \u68c0\u67e5 KVM \u8bbe\u5907\u6587\u4ef6<\/h4>\n<p><span class=\"token comment\"># \u68c0\u67e5 \/dev\/kvm \u662f\u5426\u5b58\u5728<\/span><br \/>\n<span class=\"token function\">ls<\/span> <span class=\"token parameter variable\">-la<\/span> \/dev\/kvm<\/p>\n<p>\u9884\u671f\u8f93\u51fa&#xff1a;<\/p>\n<p>crw-rw&#8212;- 1 root kvm 10, 232  9\u6708 22  2025 \/dev\/kvm<\/p>\n<p>\u5982\u679c\u4e0d\u5b58\u5728&#xff1a;<\/p>\n<p><span class=\"token comment\"># \u52a0\u8f7d\u6a21\u5757\u540e\u901a\u5e38\u4f1a\u81ea\u52a8\u521b\u5efa<\/span><br \/>\n<span class=\"token function\">sudo<\/span> modprobe kvm_amd<\/p>\n<p><span class=\"token comment\"># \u5982\u679c\u4ecd\u7136\u4e0d\u5b58\u5728&#xff0c;\u624b\u52a8\u521b\u5efa&#xff08;\u4e0d\u63a8\u8350&#xff09;<\/span><br \/>\n<span class=\"token function\">sudo<\/span> <span class=\"token function\">mknod<\/span> \/dev\/kvm c <span class=\"token number\">10<\/span> <span class=\"token number\">232<\/span><br \/>\n<span class=\"token function\">sudo<\/span> <span class=\"token function\">chmod<\/span> <span class=\"token number\">666<\/span> \/dev\/kvm<\/p>\n<h4>2.4 \u68c0\u67e5\u5d4c\u5957\u865a\u62df\u5316\u652f\u6301<\/h4>\n<p><span class=\"token comment\"># \u68c0\u67e5\u662f\u5426\u542f\u7528\u5d4c\u5957\u865a\u62df\u5316<\/span><br \/>\n<span class=\"token function\">cat<\/span> \/sys\/module\/kvm_amd\/parameters\/nested<br \/>\n<span class=\"token comment\"># \u8f93\u51fa 1 \u6216 Y \u8868\u793a\u5df2\u542f\u7528<\/span><\/p>\n<p>\u5982\u679c\u8fd4\u56de 0 \u6216 N&#xff0c;\u542f\u7528\u5d4c\u5957\u865a\u62df\u5316&#xff1a;<\/p>\n<p><span class=\"token comment\"># \u4e34\u65f6\u542f\u7528<\/span><br \/>\n<span class=\"token function\">sudo<\/span> modprobe <span class=\"token parameter variable\">-r<\/span> kvm_amd<br \/>\n<span class=\"token function\">sudo<\/span> modprobe kvm_amd <span class=\"token assign-left variable\">nested<\/span><span class=\"token operator\">&#061;<\/span><span class=\"token number\">1<\/span><\/p>\n<p><span class=\"token comment\"># \u6c38\u4e45\u542f\u7528<\/span><br \/>\n<span class=\"token builtin class-name\">echo<\/span> <span class=\"token string\">&#034;options kvm_amd nested&#061;1&#034;<\/span> <span class=\"token operator\">|<\/span> <span class=\"token function\">sudo<\/span> <span class=\"token function\">tee<\/span> \/etc\/modprobe.d\/kvm.conf<\/p>\n<p><span class=\"token comment\"># \u9a8c\u8bc1<\/span><br \/>\n<span class=\"token function\">cat<\/span> \/sys\/module\/kvm_amd\/parameters\/nested<\/p>\n<h4>2.5 \u68c0\u67e5 Docker \u73af\u5883<\/h4>\n<p><span class=\"token comment\"># \u68c0\u67e5 Docker \u7248\u672c<\/span><br \/>\n<span class=\"token function\">docker<\/span> <span class=\"token parameter variable\">&#8211;version<\/span><br \/>\n<span class=\"token comment\"># Docker version 27.2.0, build 3ab4256<\/span><\/p>\n<p><span class=\"token comment\"># \u68c0\u67e5 Docker \u670d\u52a1\u72b6\u6001<\/span><br \/>\nsystemctl status <span class=\"token function\">docker<\/span><\/p>\n<p><span class=\"token comment\"># \u68c0\u67e5 Docker \u662f\u5426\u53ef\u4ee5\u8fd0\u884c\u5bb9\u5668<\/span><br \/>\n<span class=\"token function\">docker<\/span> <span class=\"token function\">ps<\/span><\/p>\n<p><span class=\"token comment\"># \u6d4b\u8bd5 Docker \u529f\u80fd<\/span><br \/>\n<span class=\"token function\">docker<\/span> run <span class=\"token parameter variable\">&#8211;rm<\/span> hello-world<\/p>\n<h4>2.6 \u4e00\u952e\u68c0\u67e5\u811a\u672c<\/h4>\n<p>\u5c06\u4ee5\u4e0b\u5185\u5bb9\u4fdd\u5b58\u4e3a check-kvm-env.sh&#xff1a;<\/p>\n<p><span class=\"token shebang important\">#!\/bin\/bash<\/span><br \/>\n<span class=\"token builtin class-name\">echo<\/span> <span class=\"token string\">&#034;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#034;<\/span><br \/>\n<span class=\"token builtin class-name\">echo<\/span> <span class=\"token string\">&#034;    KVM &amp; Docker \u865a\u62df\u5316\u73af\u5883\u68c0\u67e5&#034;<\/span><br \/>\n<span class=\"token builtin class-name\">echo<\/span> <span class=\"token string\">&#034;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#034;<\/span><\/p>\n<p><span class=\"token builtin class-name\">echo<\/span> <span class=\"token parameter variable\">-e<\/span> <span class=\"token string\">&#034;<span class=\"token entity\" title=\"\\\\n\">\\\\n<\/span>[1\/6] CPU \u865a\u62df\u5316\u652f\u6301&#034;<\/span><br \/>\n<span class=\"token keyword\">if<\/span> <span class=\"token function\">grep<\/span> <span class=\"token parameter variable\">-q<\/span> <span class=\"token parameter variable\">-E<\/span> <span class=\"token string\">&#039;svm|vmx&#039;<\/span> \/proc\/cpuinfo<span class=\"token punctuation\">;<\/span> <span class=\"token keyword\">then<\/span><br \/>\n    <span class=\"token builtin class-name\">echo<\/span> <span class=\"token string\">&#034;  \u2705 CPU \u652f\u6301\u786c\u4ef6\u865a\u62df\u5316&#034;<\/span><br \/>\n    <span class=\"token builtin class-name\">echo<\/span> <span class=\"token string\">&#034;     \u652f\u6301\u6838\u5fc3\u6570: <span class=\"token variable\"><span class=\"token variable\">$(<\/span><span class=\"token function\">grep<\/span> <span class=\"token parameter variable\">-c<\/span> <span class=\"token parameter variable\">-E<\/span> <span class=\"token string\">&#039;svm|vmx&#039;<\/span> \/proc\/cpuinfo<span class=\"token variable\">)<\/span><\/span>&#034;<\/span><br \/>\n<span class=\"token keyword\">else<\/span><br \/>\n    <span class=\"token builtin class-name\">echo<\/span> <span class=\"token string\">&#034;  \u274c CPU \u4e0d\u652f\u6301\u786c\u4ef6\u865a\u62df\u5316&#xff01;&#034;<\/span><br \/>\n<span class=\"token keyword\">fi<\/span><\/p>\n<p><span class=\"token builtin class-name\">echo<\/span> <span class=\"token parameter variable\">-e<\/span> <span class=\"token string\">&#034;<span class=\"token entity\" title=\"\\\\n\">\\\\n<\/span>[2\/6] KVM \u5185\u6838\u6a21\u5757&#034;<\/span><br \/>\n<span class=\"token keyword\">if<\/span> lsmod <span class=\"token operator\">|<\/span> <span class=\"token function\">grep<\/span> <span class=\"token parameter variable\">-q<\/span> kvm<span class=\"token punctuation\">;<\/span> <span class=\"token keyword\">then<\/span><br \/>\n    <span class=\"token builtin class-name\">echo<\/span> <span class=\"token string\">&#034;  \u2705 KVM \u6a21\u5757\u5df2\u52a0\u8f7d&#034;<\/span><br \/>\n    lsmod <span class=\"token operator\">|<\/span> <span class=\"token function\">grep<\/span> kvm <span class=\"token operator\">|<\/span> <span class=\"token function\">sed<\/span> <span class=\"token string\">&#039;s\/^\/     \/&#039;<\/span><br \/>\n<span class=\"token keyword\">else<\/span><br \/>\n    <span class=\"token builtin class-name\">echo<\/span> <span class=\"token string\">&#034;  \u274c KVM \u6a21\u5757\u672a\u52a0\u8f7d&#xff01;&#034;<\/span><br \/>\n    <span class=\"token builtin class-name\">echo<\/span> <span class=\"token string\">&#034;     \u8bf7\u6267\u884c: sudo modprobe kvm &amp;&amp; sudo modprobe kvm_amd&#034;<\/span><br \/>\n<span class=\"token keyword\">fi<\/span><\/p>\n<p><span class=\"token builtin class-name\">echo<\/span> <span class=\"token parameter variable\">-e<\/span> <span class=\"token string\">&#034;<span class=\"token entity\" title=\"\\\\n\">\\\\n<\/span>[3\/6] KVM \u8bbe\u5907\u6587\u4ef6&#034;<\/span><br \/>\n<span class=\"token keyword\">if<\/span> <span class=\"token punctuation\">[<\/span> <span class=\"token parameter variable\">-e<\/span> \/dev\/kvm <span class=\"token punctuation\">]<\/span><span class=\"token punctuation\">;<\/span> <span class=\"token keyword\">then<\/span><br \/>\n    <span class=\"token builtin class-name\">echo<\/span> <span class=\"token string\">&#034;  \u2705 \/dev\/kvm \u5b58\u5728&#034;<\/span><br \/>\n    <span class=\"token function\">ls<\/span> <span class=\"token parameter variable\">-la<\/span> \/dev\/kvm <span class=\"token operator\">|<\/span> <span class=\"token function\">sed<\/span> <span class=\"token string\">&#039;s\/^\/     \/&#039;<\/span><br \/>\n<span class=\"token keyword\">else<\/span><br \/>\n    <span class=\"token builtin class-name\">echo<\/span> <span class=\"token string\">&#034;  \u274c \/dev\/kvm \u4e0d\u5b58\u5728&#xff01;&#034;<\/span><br \/>\n<span class=\"token keyword\">fi<\/span><\/p>\n<p><span class=\"token builtin class-name\">echo<\/span> <span class=\"token parameter variable\">-e<\/span> <span class=\"token string\">&#034;<span class=\"token entity\" title=\"\\\\n\">\\\\n<\/span>[4\/6] \u5d4c\u5957\u865a\u62df\u5316&#034;<\/span><br \/>\n<span class=\"token keyword\">if<\/span> <span class=\"token punctuation\">[<\/span> <span class=\"token parameter variable\">-f<\/span> \/sys\/module\/kvm_amd\/parameters\/nested <span class=\"token punctuation\">]<\/span><span class=\"token punctuation\">;<\/span> <span class=\"token keyword\">then<\/span><br \/>\n    <span class=\"token assign-left variable\">NESTED<\/span><span class=\"token operator\">&#061;<\/span><span class=\"token variable\"><span class=\"token variable\">$(<\/span><span class=\"token function\">cat<\/span> \/sys\/module\/kvm_amd\/parameters\/nested<span class=\"token variable\">)<\/span><\/span><br \/>\n    <span class=\"token keyword\">if<\/span> <span class=\"token punctuation\">[<\/span> <span class=\"token string\">&#034;<span class=\"token variable\">$NESTED<\/span>&#034;<\/span> <span class=\"token operator\">&#061;<\/span> <span class=\"token string\">&#034;1&#034;<\/span> <span class=\"token punctuation\">]<\/span> <span class=\"token operator\">||<\/span> <span class=\"token punctuation\">[<\/span> <span class=\"token string\">&#034;<span class=\"token variable\">$NESTED<\/span>&#034;<\/span> <span class=\"token operator\">&#061;<\/span> <span class=\"token string\">&#034;Y&#034;<\/span> <span class=\"token punctuation\">]<\/span><span class=\"token punctuation\">;<\/span> <span class=\"token keyword\">then<\/span><br \/>\n        <span class=\"token builtin class-name\">echo<\/span> <span class=\"token string\">&#034;  \u2705 \u5d4c\u5957\u865a\u62df\u5316\u5df2\u542f\u7528&#034;<\/span><br \/>\n    <span class=\"token keyword\">else<\/span><br \/>\n        <span class=\"token builtin class-name\">echo<\/span> <span class=\"token string\">&#034;  \u26a0\ufe0f \u5d4c\u5957\u865a\u62df\u5316\u672a\u542f\u7528&#034;<\/span><br \/>\n        <span class=\"token builtin class-name\">echo<\/span> <span class=\"token string\">&#034;     \u8bf7\u6267\u884c: echo &#039;options kvm_amd nested&#061;1&#039; | sudo tee \/etc\/modprobe.d\/kvm.conf&#034;<\/span><br \/>\n    <span class=\"token keyword\">fi<\/span><br \/>\n<span class=\"token keyword\">elif<\/span> <span class=\"token punctuation\">[<\/span> <span class=\"token parameter variable\">-f<\/span> \/sys\/module\/kvm_intel\/parameters\/nested <span class=\"token punctuation\">]<\/span><span class=\"token punctuation\">;<\/span> <span class=\"token keyword\">then<\/span><br \/>\n    <span class=\"token assign-left variable\">NESTED<\/span><span class=\"token operator\">&#061;<\/span><span class=\"token variable\"><span class=\"token variable\">$(<\/span><span class=\"token function\">cat<\/span> \/sys\/module\/kvm_intel\/parameters\/nested<span class=\"token variable\">)<\/span><\/span><br \/>\n    <span class=\"token builtin class-name\">echo<\/span> <span class=\"token string\">&#034;  \u2705 Intel \u5d4c\u5957\u865a\u62df\u5316\u72b6\u6001: <span class=\"token variable\">$NESTED<\/span>&#034;<\/span><br \/>\n<span class=\"token keyword\">else<\/span><br \/>\n    <span class=\"token builtin class-name\">echo<\/span> <span class=\"token string\">&#034;  \u26a0\ufe0f \u65e0\u6cd5\u68c0\u6d4b\u5d4c\u5957\u865a\u62df\u5316\u72b6\u6001&#034;<\/span><br \/>\n<span class=\"token keyword\">fi<\/span><\/p>\n<p><span class=\"token builtin class-name\">echo<\/span> <span class=\"token parameter variable\">-e<\/span> <span class=\"token string\">&#034;<span class=\"token entity\" title=\"\\\\n\">\\\\n<\/span>[5\/6] Docker \u73af\u5883&#034;<\/span><br \/>\n<span class=\"token keyword\">if<\/span> <span class=\"token builtin class-name\">command<\/span> <span class=\"token parameter variable\">-v<\/span> <span class=\"token function\">docker<\/span> <span class=\"token operator\">&amp;&gt;<\/span> \/dev\/null<span class=\"token punctuation\">;<\/span> <span class=\"token keyword\">then<\/span><br \/>\n    <span class=\"token builtin class-name\">echo<\/span> <span class=\"token string\">&#034;  \u2705 Docker \u5df2\u5b89\u88c5&#034;<\/span><br \/>\n    <span class=\"token builtin class-name\">echo<\/span> <span class=\"token string\">&#034;     \u7248\u672c: <span class=\"token variable\"><span class=\"token variable\">$(<\/span><span class=\"token function\">docker<\/span> <span class=\"token parameter variable\">&#8211;version<\/span><span class=\"token variable\">)<\/span><\/span>&#034;<\/span><br \/>\n    <span class=\"token keyword\">if<\/span> <span class=\"token function\">docker<\/span> <span class=\"token function\">ps<\/span> <span class=\"token operator\">&amp;&gt;<\/span> \/dev\/null<span class=\"token punctuation\">;<\/span> <span class=\"token keyword\">then<\/span><br \/>\n        <span class=\"token builtin class-name\">echo<\/span> <span class=\"token string\">&#034;  \u2705 Docker \u670d\u52a1\u8fd0\u884c\u6b63\u5e38&#034;<\/span><br \/>\n        <span class=\"token builtin class-name\">echo<\/span> <span class=\"token string\">&#034;     \u8fd0\u884c\u4e2d\u5bb9\u5668: <span class=\"token variable\"><span class=\"token variable\">$(<\/span><span class=\"token function\">docker<\/span> <span class=\"token function\">ps<\/span> <span class=\"token parameter variable\">-q<\/span> <span class=\"token operator\">|<\/span> <span class=\"token function\">wc<\/span> <span class=\"token parameter variable\">-l<\/span><span class=\"token variable\">)<\/span><\/span> \u4e2a&#034;<\/span><br \/>\n    <span class=\"token keyword\">else<\/span><br \/>\n        <span class=\"token builtin class-name\">echo<\/span> <span class=\"token string\">&#034;  \u274c Docker \u670d\u52a1\u672a\u8fd0\u884c&#xff01;&#034;<\/span><br \/>\n    <span class=\"token keyword\">fi<\/span><br \/>\n<span class=\"token keyword\">else<\/span><br \/>\n    <span class=\"token builtin class-name\">echo<\/span> <span class=\"token string\">&#034;  \u274c Docker \u672a\u5b89\u88c5&#xff01;&#034;<\/span><br \/>\n<span class=\"token keyword\">fi<\/span><\/p>\n<p><span class=\"token builtin class-name\">echo<\/span> <span class=\"token parameter variable\">-e<\/span> <span class=\"token string\">&#034;<span class=\"token entity\" title=\"\\\\n\">\\\\n<\/span>[6\/6] \u7cfb\u7edf\u8d44\u6e90&#034;<\/span><br \/>\n<span class=\"token builtin class-name\">echo<\/span> <span class=\"token string\">&#034;  \u5185\u5b58: <span class=\"token variable\"><span class=\"token variable\">$(<\/span><span class=\"token function\">free<\/span> <span class=\"token parameter variable\">-h<\/span> <span class=\"token operator\">|<\/span> <span class=\"token function\">awk<\/span> <span class=\"token string\">&#039;\/Mem:\/ {print $2 &#034; \u603b\u8ba1, &#034; $7 &#034; \u53ef\u7528&#034;}&#039;<\/span><span class=\"token variable\">)<\/span><\/span>&#034;<\/span><br \/>\n<span class=\"token builtin class-name\">echo<\/span> <span class=\"token string\">&#034;  \u78c1\u76d8: <span class=\"token variable\"><span class=\"token variable\">$(<\/span><span class=\"token function\">df<\/span> <span class=\"token parameter variable\">-h<\/span> \/ <span class=\"token operator\">|<\/span> <span class=\"token function\">awk<\/span> <span class=\"token string\">&#039;NR&#061;&#061;2 {print $2 &#034; \u603b\u8ba1, &#034; $4 &#034; \u53ef\u7528&#034;}&#039;<\/span><span class=\"token variable\">)<\/span><\/span>&#034;<\/span><br \/>\n<span class=\"token builtin class-name\">echo<\/span> <span class=\"token string\">&#034;  CPU:  <span class=\"token variable\"><span class=\"token variable\">$(<\/span>nproc<span class=\"token variable\">)<\/span><\/span> \u6838\u5fc3&#034;<\/span><\/p>\n<p><span class=\"token builtin class-name\">echo<\/span> <span class=\"token parameter variable\">-e<\/span> <span class=\"token string\">&#034;<span class=\"token entity\" title=\"\\\\n\">\\\\n<\/span>&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#034;<\/span><br \/>\n<span class=\"token builtin class-name\">echo<\/span> <span class=\"token string\">&#034;    \u68c0\u67e5\u5b8c\u6210&#034;<\/span><br \/>\n<span class=\"token builtin class-name\">echo<\/span> <span class=\"token string\">&#034;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#034;<\/span><\/p>\n<p>\u8fd0\u884c&#xff1a;<\/p>\n<p><span class=\"token function\">chmod<\/span> &#043;x check-kvm-env.sh<br \/>\n.\/check-kvm-env.sh<\/p>\n<p>\u9884\u671f\u8f93\u51fa&#xff1a;<\/p>\n<p>&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;<br \/>\n    KVM &amp; Docker \u865a\u62df\u5316\u73af\u5883\u68c0\u67e5<br \/>\n&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;<\/p>\n<p>[1\/6] CPU \u865a\u62df\u5316\u652f\u6301<br \/>\n  \u2705 CPU \u652f\u6301\u786c\u4ef6\u865a\u62df\u5316<br \/>\n     \u652f\u6301\u6838\u5fc3\u6570: 128<\/p>\n<p>[2\/6] KVM \u5185\u6838\u6a21\u5757<br \/>\n  \u2705 KVM \u6a21\u5757\u5df2\u52a0\u8f7d<br \/>\n     kvm_amd               135168  0<br \/>\n     kvm                   786432  1 kvm_amd<\/p>\n<p>[3\/6] KVM \u8bbe\u5907\u6587\u4ef6<br \/>\n  \u2705 \/dev\/kvm \u5b58\u5728<br \/>\n     crw-rw&#8212;- 1 root kvm 10, 232 &#8230;<\/p>\n<p>[4\/6] \u5d4c\u5957\u865a\u62df\u5316<br \/>\n  \u2705 \u5d4c\u5957\u865a\u62df\u5316\u5df2\u542f\u7528<\/p>\n<p>[5\/6] Docker \u73af\u5883<br \/>\n  \u2705 Docker \u5df2\u5b89\u88c5<br \/>\n     \u7248\u672c: Docker version 27.2.0<br \/>\n  \u2705 Docker \u670d\u52a1\u8fd0\u884c\u6b63\u5e38<br \/>\n     \u8fd0\u884c\u4e2d\u5bb9\u5668: 4 \u4e2a<\/p>\n<p>[6\/6] \u7cfb\u7edf\u8d44\u6e90<br \/>\n  \u5185\u5b58: 502Gi \u603b\u8ba1, 442Gi \u53ef\u7528<br \/>\n  \u78c1\u76d8: 838G \u603b\u8ba1, 592G \u53ef\u7528<br \/>\n  CPU:  128 \u6838\u5fc3<\/p>\n<p>&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;<br \/>\n    \u68c0\u67e5\u5b8c\u6210<br \/>\n&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;<\/p>\n<hr \/>\n<h3>\u4e09\u3001\u90e8\u7f72\u6b65\u9aa4<\/h3>\n<h4>3.1 \u51c6\u5907\u5de5\u4f5c<\/h4>\n<h5>\u521b\u5efa\u5de5\u4f5c\u76ee\u5f55<\/h5>\n<p><span class=\"token comment\"># \u521b\u5efa\u9879\u76ee\u76ee\u5f55<\/span><br \/>\n<span class=\"token function\">mkdir<\/span> <span class=\"token parameter variable\">-p<\/span> \/data\/windows-vm<br \/>\n<span class=\"token builtin class-name\">cd<\/span> \/data\/windows-vm<\/p>\n<p><span class=\"token comment\"># \u521b\u5efa\u5b58\u50a8\u76ee\u5f55<\/span><br \/>\n<span class=\"token function\">mkdir<\/span> <span class=\"token parameter variable\">-p<\/span> storage<\/p>\n<p><span class=\"token comment\"># \u521b\u5efa\u5171\u4eab\u76ee\u5f55&#xff08;Windows \u53ef\u8bbf\u95ee\u7684\u5171\u4eab\u6587\u4ef6\u5939&#xff09;<\/span><br \/>\n<span class=\"token function\">mkdir<\/span> <span class=\"token parameter variable\">-p<\/span> share<\/p>\n<h5>\u51c6\u5907 Windows ISO&#xff08;\u53ef\u9009&#xff09;<\/h5>\n<p>\u5982\u679c\u6709\u672c\u5730 ISO \u6587\u4ef6&#xff1a;<\/p>\n<p><span class=\"token comment\"># \u65b9\u5f0f\u4e00&#xff1a;\u76f4\u63a5\u590d\u5236<\/span><br \/>\n<span class=\"token function\">cp<\/span> \/path\/to\/windows.iso \/data\/windows-vm\/windows.iso<\/p>\n<p><span class=\"token comment\"># \u65b9\u5f0f\u4e8c&#xff1a;\u901a\u8fc7 U \u76d8\u6302\u8f7d<\/span><br \/>\n<span class=\"token function\">mount<\/span> \/dev\/sdb1 \/mnt\/usb<br \/>\n<span class=\"token function\">cp<\/span> \/mnt\/usb\/Windows10.iso \/data\/windows-vm\/windows.iso<br \/>\n<span class=\"token function\">umount<\/span> \/mnt\/usb<\/p>\n<p>\u5982\u679c\u6ca1\u6709 ISO \u6587\u4ef6&#xff0c;dockurr\/windows \u955c\u50cf\u652f\u6301 \u81ea\u52a8\u4e0b\u8f7d&#xff08;\u9700\u8981\u8054\u7f51&#xff09;\u3002<\/p>\n<h4>3.2 \u521b\u5efa Docker Compose \u914d\u7f6e\u6587\u4ef6<\/h4>\n<p><span class=\"token builtin class-name\">cd<\/span> \/data\/windows-vm<br \/>\n<span class=\"token function\">vi<\/span> docker-compose.yml<\/p>\n<p>\u5c06\u4ee5\u4e0b\u5185\u5bb9\u7c98\u8d34\u8fdb\u53bb&#xff1a;<\/p>\n<p><span class=\"token key atrule\">version<\/span><span class=\"token punctuation\">:<\/span> <span class=\"token string\">&#039;3.8&#039;<\/span><\/p>\n<p><span class=\"token key atrule\">services<\/span><span class=\"token punctuation\">:<\/span><br \/>\n  <span class=\"token key atrule\">windows<\/span><span class=\"token punctuation\">:<\/span><br \/>\n    <span class=\"token key atrule\">image<\/span><span class=\"token punctuation\">:<\/span> dockurr\/windows<span class=\"token punctuation\">:<\/span>latest<br \/>\n    <span class=\"token key atrule\">container_name<\/span><span class=\"token punctuation\">:<\/span> windows<span class=\"token punctuation\">&#8211;<\/span>vm<br \/>\n    <span class=\"token key atrule\">privileged<\/span><span class=\"token punctuation\">:<\/span> <span class=\"token boolean important\">true<\/span><br \/>\n    <span class=\"token key atrule\">devices<\/span><span class=\"token punctuation\">:<\/span><br \/>\n      <span class=\"token punctuation\">&#8211;<\/span> \/dev\/kvm<br \/>\n    <span class=\"token key atrule\">ports<\/span><span class=\"token punctuation\">:<\/span><br \/>\n      <span class=\"token punctuation\">&#8211;<\/span> <span class=\"token string\">&#034;8006:8006&#034;<\/span>    <span class=\"token comment\"># Web \u5b89\u88c5\u754c\u9762<\/span><br \/>\n      <span class=\"token punctuation\">&#8211;<\/span> <span class=\"token string\">&#034;3389:3389&#034;<\/span>    <span class=\"token comment\"># \u8fdc\u7a0b\u684c\u9762 RDP<\/span><br \/>\n    <span class=\"token key atrule\">volumes<\/span><span class=\"token punctuation\">:<\/span><br \/>\n      <span class=\"token punctuation\">&#8211;<\/span> .\/storage<span class=\"token punctuation\">:<\/span>\/storage<br \/>\n      <span class=\"token comment\"># \u672c\u5730 ISO<\/span><br \/>\n      <span class=\"token punctuation\">&#8211;<\/span> .\/windows.iso<span class=\"token punctuation\">:<\/span>\/storage\/custom.iso<br \/>\n    <span class=\"token key atrule\">environment<\/span><span class=\"token punctuation\">:<\/span><br \/>\n      <span class=\"token key atrule\">VERSION<\/span><span class=\"token punctuation\">:<\/span> <span class=\"token string\">&#034;win10&#034;<\/span>       <span class=\"token comment\"># win8.1 \/ win10 \/ win11 \/ win2019 \/ win2022<\/span><br \/>\n      <span class=\"token key atrule\">RAM_SIZE<\/span><span class=\"token punctuation\">:<\/span> <span class=\"token string\">&#034;8G&#034;<\/span><br \/>\n      <span class=\"token key atrule\">CPU_CORES<\/span><span class=\"token punctuation\">:<\/span> <span class=\"token string\">&#034;4&#034;<\/span><br \/>\n      <span class=\"token key atrule\">DISK_SIZE<\/span><span class=\"token punctuation\">:<\/span> <span class=\"token string\">&#034;100G&#034;<\/span><br \/>\n      <span class=\"token key atrule\">USERNAME<\/span><span class=\"token punctuation\">:<\/span> <span class=\"token string\">&#034;xxx&#034;<\/span><br \/>\n      <span class=\"token key atrule\">PASSWORD<\/span><span class=\"token punctuation\">:<\/span> <span class=\"token string\">&#034;xxxxxx&#034;<\/span><br \/>\n    <span class=\"token key atrule\">restart<\/span><span class=\"token punctuation\">:<\/span> unless<span class=\"token punctuation\">&#8211;<\/span>stopped<\/p>\n<h4>3.3 \u79bb\u7ebf\u5bfc\u5165 Docker \u955c\u50cf<\/h4>\n<p>\u5982\u679c\u670d\u52a1\u5668\u65e0\u6cd5\u8054\u7f51&#xff0c;\u9700\u8981\u5728\u80fd\u8054\u7f51\u7684\u673a\u5668\u4e0a\u63d0\u524d\u5bfc\u51fa\u955c\u50cf&#xff1a;<\/p>\n<p><span class=\"token comment\"># &#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061; \u5728\u8054\u7f51\u673a\u5668\u4e0a\u6267\u884c &#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;<\/span><\/p>\n<p><span class=\"token comment\"># \u62c9\u53d6\u955c\u50cf<\/span><br \/>\n<span class=\"token function\">docker<\/span> pull dockurr\/windows:latest<\/p>\n<p><span class=\"token comment\"># \u5bfc\u51fa\u955c\u50cf\u4e3a tar \u6587\u4ef6<\/span><br \/>\n<span class=\"token function\">docker<\/span> save dockurr\/windows:latest <span class=\"token parameter variable\">-o<\/span> dockurr-windows.tar<\/p>\n<p><span class=\"token comment\"># \u67e5\u770b\u6587\u4ef6\u5927\u5c0f<\/span><br \/>\n<span class=\"token function\">ls<\/span> <span class=\"token parameter variable\">-lh<\/span> dockurr-windows.tar<\/p>\n<p>\u7136\u540e\u901a\u8fc7 U \u76d8\u6216\u5185\u7f51\u4f20\u8f93\u5230\u76ee\u6807\u670d\u52a1\u5668&#xff1a;<\/p>\n<p><span class=\"token comment\"># &#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061; \u5728\u76ee\u6807\u670d\u52a1\u5668\u4e0a\u6267\u884c &#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;<\/span><\/p>\n<p><span class=\"token comment\"># \u5bfc\u5165\u955c\u50cf<\/span><br \/>\n<span class=\"token function\">docker<\/span> load <span class=\"token parameter variable\">-i<\/span> \/path\/to\/dockurr-windows.tar<\/p>\n<p><span class=\"token comment\"># \u9a8c\u8bc1\u5bfc\u5165\u6210\u529f<\/span><br \/>\n<span class=\"token function\">docker<\/span> images <span class=\"token operator\">|<\/span> <span class=\"token function\">grep<\/span> windows<\/p>\n<h4>3.4 \u542f\u52a8 Windows \u865a\u62df\u673a<\/h4>\n<p><span class=\"token builtin class-name\">cd<\/span> \/data\/windows-vm<\/p>\n<p><span class=\"token comment\"># \u540e\u53f0\u542f\u52a8<\/span><br \/>\n<span class=\"token function\">docker-compose<\/span> up <span class=\"token parameter variable\">-d<\/span><\/p>\n<p><span class=\"token comment\"># \u67e5\u770b\u542f\u52a8\u65e5\u5fd7<\/span><br \/>\n<span class=\"token function\">docker-compose<\/span> logs <span class=\"token parameter variable\">-f<\/span><\/p>\n<p>\u9996\u6b21\u542f\u52a8\u4f1a\u7ecf\u5386\u4ee5\u4e0b\u8fc7\u7a0b&#xff1a;<\/p>\n<p>1. \u521b\u5efa\u865a\u62df\u78c1\u76d8&#xff08;100GB&#xff09;          ~30\u79d2<br \/>\n2. \u4e0b\u8f7d\/\u52a0\u8f7d Windows ISO          ~\u53d6\u51b3\u4e8e\u7f51\u7edc\u6216\u6587\u4ef6<br \/>\n3. \u81ea\u52a8\u5b89\u88c5 Windows               ~15-30\u5206\u949f<br \/>\n4. \u914d\u7f6e\u7cfb\u7edf\u548c\u7528\u6237\u8d26\u6237             ~\u81ea\u52a8\u5b8c\u6210<\/p>\n<h4>3.5 \u8bbf\u95ee Windows<\/h4>\n<p>\u5b89\u88c5\u5b8c\u6210\u540e&#xff0c;\u901a\u8fc7\u4ee5\u4e0b\u65b9\u5f0f\u8bbf\u95ee&#xff1a;<\/p>\n<table>\n<tr>\u65b9\u5f0f\u5730\u5740\u8bf4\u660e<\/tr>\n<tbody>\n<tr>\n<td>Web \u754c\u9762<\/td>\n<td>http:\/\/xx.xx.xx.xx:8006<\/td>\n<td>\u6d4f\u89c8\u5668\u76f4\u63a5\u8bbf\u95ee&#xff0c;\u67e5\u770b\u5b89\u88c5\u8fdb\u5ea6<\/td>\n<\/tr>\n<tr>\n<td>\u8fdc\u7a0b\u684c\u9762<\/td>\n<td>xx.xx.xx.xx:3389<\/td>\n<td>\u4f7f\u7528 Windows \u8fdc\u7a0b\u684c\u9762\u5ba2\u6237\u7aef\u8fde\u63a5<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u8fdc\u7a0b\u684c\u9762\u8fde\u63a5\u4fe1\u606f&#xff1a;<\/p>\n<ul>\n<li>\u5730\u5740&#xff1a;xx.xx.xx.xx<\/li>\n<li>\u7aef\u53e3&#xff1a;3389<\/li>\n<li>\u7528\u6237\u540d&#xff1a;xxx<\/li>\n<li>\u5bc6\u7801&#xff1a;xxxxxxxx<\/li>\n<\/ul>\n<hr \/>\n<h3>\u56db\u3001\u5e38\u7528\u7ba1\u7406\u547d\u4ee4<\/h3>\n<h4>4.1 \u5bb9\u5668\u751f\u547d\u5468\u671f\u7ba1\u7406<\/h4>\n<p><span class=\"token comment\"># \u8fdb\u5165\u9879\u76ee\u76ee\u5f55<\/span><br \/>\n<span class=\"token builtin class-name\">cd<\/span> \/data\/windows-vm<\/p>\n<p><span class=\"token comment\"># \u542f\u52a8<\/span><br \/>\n<span class=\"token function\">docker-compose<\/span> up <span class=\"token parameter variable\">-d<\/span><\/p>\n<p><span class=\"token comment\"># \u505c\u6b62<\/span><br \/>\n<span class=\"token function\">docker-compose<\/span> stop<\/p>\n<p><span class=\"token comment\"># \u91cd\u542f<\/span><br \/>\n<span class=\"token function\">docker-compose<\/span> restart<\/p>\n<p><span class=\"token comment\"># \u67e5\u770b\u72b6\u6001<\/span><br \/>\n<span class=\"token function\">docker-compose<\/span> <span class=\"token function\">ps<\/span><\/p>\n<p><span class=\"token comment\"># \u67e5\u770b\u65e5\u5fd7<\/span><br \/>\n<span class=\"token function\">docker-compose<\/span> logs <span class=\"token parameter variable\">-f<\/span><\/p>\n<p><span class=\"token comment\"># \u5220\u9664\u5bb9\u5668&#xff08;\u4fdd\u7559\u6570\u636e&#xff09;<\/span><br \/>\n<span class=\"token function\">docker-compose<\/span> down<\/p>\n<p><span class=\"token comment\"># \u5220\u9664\u5bb9\u5668\u548c\u6570\u636e&#xff08;\u614e\u7528&#xff09;<\/span><br \/>\n<span class=\"token function\">docker-compose<\/span> down <span class=\"token parameter variable\">-v<\/span><\/p>\n<h4>4.2 \u76f4\u63a5\u4f7f\u7528 docker \u547d\u4ee4<\/h4>\n<p><span class=\"token comment\"># \u67e5\u770b\u5bb9\u5668\u72b6\u6001<\/span><br \/>\n<span class=\"token function\">docker<\/span> <span class=\"token function\">ps<\/span> <span class=\"token parameter variable\">-a<\/span> <span class=\"token operator\">|<\/span> <span class=\"token function\">grep<\/span> windows<\/p>\n<p><span class=\"token comment\"># \u67e5\u770b\u8d44\u6e90\u5360\u7528<\/span><br \/>\n<span class=\"token function\">docker<\/span> stats windows-vm<\/p>\n<p><span class=\"token comment\"># \u8fdb\u5165\u5bb9\u5668&#xff08;\u8c03\u8bd5\u7528&#xff09;<\/span><br \/>\n<span class=\"token function\">docker<\/span> <span class=\"token builtin class-name\">exec<\/span> <span class=\"token parameter variable\">-it<\/span> windows-vm <span class=\"token function\">bash<\/span><\/p>\n<p><span class=\"token comment\"># \u67e5\u770b\u5bb9\u5668\u65e5\u5fd7<\/span><br \/>\n<span class=\"token function\">docker<\/span> logs <span class=\"token parameter variable\">-f<\/span> windows-vm<\/p>\n<p><span class=\"token comment\"># \u5f3a\u5236\u91cd\u542f<\/span><br \/>\n<span class=\"token function\">docker<\/span> restart windows-vm<\/p>\n<h4>4.3 \u6570\u636e\u5907\u4efd\u4e0e\u6062\u590d<\/h4>\n<p><span class=\"token comment\"># \u5907\u4efd\u865a\u62df\u78c1\u76d8<\/span><br \/>\n<span class=\"token builtin class-name\">cd<\/span> \/data\/windows-vm<br \/>\n<span class=\"token function\">cp<\/span> storage\/windows.qcow2 \/backup\/windows-backup-<span class=\"token variable\"><span class=\"token variable\">$(<\/span><span class=\"token function\">date<\/span> &#043;%Y%m%d<span class=\"token variable\">)<\/span><\/span>.qcow2<\/p>\n<p><span class=\"token comment\"># \u6062\u590d\u865a\u62df\u78c1\u76d8<\/span><br \/>\n<span class=\"token function\">cp<\/span> \/backup\/windows-backup-20250101.qcow2 storage\/windows.qcow2<\/p>\n<p><span class=\"token comment\"># \u5907\u4efd\u6574\u4e2a\u9879\u76ee<\/span><br \/>\n<span class=\"token function\">tar<\/span> czf windows-vm-backup.tar.gz \/data\/windows-vm\/<\/p>\n<hr \/>\n<h3>\u4e94\u3001\u914d\u7f6e\u6587\u4ef6\u8be6\u89e3<\/h3>\n<h4>5.1 \u7248\u672c\u9009\u62e9<\/h4>\n<table>\n<tr>\u73af\u5883\u53d8\u91cf\u503c\u5bf9\u5e94\u7248\u672c\u63a8\u8350\u573a\u666f<\/tr>\n<tbody>\n<tr>\n<td>win10<\/td>\n<td>Windows 10 LTSC<\/td>\n<td>\u5f00\u53d1\u6d4b\u8bd5\u3001\u65e5\u5e38\u4f7f\u7528<\/td>\n<\/tr>\n<tr>\n<td>win11<\/td>\n<td>Windows 11<\/td>\n<td>\u9700\u8981\u6700\u65b0\u529f\u80fd<\/td>\n<\/tr>\n<tr>\n<td>win2019<\/td>\n<td>Windows Server 2019<\/td>\n<td>\u670d\u52a1\u5668\u7528\u9014<\/td>\n<\/tr>\n<tr>\n<td>win2022<\/td>\n<td>Windows Server 2022<\/td>\n<td>\u6700\u65b0\u670d\u52a1\u5668\u7248\u672c<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h4>5.2 \u8d44\u6e90\u914d\u7f6e\u5efa\u8bae<\/h4>\n<table>\n<tr>\u7248\u672c\u6700\u4f4e\u5185\u5b58\u63a8\u8350\u5185\u5b58CPU\u78c1\u76d8<\/tr>\n<tbody>\n<tr>\n<td>Windows 10<\/td>\n<td>4G<\/td>\n<td>8G<\/td>\n<td>2-4\u6838<\/td>\n<td>60G<\/td>\n<\/tr>\n<tr>\n<td>Windows 11<\/td>\n<td>4G<\/td>\n<td>8G<\/td>\n<td>2-4\u6838<\/td>\n<td>64G<\/td>\n<\/tr>\n<tr>\n<td>Win Server 2019<\/td>\n<td>8G<\/td>\n<td>16G<\/td>\n<td>4-8\u6838<\/td>\n<td>100G<\/td>\n<\/tr>\n<tr>\n<td>Win Server 2022<\/td>\n<td>8G<\/td>\n<td>16G<\/td>\n<td>4-8\u6838<\/td>\n<td>100G<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h4>5.3 \u5b8c\u6574\u73af\u5883\u53d8\u91cf\u5217\u8868<\/h4>\n<p><span class=\"token key atrule\">environment<\/span><span class=\"token punctuation\">:<\/span><br \/>\n  <span class=\"token comment\"># \u57fa\u672c\u914d\u7f6e<\/span><br \/>\n  <span class=\"token key atrule\">VERSION<\/span><span class=\"token punctuation\">:<\/span> <span class=\"token string\">&#034;win10&#034;<\/span>           <span class=\"token comment\"># Windows \u7248\u672c<\/span><br \/>\n  <span class=\"token key atrule\">RAM_SIZE<\/span><span class=\"token punctuation\">:<\/span> <span class=\"token string\">&#034;8G&#034;<\/span>             <span class=\"token comment\"># \u5185\u5b58\u5927\u5c0f<\/span><br \/>\n  <span class=\"token key atrule\">CPU_CORES<\/span><span class=\"token punctuation\">:<\/span> <span class=\"token string\">&#034;4&#034;<\/span>             <span class=\"token comment\"># CPU \u6838\u5fc3\u6570<\/span><br \/>\n  <span class=\"token key atrule\">DISK_SIZE<\/span><span class=\"token punctuation\">:<\/span> <span class=\"token string\">&#034;100G&#034;<\/span>          <span class=\"token comment\"># \u78c1\u76d8\u5927\u5c0f<\/span><\/p>\n<p>  <span class=\"token comment\"># \u7528\u6237\u914d\u7f6e<\/span><br \/>\n  <span class=\"token key atrule\">USERNAME<\/span><span class=\"token punctuation\">:<\/span> <span class=\"token string\">&#034;admin&#034;<\/span>          <span class=\"token comment\"># \u7528\u6237\u540d<\/span><br \/>\n  <span class=\"token key atrule\">PASSWORD<\/span><span class=\"token punctuation\">:<\/span> <span class=\"token string\">&#034;Admin&#064;123&#034;<\/span>      <span class=\"token comment\"># \u5bc6\u7801<\/span><\/p>\n<p>  <span class=\"token comment\"># \u8bed\u8a00\u548c\u672c\u5730\u5316<\/span><br \/>\n  <span class=\"token key atrule\">LANGUAGE<\/span><span class=\"token punctuation\">:<\/span> <span class=\"token string\">&#034;zh-CN&#034;<\/span>          <span class=\"token comment\"># \u8bed\u8a00&#xff08;\u7b80\u4f53\u4e2d\u6587&#xff09;<\/span><br \/>\n  <span class=\"token key atrule\">REGION<\/span><span class=\"token punctuation\">:<\/span> <span class=\"token string\">&#034;China&#034;<\/span>            <span class=\"token comment\"># \u533a\u57df<\/span><br \/>\n  <span class=\"token key atrule\">KEYBOARD<\/span><span class=\"token punctuation\">:<\/span> <span class=\"token string\">&#034;zh-CN&#034;<\/span>          <span class=\"token comment\"># \u952e\u76d8\u5e03\u5c40<\/span><\/p>\n<p>  <span class=\"token comment\"># \u7f51\u7edc\u914d\u7f6e<\/span><br \/>\n  <span class=\"token key atrule\">DHCP<\/span><span class=\"token punctuation\">:<\/span> <span class=\"token string\">&#034;Y&#034;<\/span>                  <span class=\"token comment\"># \u4f7f\u7528 DHCP<\/span><br \/>\n  <span class=\"token comment\"># IP: &#034;192.168.1.100&#034;      # \u9759\u6001 IP&#xff08;\u53ef\u9009&#xff09;<\/span><br \/>\n  <span class=\"token comment\"># GATEWAY: &#034;192.168.1.1&#034;   # \u7f51\u5173&#xff08;\u53ef\u9009&#xff09;<\/span><br \/>\n  <span class=\"token comment\"># DNS: &#034;8.8.8.8&#034;           # DNS&#xff08;\u53ef\u9009&#xff09;<\/span><\/p>\n<p>  <span class=\"token comment\"># \u5b89\u88c5\u9009\u9879<\/span><br \/>\n  <span class=\"token key atrule\">SKIP_AUTO<\/span><span class=\"token punctuation\">:<\/span> <span class=\"token string\">&#034;N&#034;<\/span>             <span class=\"token comment\"># \u662f\u5426\u8df3\u8fc7\u81ea\u52a8\u5b89\u88c5<\/span><br \/>\n  <span class=\"token key atrule\">HOME_URL<\/span><span class=\"token punctuation\">:<\/span> <span class=\"token string\">&#034;https:\/\/&#8230;&#034;<\/span>    <span class=\"token comment\"># \u9996\u6b21\u6253\u5f00\u7684\u7f51\u9875<\/span><\/p>\n<p>  <span class=\"token comment\"># \u4ea7\u54c1\u5bc6\u94a5&#xff08;\u53ef\u9009&#xff09;<\/span><br \/>\n  <span class=\"token comment\"># KEY: &#034;XXXXX-XXXXX-XXXXX-XXXXX-XXXXX&#034;<\/span><\/p>\n<hr \/>\n<h3>\u516d\u3001\u6027\u80fd\u4f18\u5316<\/h3>\n<h4>6.1 \u78c1\u76d8\u6027\u80fd\u4f18\u5316<\/h4>\n<p><span class=\"token comment\"># \u5728 docker-compose.yml \u4e2d\u6dfb\u52a0<\/span><br \/>\n<span class=\"token key atrule\">volumes<\/span><span class=\"token punctuation\">:<\/span><br \/>\n  <span class=\"token punctuation\">&#8211;<\/span> .\/storage<span class=\"token punctuation\">:<\/span>\/storage<br \/>\n<span class=\"token key atrule\">environment<\/span><span class=\"token punctuation\">:<\/span><br \/>\n  <span class=\"token comment\"># \u542f\u7528 virtio \u9a71\u52a8&#xff08;\u66f4\u5feb\u7684\u78c1\u76d8 I\/O&#xff09;<\/span><br \/>\n  <span class=\"token key atrule\">DISK_TYPE<\/span><span class=\"token punctuation\">:<\/span> <span class=\"token string\">&#034;virtio&#034;<\/span><\/p>\n<h4>6.2 \u5185\u5b58\u4f18\u5316<\/h4>\n<p><span class=\"token comment\"># \u5728\u5bbf\u4e3b\u673a\u4e0a\u542f\u7528\u5927\u9875\u5185\u5b58<\/span><br \/>\n<span class=\"token builtin class-name\">echo<\/span> <span class=\"token number\">1024<\/span> <span class=\"token operator\">&gt;<\/span> \/proc\/sys\/vm\/nr_hugepages<\/p>\n<p><span class=\"token comment\"># \u5728 docker-compose.yml \u4e2d\u6302\u8f7d<\/span><br \/>\nvolumes:<br \/>\n  &#8211; \/dev\/hugepages:\/dev\/hugepages<\/p>\n<h4>6.3 \u7f51\u7edc\u4f18\u5316<\/h4>\n<p><span class=\"token comment\"># \u4f7f\u7528 macvlan \u7f51\u7edc\u6a21\u5f0f&#xff08;\u865a\u62df\u673a\u83b7\u5f97\u72ec\u7acb IP&#xff09;<\/span><br \/>\n<span class=\"token key atrule\">networks<\/span><span class=\"token punctuation\">:<\/span><br \/>\n  <span class=\"token key atrule\">default<\/span><span class=\"token punctuation\">:<\/span><br \/>\n    <span class=\"token key atrule\">driver<\/span><span class=\"token punctuation\">:<\/span> macvlan<br \/>\n    <span class=\"token key atrule\">driver_opts<\/span><span class=\"token punctuation\">:<\/span><br \/>\n      <span class=\"token key atrule\">parent<\/span><span class=\"token punctuation\">:<\/span> p6p1<br \/>\n    <span class=\"token key atrule\">ipam<\/span><span class=\"token punctuation\">:<\/span><br \/>\n      <span class=\"token key atrule\">config<\/span><span class=\"token punctuation\">:<\/span><br \/>\n        <span class=\"token punctuation\">&#8211;<\/span> <span class=\"token key atrule\">subnet<\/span><span class=\"token punctuation\">:<\/span> xx.xxx.xxx.xx\/24<br \/>\n          <span class=\"token key atrule\">gateway<\/span><span class=\"token punctuation\">:<\/span> xx.xx.xx.xx<\/p>\n<hr \/>\n<h3>\u4e03\u3001\u5e38\u89c1\u95ee\u9898<\/h3>\n<h4>Q1&#xff1a;\u542f\u52a8\u65f6\u62a5\u9519 Could not access KVM kernel module<\/h4>\n<p><span class=\"token comment\"># \u68c0\u67e5 KVM \u6a21\u5757<\/span><br \/>\nlsmod <span class=\"token operator\">|<\/span> <span class=\"token function\">grep<\/span> kvm<\/p>\n<p><span class=\"token comment\"># \u91cd\u65b0\u52a0\u8f7d<\/span><br \/>\n<span class=\"token function\">sudo<\/span> modprobe kvm<br \/>\n<span class=\"token function\">sudo<\/span> modprobe kvm_amd<\/p>\n<p><span class=\"token comment\"># \u68c0\u67e5\u6743\u9650<\/span><br \/>\n<span class=\"token function\">ls<\/span> <span class=\"token parameter variable\">-la<\/span> \/dev\/kvm<br \/>\n<span class=\"token function\">sudo<\/span> <span class=\"token function\">chmod<\/span> <span class=\"token number\">666<\/span> \/dev\/kvm<\/p>\n<h4>Q2&#xff1a;\u542f\u52a8\u65f6\u62a5\u9519 Permission denied<\/h4>\n<p><span class=\"token comment\"># \u786e\u4fdd\u4f7f\u7528 &#8211;privileged \u6a21\u5f0f<\/span><br \/>\n<span class=\"token comment\"># \u786e\u4fdd Docker \u7528\u6237\u5728 kvm \u7ec4<\/span><br \/>\n<span class=\"token function\">sudo<\/span> <span class=\"token function\">usermod<\/span> <span class=\"token parameter variable\">-aG<\/span> kvm root<br \/>\n<span class=\"token function\">sudo<\/span> <span class=\"token function\">usermod<\/span> <span class=\"token parameter variable\">-aG<\/span> <span class=\"token function\">docker<\/span> root<\/p>\n<h4>Q3&#xff1a;\u8fdc\u7a0b\u684c\u9762\u65e0\u6cd5\u8fde\u63a5<\/h4>\n<p><span class=\"token comment\"># \u68c0\u67e5\u5bb9\u5668\u662f\u5426\u8fd0\u884c<\/span><br \/>\n<span class=\"token function\">docker<\/span> <span class=\"token function\">ps<\/span> <span class=\"token operator\">|<\/span> <span class=\"token function\">grep<\/span> windows<\/p>\n<p><span class=\"token comment\"># \u68c0\u67e5\u7aef\u53e3\u662f\u5426\u5f00\u653e<\/span><br \/>\n<span class=\"token function\">netstat<\/span> <span class=\"token parameter variable\">-tlnp<\/span> <span class=\"token operator\">|<\/span> <span class=\"token function\">grep<\/span> <span class=\"token number\">3389<\/span><\/p>\n<p><span class=\"token comment\"># \u68c0\u67e5\u9632\u706b\u5899<\/span><br \/>\n<span class=\"token function\">sudo<\/span> firewall-cmd &#8211;list-ports<br \/>\n<span class=\"token function\">sudo<\/span> firewall-cmd &#8211;add-port<span class=\"token operator\">&#061;<\/span><span class=\"token number\">3389<\/span>\/tcp <span class=\"token parameter variable\">&#8211;permanent<\/span><br \/>\n<span class=\"token function\">sudo<\/span> firewall-cmd <span class=\"token parameter variable\">&#8211;reload<\/span><\/p>\n<h4>Q4&#xff1a;\u5b89\u88c5\u901f\u5ea6\u5f88\u6162<\/h4>\n<p><span class=\"token comment\"># \u67e5\u770b\u8d44\u6e90\u5360\u7528<\/span><br \/>\n<span class=\"token function\">docker<\/span> stats windows-vm<\/p>\n<p><span class=\"token comment\"># \u589e\u52a0\u5206\u914d\u7684\u8d44\u6e90<\/span><br \/>\n<span class=\"token comment\"># \u7f16\u8f91 docker-compose.yml<\/span><br \/>\n<span class=\"token comment\"># RAM_SIZE: &#034;16G&#034;<\/span><br \/>\n<span class=\"token comment\"># CPU_CORES: &#034;8&#034;<\/span><\/p>\n<h4>Q5&#xff1a;Docker \u955c\u50cf\u5bfc\u5165\u5931\u8d25<\/h4>\n<p><span class=\"token comment\"># \u68c0\u67e5 Docker \u7248\u672c\u662f\u5426\u517c\u5bb9<\/span><br \/>\n<span class=\"token function\">docker<\/span> version<\/p>\n<p><span class=\"token comment\"># \u68c0\u67e5\u78c1\u76d8\u7a7a\u95f4<\/span><br \/>\n<span class=\"token function\">df<\/span> <span class=\"token parameter variable\">-h<\/span><\/p>\n<p><span class=\"token comment\"># \u5c1d\u8bd5\u91cd\u65b0\u5bfc\u5165<\/span><br \/>\n<span class=\"token function\">docker<\/span> rmi dockur\/windows:latest<br \/>\n<span class=\"token function\">docker<\/span> load <span class=\"token parameter variable\">-i<\/span> dockur-windows.tar<\/p>\n<h4>Q6&#xff1a;USB \u8bbe\u5907\u76f4\u901a<\/h4>\n<h5>Q6.1 \u5e94\u7528\u573a\u666f<\/h5>\n<p>\u9700\u8981\u5728 Windows \u865a\u62df\u673a\u4e2d\u4f7f\u7528\u5bbf\u4e3b\u673a\u7684 USB \u8bbe\u5907&#xff0c;\u5982&#xff1a;<\/p>\n<ul>\n<li>USB \u786c\u76d8 \/ U \u76d8<\/li>\n<li>USB \u52a0\u5bc6\u72d7<\/li>\n<li>USB \u6253\u5370\u673a<\/li>\n<li>USB \u626b\u63cf\u4eea<\/li>\n<li>\u5176\u4ed6 USB \u5916\u8bbe<\/li>\n<\/ul>\n<h5>Q6.2 \u83b7\u53d6 USB \u8bbe\u5907\u4fe1\u606f<\/h5>\n<p><span class=\"token comment\"># \u63d2\u5165 USB \u8bbe\u5907\u540e&#xff0c;\u6267\u884c\u4ee5\u4e0b\u547d\u4ee4\u67e5\u770b<\/span><br \/>\nlsusb<\/p>\n<p>\u8f93\u51fa\u793a\u4f8b&#xff1a;<\/p>\n<p>Bus 002 Device 003: ID 0951:1666 Kingston Technology DataTraveler 100 G3\/G4\/SE9 G2<br \/>\nBus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub<br \/>\nBus 001 Device 002: ID 046d:c52b Logitech, Inc. Unifying Receiver<br \/>\n                     ^^^^  ^^^^<br \/>\n                   vendorid  productid<\/p>\n<p>\u8bb0\u5f55\u5173\u952e\u4fe1\u606f&#xff1a;<\/p>\n<table>\n<tr>\u8bbe\u5907vendoridproductid<\/tr>\n<tbody>\n<tr>\n<td>Kingston U\u76d8<\/td>\n<td>0x0951<\/td>\n<td>0x1666<\/td>\n<\/tr>\n<tr>\n<td>Logitech \u952e\u9f20<\/td>\n<td>0x046d<\/td>\n<td>0xc52b<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h5>Q6.3 \u914d\u7f6e Docker Compose<\/h5>\n<p><span class=\"token key atrule\">version<\/span><span class=\"token punctuation\">:<\/span> <span class=\"token string\">&#039;3.8&#039;<\/span><\/p>\n<p><span class=\"token key atrule\">services<\/span><span class=\"token punctuation\">:<\/span><br \/>\n  <span class=\"token key atrule\">windows<\/span><span class=\"token punctuation\">:<\/span><br \/>\n    <span class=\"token key atrule\">image<\/span><span class=\"token punctuation\">:<\/span> dockurr\/windows<span class=\"token punctuation\">:<\/span>latest<br \/>\n    <span class=\"token key atrule\">container_name<\/span><span class=\"token punctuation\">:<\/span> windows<span class=\"token punctuation\">&#8211;<\/span>vm<br \/>\n    <span class=\"token key atrule\">privileged<\/span><span class=\"token punctuation\">:<\/span> <span class=\"token boolean important\">true<\/span><br \/>\n    <span class=\"token key atrule\">devices<\/span><span class=\"token punctuation\">:<\/span><br \/>\n      <span class=\"token punctuation\">&#8211;<\/span> \/dev\/kvm<br \/>\n      <span class=\"token punctuation\">&#8211;<\/span> \/dev\/bus\/usb                        <span class=\"token comment\"># USB \u603b\u7ebf\u8bbe\u5907<\/span><br \/>\n    <span class=\"token key atrule\">ports<\/span><span class=\"token punctuation\">:<\/span><br \/>\n      <span class=\"token punctuation\">&#8211;<\/span> <span class=\"token string\">&#034;8006:8006&#034;<\/span><br \/>\n      <span class=\"token punctuation\">&#8211;<\/span> <span class=\"token string\">&#034;3389:3389&#034;<\/span><br \/>\n    <span class=\"token key atrule\">volumes<\/span><span class=\"token punctuation\">:<\/span><br \/>\n      <span class=\"token punctuation\">&#8211;<\/span> .\/storage<span class=\"token punctuation\">:<\/span>\/storage<br \/>\n      <span class=\"token punctuation\">&#8211;<\/span> .\/windows.iso<span class=\"token punctuation\">:<\/span>\/storage\/custom.iso<br \/>\n    <span class=\"token key atrule\">environment<\/span><span class=\"token punctuation\">:<\/span><br \/>\n      <span class=\"token key atrule\">VERSION<\/span><span class=\"token punctuation\">:<\/span> <span class=\"token string\">&#034;win10&#034;<\/span><br \/>\n      <span class=\"token key atrule\">RAM_SIZE<\/span><span class=\"token punctuation\">:<\/span> <span class=\"token string\">&#034;8G&#034;<\/span><br \/>\n      <span class=\"token key atrule\">CPU_CORES<\/span><span class=\"token punctuation\">:<\/span> <span class=\"token string\">&#034;4&#034;<\/span><br \/>\n      <span class=\"token key atrule\">DISK_SIZE<\/span><span class=\"token punctuation\">:<\/span> <span class=\"token string\">&#034;100G&#034;<\/span><br \/>\n      <span class=\"token key atrule\">USERNAME<\/span><span class=\"token punctuation\">:<\/span> <span class=\"token string\">&#034;admin&#034;<\/span><br \/>\n      <span class=\"token key atrule\">PASSWORD<\/span><span class=\"token punctuation\">:<\/span> <span class=\"token string\">&#034;Admin&#064;123&#034;<\/span><br \/>\n      <span class=\"token key atrule\">ARGUMENTS<\/span><span class=\"token punctuation\">:<\/span> <span class=\"token string\">&#034;-device usb-host,vendorid&#061;0x0951,productid&#061;0x1666&#034;<\/span>   <span class=\"token comment\"># USB \u8bbe\u5907\u76f4\u901a<\/span><br \/>\n    <span class=\"token key atrule\">restart<\/span><span class=\"token punctuation\">:<\/span> unless<span class=\"token punctuation\">&#8211;<\/span>stopped<\/p>\n<p>\u5173\u952e\u914d\u7f6e\u8bf4\u660e&#xff1a;<\/p>\n<table>\n<tr>\u914d\u7f6e\u9879\u8bf4\u660e<\/tr>\n<tbody>\n<tr>\n<td>devices: \/dev\/bus\/usb<\/td>\n<td>\u6620\u5c04 USB \u603b\u7ebf\u8bbe\u5907\u5230\u5bb9\u5668<\/td>\n<\/tr>\n<tr>\n<td>ARGUMENTS: &#034;-device usb-host,vendorid&#061;xxx,productid&#061;xxx&#034;<\/td>\n<td>\u6307\u5b9a\u8981\u76f4\u901a\u7684 USB \u8bbe\u5907<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h5>Q6.4 \u591a\u4e2a USB \u8bbe\u5907\u76f4\u901a<\/h5>\n<p><span class=\"token key atrule\">environment<\/span><span class=\"token punctuation\">:<\/span><br \/>\n  <span class=\"token key atrule\">ARGUMENTS<\/span><span class=\"token punctuation\">:<\/span> <span class=\"token string\">&#034;-device usb-host,vendorid&#061;0x0951,productid&#061;0x1666 -device usb-host,vendorid&#061;0x046d,productid&#061;0xc52b&#034;<\/span><\/p>\n<h5>Q6.5 \u4f7f\u7528\u6b65\u9aa4<\/h5>\n<p><span class=\"token comment\"># \u7b2c\u4e00\u6b65&#xff1a;Windows \u5b89\u88c5\u5b8c\u6210\u540e&#xff0c;\u518d\u63d2\u5165 USB \u8bbe\u5907&#xff01;<\/span><br \/>\n<span class=\"token comment\"># \u26a0\ufe0f \u8fd9\u4e00\u6b65\u975e\u5e38\u91cd\u8981&#xff0c;\u5426\u5219\u4f1a\u5bfc\u81f4\u78c1\u76d8\u987a\u5e8f\u6df7\u4e71&#xff0c;\u5b89\u88c5\u5931\u8d25<\/span><\/p>\n<p><span class=\"token comment\"># \u7b2c\u4e8c\u6b65&#xff1a;\u63d2\u5165 USB \u8bbe\u5907&#xff0c;\u83b7\u53d6 vendorid \u548c productid<\/span><br \/>\nlsusb<\/p>\n<p><span class=\"token comment\"># \u7b2c\u4e09\u6b65&#xff1a;\u4fee\u6539 docker-compose.yml \u4e2d\u7684 ARGUMENTS<\/span><br \/>\n<span class=\"token comment\"># \u5c06 vendorid \u548c productid \u66ff\u6362\u4e3a\u4f60\u8bbe\u5907\u7684\u5b9e\u9645\u503c<\/span><\/p>\n<p><span class=\"token comment\"># \u7b2c\u56db\u6b65&#xff1a;\u91cd\u5efa\u5bb9\u5668<\/span><br \/>\n<span class=\"token function\">docker-compose<\/span> down<br \/>\n<span class=\"token function\">docker-compose<\/span> up <span class=\"token parameter variable\">-d<\/span><\/p>\n<p><span class=\"token comment\"># \u7b2c\u4e94\u6b65&#xff1a;\u7b49\u5f85 Windows \u542f\u52a8&#xff0c;U \u76d8\u4f1a\u81ea\u52a8\u51fa\u73b0\u5728&#034;\u6b64\u7535\u8111&#034;\u4e2d<\/span><\/p>\n<h5>Q6.6 \u26a0\ufe0f \u91cd\u8981\u6ce8\u610f\u4e8b\u9879<\/h5>\n<p>\u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510<br \/>\n\u2502  \u26a0\ufe0f  USB \u78c1\u76d8\u9a71\u52a8\u5668&#xff08;U\u76d8\u3001\u79fb\u52a8\u786c\u76d8&#xff09;\u91cd\u8981\u63d0\u9192                    \u2502<br \/>\n\u251c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2524<br \/>\n\u2502                                                                 \u2502<br \/>\n\u2502  \u5fc5\u987b\u7b49 Windows \u5b89\u88c5\u5b8c\u6210\u540e\u518d\u63d2\u5165 USB \u8bbe\u5907&#xff01;                     \u2502<br \/>\n\u2502                                                                 \u2502<br \/>\n\u2502  \u539f\u56e0&#xff1a;                                                         \u2502<br \/>\n\u2502  \u5982\u679c\u5728\u5b89\u88c5\u8fc7\u7a0b\u4e2d\u63d2\u5165 USB \u78c1\u76d8&#xff0c;QEMU \u4f1a\u5c06 USB \u78c1\u76d8\u8bc6\u522b\u4e3a        \u2502<br \/>\n\u2502  \u7b2c\u4e00\u5757\u78c1\u76d8&#xff0c;\u5bfc\u81f4 Windows \u5b89\u88c5\u7a0b\u5e8f\u5c06\u7cfb\u7edf\u88c5\u5230 U \u76d8\u4e0a&#xff0c;            \u2502<br \/>\n\u2502  \u9020\u6210\u5b89\u88c5\u5931\u8d25\u3002                                                 \u2502<br \/>\n\u2502                                                                 \u2502<br \/>\n\u2502  \u6b63\u786e\u6d41\u7a0b&#xff1a;                                                     \u2502<br \/>\n\u2502  1. docker-compose up -d                                        \u2502<br \/>\n\u2502  2. \u7b49\u5f85 Windows \u5b89\u88c5\u5b8c\u6210                                       \u2502<br \/>\n\u2502  3. \u8fdb\u5165 Windows \u684c\u9762                                           \u2502<br \/>\n\u2502  4. \u5728\u5bbf\u4e3b\u673a\u63d2\u5165 U \u76d8                                           \u2502<br \/>\n\u2502  5. \u6267\u884c docker-compose down &amp;&amp; docker-compose up -d            \u2502<br \/>\n\u2502                                                                 \u2502<br \/>\n\u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518<\/p>\n<h5>Q6.7 \u9a8c\u8bc1 USB \u8bbe\u5907<\/h5>\n<p>\u8fdb\u5165 Windows \u540e&#xff1a;<\/p>\n<p>1. \u6253\u5f00&#034;\u6b64\u7535\u8111&#034;&#xff0c;\u67e5\u770b\u662f\u5426\u51fa\u73b0 U \u76d8\u76d8\u7b26<br \/>\n2. \u6253\u5f00&#034;\u8bbe\u5907\u7ba1\u7406\u5668&#034;&#xff0c;\u5c55\u5f00&#034;\u901a\u7528\u4e32\u884c\u603b\u7ebf\u63a7\u5236\u5668&#034;<br \/>\n3. \u786e\u8ba4 USB \u8bbe\u5907\u5df2\u6b63\u786e\u8bc6\u522b<\/p>\n<h5>Q7&#xff1a;\u591a\u53f0\u865a\u62df\u673a\u5404\u6302\u8f7d\u4e00\u4e2a\u540c\u578b\u53f7 USB \u8bbe\u5907<\/h5>\n<h6>Q7.1 \u95ee\u9898\u573a\u666f<\/h6>\n<p>\u5b9e\u9645\u751f\u4ea7\u4e2d&#xff0c;\u7ecf\u5e38\u9047\u5230\u4ee5\u4e0b\u60c5\u51b5&#xff1a;<\/p>\n<ul>\n<li>\u591a\u628a\u540c\u54c1\u724c\u540c\u578b\u53f7\u7684 UKey&#xff08;\u5982\u94f6\u884cU\u76fe\u3001\u7a0e\u52a1UKey\u3001\u6570\u5b57\u8bc1\u4e66\u9501&#xff09;<\/li>\n<li>\u6bcf\u628a UKey \u9700\u8981\u5206\u914d\u7ed9\u4e0d\u540c\u7684\u865a\u62df\u673a\u72ec\u7acb\u4f7f\u7528<\/li>\n<li>vendorid \u548c productid \u5b8c\u5168\u76f8\u540c&#xff0c;\u65e0\u6cd5\u901a\u8fc7\u8fd9\u4e24\u4e2a\u53c2\u6570\u533a\u5206<\/li>\n<li>\u90e8\u5206\u8bbe\u5907 iSerial \u4e3a\u7a7a&#xff0c;\u4e5f\u65e0\u6cd5\u901a\u8fc7\u5e8f\u5217\u53f7\u533a\u5206<\/li>\n<\/ul>\n<p>\u5b9e\u9645\u8bbe\u5907\u4fe1\u606f&#xff1a;<\/p>\n<p>Bus 001 Device 005: ID xxx:xxx xxxxxx USB Key  \u2190 UKey-1<br \/>\nBus 001 Device 006: ID xxx:xxx xxxxxx USB Key  \u2190 UKey-2<br \/>\nBus 001 Device 007: ID xxx:xxx xxxxxx USB Key  \u2190 UKey-3<\/p>\n<p><span class=\"token comment\"># \u4e09\u4e2a\u8bbe\u5907\u7684\u5e8f\u5217\u53f7\u5168\u90e8\u4e3a\u7a7a<\/span><br \/>\nlsusb <span class=\"token parameter variable\">-v<\/span> <span class=\"token parameter variable\">-d<\/span> xxx:xxx<span class=\"token operator\"><span class=\"token file-descriptor important\">2<\/span>&gt;<\/span>\/dev\/null <span class=\"token operator\">|<\/span> <span class=\"token function\">grep<\/span> iSerial<br \/>\n<span class=\"token comment\">#   iSerial                 0<\/span><br \/>\n<span class=\"token comment\">#   iSerial                 0<\/span><br \/>\n<span class=\"token comment\">#   iSerial                 0<\/span><\/p>\n<h6>Q7.2 \u89e3\u51b3\u601d\u8def<\/h6>\n<p>\u867d\u7136 vendorid &#043; productid &#043; serial \u90fd\u65e0\u6cd5\u533a\u5206\u8bbe\u5907&#xff0c;\u4f46 QEMU \u7684 usb-host \u53c2\u6570\u8fd8\u652f\u6301 hostbus &#043; hostaddr&#xff0c;\u5373\u901a\u8fc7 USB \u603b\u7ebf\u7f16\u53f7\u548c\u8bbe\u5907\u5730\u5740\u6765\u7cbe\u786e\u5b9a\u4f4d\u5230\u67d0\u4e2a\u5177\u4f53\u7684\u7269\u7406\u8bbe\u5907\u3002<\/p>\n<table>\n<tr>\u53c2\u6570\u8bf4\u660e\u793a\u4f8b\u503c<\/tr>\n<tbody>\n<tr>\n<td>hostbus<\/td>\n<td>USB \u603b\u7ebf\u7f16\u53f7&#xff08;lsusb \u8f93\u51fa\u4e2d\u7684 Bus&#xff09;<\/td>\n<td>1<\/td>\n<\/tr>\n<tr>\n<td>hostaddr<\/td>\n<td>USB \u8bbe\u5907\u5730\u5740&#xff08;lsusb \u8f93\u51fa\u4e2d\u7684 Device&#xff09;<\/td>\n<td>5<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>lsusb \u8f93\u51fa&#xff1a;<br \/>\nBus 001 Device 007: ID xxx:xxx xxxxxxxUSB Key<br \/>\n         ^^^        ^^^^<br \/>\n      hostbus&#061;1   hostaddr&#061;7<\/p>\n<h6>Q7.3 VM-1 \u914d\u7f6e<\/h6>\n<p><span class=\"token comment\"># docker-compose.yaml<\/span><br \/>\n<span class=\"token key atrule\">services<\/span><span class=\"token punctuation\">:<\/span><br \/>\n    <span class=\"token key atrule\">environment<\/span><span class=\"token punctuation\">:<\/span><br \/>\n      <span class=\"token key atrule\">ARGUMENTS<\/span><span class=\"token punctuation\">:<\/span> <span class=\"token string\">&#034;-device usb-host,hostbus&#061;1,hostaddr&#061;5&#034;<\/span><\/p>\n<h6>Q7.4 VM-2 \u914d\u7f6e<\/h6>\n<p><span class=\"token comment\"># docker-compose.yaml<\/span><br \/>\n<span class=\"token key atrule\">services<\/span><span class=\"token punctuation\">:<\/span><br \/>\n    <span class=\"token key atrule\">environment<\/span><span class=\"token punctuation\">:<\/span><br \/>\n      <span class=\"token key atrule\">ARGUMENTS<\/span><span class=\"token punctuation\">:<\/span> <span class=\"token string\">&#034;-device usb-host,hostbus&#061;1,hostaddr&#061;6&#034;<\/span><\/p>\n<h6>Q7.5 VM-3 \u914d\u7f6e<\/h6>\n<p><span class=\"token comment\"># docker-compose.yaml<\/span><br \/>\n<span class=\"token key atrule\">services<\/span><span class=\"token punctuation\">:<\/span><br \/>\n    <span class=\"token key atrule\">environment<\/span><span class=\"token punctuation\">:<\/span><br \/>\n      <span class=\"token key atrule\">ARGUMENTS<\/span><span class=\"token punctuation\">:<\/span> <span class=\"token string\">&#034;-device usb-host,hostbus&#061;1,hostaddr&#061;7&#034;<\/span><br \/>\n    <span class=\"token key atrule\">restart<\/span><span class=\"token punctuation\">:<\/span> unless<span class=\"token punctuation\">&#8211;<\/span>stopped<\/p>\n<hr \/>\n<h3>\u516b\u3001\u76ee\u5f55\u7ed3\u6784\u603b\u7ed3<\/h3>\n<p>\/data\/windows-vm\/<br \/>\n\u251c\u2500\u2500 docker-compose.yml          # Docker Compose \u914d\u7f6e\u6587\u4ef6<br \/>\n\u251c\u2500\u2500 storage\/                    # \u865a\u62df\u78c1\u76d8\u5b58\u50a8&#xff08;\u81ea\u52a8\u521b\u5efa&#xff09;<br \/>\n\u2502   \u251c\u2500\u2500 windows.qcow2          # \u865a\u62df\u78c1\u76d8\u6587\u4ef6<br \/>\n\u2502   \u251c\u2500\u2500 custom.iso             # ISO \u6587\u4ef6&#xff08;\u5982\u679c\u6709&#xff09;<br \/>\n\u2502   \u2514\u2500\u2500 &#8230;<br \/>\n\u2514\u2500\u2500 share\/                      # \u5171\u4eab\u6587\u4ef6\u5939&#xff08;\u53ef\u9009&#xff09;<br \/>\n    \u2514\u2500\u2500 &#8230;<\/p>\n<hr \/>\n<h3>\u4e5d\u3001\u603b\u7ed3<\/h3>\n<table>\n<tr>\u6b65\u9aa4\u547d\u4ee4\u8bf4\u660e<\/tr>\n<tbody>\n<tr>\n<td>1. \u68c0\u67e5\u73af\u5883<\/td>\n<td>.\/check-kvm-env.sh<\/td>\n<td>\u786e\u8ba4\u865a\u62df\u5316\u652f\u6301<\/td>\n<\/tr>\n<tr>\n<td>2. \u521b\u5efa\u76ee\u5f55<\/td>\n<td>mkdir -p \/data\/windows-vm<\/td>\n<td>\u521b\u5efa\u9879\u76ee\u76ee\u5f55<\/td>\n<\/tr>\n<tr>\n<td>3. \u7f16\u5199\u914d\u7f6e<\/td>\n<td>vi docker-compose.yml<\/td>\n<td>\u914d\u7f6e\u6587\u4ef6<\/td>\n<\/tr>\n<tr>\n<td>4. \u5bfc\u5165\u955c\u50cf<\/td>\n<td>docker load -i xxx.tar<\/td>\n<td>\u79bb\u7ebf\u5bfc\u5165\u955c\u50cf<\/td>\n<\/tr>\n<tr>\n<td>5. \u542f\u52a8\u670d\u52a1<\/td>\n<td>docker-compose up -d<\/td>\n<td>\u542f\u52a8 Windows<\/td>\n<\/tr>\n<tr>\n<td>6. \u8bbf\u95ee\u7cfb\u7edf<\/td>\n<td>\u6d4f\u89c8\u5668\u8bbf\u95ee :8006<\/td>\n<td>Web \u7ba1\u7406\u754c\u9762<\/td>\n<\/tr>\n<tr>\n<td>7. \u8fdc\u7a0b\u684c\u9762<\/td>\n<td>RDP \u8fde\u63a5 :3389<\/td>\n<td>\u4f7f\u7528 Windows<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<hr \/>\n<p>\u53c2\u8003\u8d44\u6599&#xff1a;<\/p>\n<ul>\n<li>dockur\/windows GitHub<\/li>\n<li>KVM \u5b98\u65b9\u6587\u6863<\/li>\n<li>Docker Compose \u6587\u6863<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>\u535a\u5ba2\u6587\u7ae0 &#x1f4dd; \u5728\u56fd\u4ea7\u670d\u52a1\u5668&#xff08;\u9e92\u9e9f V10&#xff09;\u4e0a\u901a\u8fc7 Docker \u90e8\u7f72 Windows \u865a\u62df\u673a\u5b8c\u6574\u6307\u5357 \u80cc\u666f&#xff1a;\u5728\u4e00\u53f0\u57fa\u4e8e\u6d77\u5149\u5904\u7406\u5668\u7684\u9e92\u9e9f Linux V10 \u670d\u52a1\u5668\u4e0a&#xff0c;\u901a\u8fc7 Docker  KVM \u65b9\u5f0f\u865a\u62df\u5316\u8fd0\u884c Windows \u7cfb\u7edf\u3002\u9002\u7528\u4e8e\u56fd\u4ea7\u4fe1\u521b\u73af\u5883\u4e0b\u9700\u8981\u8fd0\u884c Windows \u5e94\u7528\u7684\u573a\u666f\u3002 \u4e00\u3001\u73af\u5883\u8bf4\u660e<br \/>\n1.1 \u670d\u52a1\u5668\u786c\u4ef6<br \/>\n\u9879\u76ee\u914d\u7f6e\u64cd\u4f5c\u7cfb\u7edfKylin Linux Advanced Server V1<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[27,149,43],"topic":[],"class_list":["post-82631","post","type-post","status-publish","format-standard","hentry","category-server","tag-docker","tag-windows","tag-43"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u5728\u56fd\u4ea7\u670d\u52a1\u5668\u4e0a\u901a\u8fc7 Docker \u90e8\u7f72 Windows \u865a\u62df\u673a - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.wsisp.com\/helps\/82631.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u5728\u56fd\u4ea7\u670d\u52a1\u5668\u4e0a\u901a\u8fc7 Docker \u90e8\u7f72 Windows \u865a\u62df\u673a - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u535a\u5ba2\u6587\u7ae0 &#x1f4dd; \u5728\u56fd\u4ea7\u670d\u52a1\u5668&#xff08;\u9e92\u9e9f V10&#xff09;\u4e0a\u901a\u8fc7 Docker \u90e8\u7f72 Windows \u865a\u62df\u673a\u5b8c\u6574\u6307\u5357 \u80cc\u666f&#xff1a;\u5728\u4e00\u53f0\u57fa\u4e8e\u6d77\u5149\u5904\u7406\u5668\u7684\u9e92\u9e9f Linux V10 \u670d\u52a1\u5668\u4e0a&#xff0c;\u901a\u8fc7 Docker KVM \u65b9\u5f0f\u865a\u62df\u5316\u8fd0\u884c Windows \u7cfb\u7edf\u3002\u9002\u7528\u4e8e\u56fd\u4ea7\u4fe1\u521b\u73af\u5883\u4e0b\u9700\u8981\u8fd0\u884c Windows \u5e94\u7528\u7684\u573a\u666f\u3002 \u4e00\u3001\u73af\u5883\u8bf4\u660e 1.1 \u670d\u52a1\u5668\u786c\u4ef6 \u9879\u76ee\u914d\u7f6e\u64cd\u4f5c\u7cfb\u7edfKylin Linux Advanced Server V1\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/82631.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2026-07-25T02:43:10+00:00\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"7 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/82631.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/82631.html\",\"name\":\"\u5728\u56fd\u4ea7\u670d\u52a1\u5668\u4e0a\u901a\u8fc7 Docker \u90e8\u7f72 Windows \u865a\u62df\u673a - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2026-07-25T02:43:10+00:00\",\"dateModified\":\"2026-07-25T02:43:10+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/82631.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/82631.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/82631.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u5728\u56fd\u4ea7\u670d\u52a1\u5668\u4e0a\u901a\u8fc7 Docker \u90e8\u7f72 Windows \u865a\u62df\u673a\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\",\"url\":\"https:\/\/www.wsisp.com\/helps\/\",\"name\":\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"description\":\"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"contentUrl\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"caption\":\"admin\"},\"sameAs\":[\"http:\/\/wp.wsisp.com\"],\"url\":\"https:\/\/www.wsisp.com\/helps\/author\/admin\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"\u5728\u56fd\u4ea7\u670d\u52a1\u5668\u4e0a\u901a\u8fc7 Docker \u90e8\u7f72 Windows \u865a\u62df\u673a - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.wsisp.com\/helps\/82631.html","og_locale":"zh_CN","og_type":"article","og_title":"\u5728\u56fd\u4ea7\u670d\u52a1\u5668\u4e0a\u901a\u8fc7 Docker \u90e8\u7f72 Windows \u865a\u62df\u673a - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u535a\u5ba2\u6587\u7ae0 &#x1f4dd; \u5728\u56fd\u4ea7\u670d\u52a1\u5668&#xff08;\u9e92\u9e9f V10&#xff09;\u4e0a\u901a\u8fc7 Docker \u90e8\u7f72 Windows \u865a\u62df\u673a\u5b8c\u6574\u6307\u5357 \u80cc\u666f&#xff1a;\u5728\u4e00\u53f0\u57fa\u4e8e\u6d77\u5149\u5904\u7406\u5668\u7684\u9e92\u9e9f Linux V10 \u670d\u52a1\u5668\u4e0a&#xff0c;\u901a\u8fc7 Docker KVM \u65b9\u5f0f\u865a\u62df\u5316\u8fd0\u884c Windows \u7cfb\u7edf\u3002\u9002\u7528\u4e8e\u56fd\u4ea7\u4fe1\u521b\u73af\u5883\u4e0b\u9700\u8981\u8fd0\u884c Windows \u5e94\u7528\u7684\u573a\u666f\u3002 \u4e00\u3001\u73af\u5883\u8bf4\u660e 1.1 \u670d\u52a1\u5668\u786c\u4ef6 \u9879\u76ee\u914d\u7f6e\u64cd\u4f5c\u7cfb\u7edfKylin Linux Advanced Server V1","og_url":"https:\/\/www.wsisp.com\/helps\/82631.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2026-07-25T02:43:10+00:00","author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"7 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/82631.html","url":"https:\/\/www.wsisp.com\/helps\/82631.html","name":"\u5728\u56fd\u4ea7\u670d\u52a1\u5668\u4e0a\u901a\u8fc7 Docker \u90e8\u7f72 Windows \u865a\u62df\u673a - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2026-07-25T02:43:10+00:00","dateModified":"2026-07-25T02:43:10+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/82631.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/82631.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/82631.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"\u5728\u56fd\u4ea7\u670d\u52a1\u5668\u4e0a\u901a\u8fc7 Docker \u90e8\u7f72 Windows \u865a\u62df\u673a"}]},{"@type":"WebSite","@id":"https:\/\/www.wsisp.com\/helps\/#website","url":"https:\/\/www.wsisp.com\/helps\/","name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","description":"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41","name":"admin","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/","url":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","contentUrl":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","caption":"admin"},"sameAs":["http:\/\/wp.wsisp.com"],"url":"https:\/\/www.wsisp.com\/helps\/author\/admin"}]}},"_links":{"self":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/82631","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/comments?post=82631"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/82631\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=82631"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=82631"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=82631"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=82631"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}