{"id":11031,"date":"2022-10-14T22:08:51","date_gmt":"2022-10-15T05:08:51","guid":{"rendered":"https:\/\/www.xh86.me\/?p=11031"},"modified":"2022-10-14T22:08:51","modified_gmt":"2022-10-15T05:08:51","slug":"citrix-xenserver%e5%b8%b8%e7%94%a8%e5%91%bd%e4%bb%a4%e5%a4%a7%e5%85%a8","status":"publish","type":"post","link":"https:\/\/www.xh86.me\/?p=11031","title":{"rendered":"Citrix XenServer\u5e38\u7528\u547d\u4ee4\u5927\u5168"},"content":{"rendered":"<div class=\"wxsyncmain\">\n<section style=\"outline: 0px; max-width: 100%; letter-spacing: 0.544px; white-space: normal; background-color: #ffffff; visibility: visible; box-sizing: border-box !important; overflow-wrap: break-word !important;\" data-tools=\"\u65b0\u5a92\u4f53\u6392\u7248\" data-style-type=\"undefined\" data-id=\"3832503\">\n<section style=\"outline: 0px; max-width: 100%; visibility: visible; box-sizing: border-box !important; overflow-wrap: break-word !important;\" data-style-type=\"undefined\" data-id=\"3698773\">\n<section style=\"outline: 0px; max-width: 100%; visibility: visible; box-sizing: border-box !important; overflow-wrap: break-word !important;\" data-style-type=\"undefined\" data-id=\"3578863\">\n<section style=\"outline: 0px; max-width: 100%; visibility: visible; box-sizing: border-box !important; overflow-wrap: break-word !important;\" data-style-type=\"undefined\" data-id=\"3574738\">\n<section style=\"outline: 0px; max-width: 100%; visibility: visible; box-sizing: border-box !important; overflow-wrap: break-word !important;\" data-style-type=\"undefined\" data-id=\"3027362\">\n<section style=\"outline: 0px; max-width: 100%; visibility: visible; box-sizing: border-box !important; overflow-wrap: break-word !important;\" data-style-type=\"5\" data-id=\"2497021\">\n<h1 style=\"color: #222222; font-family: -apple-system, BlinkMacSystemFont, 'Helvetica Neue', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei UI', 'Microsoft YaHei', Arial, sans-serif; outline: 0px; max-width: 100%; letter-spacing: 0.544px; white-space: normal; background-color: #ffffff; visibility: visible; box-sizing: border-box !important; overflow-wrap: break-word !important;\" spellcheck=\"false\"><span style=\"outline: 0px; max-width: 100%; font-size: 17px; visibility: visible; box-sizing: border-box !important; overflow-wrap: break-word !important;\"><strong style=\"outline: 0px; max-width: 100%; visibility: visible; box-sizing: border-box !important; overflow-wrap: break-word !important;\">\u4e00\u3001\u7b80\u4ecb<\/strong><\/span><\/h1>\n<p style=\"margin-top: 24px; margin-bottom: 24px; outline: 0px; max-width: 100%; letter-spacing: 0.544px; white-space: normal; background-color: #ffffff; text-indent: 2em; visibility: visible; box-sizing: border-box !important; overflow-wrap: break-word !important;\"><span style=\"color: #000000; font-family: -apple-system, BlinkMacSystemFont, Helvetica Neue, PingFang SC, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;\"><span style=\"font-size: 14px;\">\u8fd1\u671f\u9879\u76ee\u4e2d\u9047\u5230\u5f88\u591aCitrix Xenserver\u95ee\u9898\uff0c \u4e0b\u9762\u7f57\u5217\u4e00\u4e9b\u5e38\u7528\u547d\u4ee4\u3002<\/span><\/span><\/p>\n<p style=\"color: #111111; font-family: 'PingFang SC', 'Microsoft YaHei', 'Helvetica Neue', Helvetica, Arial, sans-serif; margin: 10px auto; font-size: 13px; text-align: start; white-space: normal; background-color: #ffffff;\"><span style=\"outline: 0px; max-width: 100%; font-size: 17px; visibility: visible; box-sizing: border-box !important; overflow-wrap: break-word !important;\"><strong style=\"outline: 0px; max-width: 100%; visibility: visible; box-sizing: border-box !important; overflow-wrap: break-word !important;\">\u4e8c\u3001\u76d1\u63a7\u68c0\u67e5\u7c7b<\/strong><\/span><\/p>\n<section class=\"code-snippet__fix code-snippet__js\">\n<pre class=\"code-snippet__js\" data-lang=\"properties\"><code><span class=\"code-snippet_outer\"><span class=\"code-snippet__attr\">xentop-\u67e5\u770bXenServer\u4e0eVM\u7684\u8d44\u6e90\u4f7f\u7528\u60c5\u51b5<\/span><\/span><\/code><code><span class=\"code-snippet_outer\"><span class=\"code-snippet__attr\">xsconsole-\u8fdb\u5165XenServer\u7ba1\u7406\u9762\u677f\uff08\u67e5\u770b\u7f51\u5361\uff0cIP,\u7cfb\u7edf\u7248\u672c,\u7cfb\u7edf\u65f6\u95f4,\u786c\u4ef6\u4fe1\u606f\u7b49\uff09<\/span><\/span><\/code><code><span class=\"code-snippet_outer\"><span class=\"code-snippet__attr\">xe<\/span> <span class=\"code-snippet__string\">task-list-\u67e5\u770bXenServer\u4e34\u65f6\u4efb\u52a1\u8fdb\u7a0b<\/span><\/span><\/code><code><span class=\"code-snippet_outer\"><span class=\"code-snippet__attr\">service<\/span> <span class=\"code-snippet__string\">--status-all-\u67e5\u770b\u6240\u6709\u670d\u52a1\u8fd0\u884c\u72b6\u6001<\/span><\/span><\/code><\/pre>\n<\/section>\n<p style=\"color: #111111; font-family: 'PingFang SC', 'Microsoft YaHei', 'Helvetica Neue', Helvetica, Arial, sans-serif; margin: 10px auto; text-align: start; white-space: normal; background-color: #ffffff;\"><span style=\"outline: 0px; max-width: 100%; font-size: 17px; visibility: visible; box-sizing: border-box !important; overflow-wrap: break-word !important;\"><strong style=\"outline: 0px; max-width: 100%; visibility: visible; box-sizing: border-box !important; overflow-wrap: break-word !important;\">\u4e09\u3001\u901a\u7528\u76d1\u63a7\u68c0\u67e5\u547d\u4ee4<\/strong><\/span><\/p>\n<section class=\"code-snippet__fix code-snippet__js\">\n<pre class=\"code-snippet__js\" data-lang=\"properties\"><code><span class=\"code-snippet_outer\"><span class=\"code-snippet__attr\">pvs<\/span> <span class=\"code-snippet__string\">-- \u67e5\u770b\u7269\u7406\u5377<\/span><\/span><\/code><code><span class=\"code-snippet_outer\"><span class=\"code-snippet__attr\">pvscan<\/span><\/span><\/code><code><span class=\"code-snippet_outer\"><span class=\"code-snippet__attr\">vgdisplay<\/span><\/span><\/code><code><span class=\"code-snippet_outer\"><span class=\"code-snippet__attr\">lvs<\/span> <span class=\"code-snippet__string\">-- \u67e5\u770b\u903b\u8f91\u5377<\/span><\/span><\/code><code><span class=\"code-snippet_outer\"><span class=\"code-snippet__attr\">lvscan<\/span><\/span><\/code><code><span class=\"code-snippet_outer\"><span class=\"code-snippet__attr\">lvdisplay<\/span><\/span><\/code><code><span class=\"code-snippet_outer\"><span class=\"code-snippet__attr\">rm<\/span> <span class=\"code-snippet__string\">-rf \u76ee\u5f55\/\u6587\u4ef6 -- \u5f3a\u5236\u5220\u9664\u76ee\u5f55\/\u6587\u4ef6<\/span><\/span><\/code><code><span class=\"code-snippet_outer\"><span class=\"code-snippet__attr\">fdisk<\/span> <span class=\"code-snippet__string\">-l -- \u67e5\u770bLinux\u786c\u76d8\u4fe1\u606f\uff08\u540d\u79f0\u4e0e\u5206\u533a\u7b49\uff09<\/span><\/span><\/code><code><span class=\"code-snippet_outer\"><span class=\"code-snippet__attr\">df<\/span> <span class=\"code-snippet__string\">-hal -- \u67e5\u770bLinux\u7cfb\u7edf\u4fe1\u606f\uff08\u7cfb\u7edf\u7a7a\u95f4\uff0c\u6302\u8f7d\u4fe1\u606f\u7b49\uff09<\/span><\/span><\/code><code><span class=\"code-snippet_outer\"><span class=\"code-snippet__attr\">du<\/span> <span class=\"code-snippet__string\">-hcs \u76ee\u5f55\/\u6587\u4ef6 -- \u67e5\u770b\u8be5\u76ee\u5f55\/\u6587\u4ef6\u7684\u5927\u5c0f<\/span><\/span><\/code><code><span class=\"code-snippet_outer\"><span class=\"code-snippet__attr\">du<\/span> <span class=\"code-snippet__string\">-hcs \/var\/log\/ -- \u67e5\u770b\u65e5\u5fd7\u6587\u4ef6\u5927\u5c0f<\/span><\/span><\/code><code><span class=\"code-snippet_outer\"><span class=\"code-snippet__attr\">top<\/span> <span class=\"code-snippet__string\">-- \u67e5\u770bXenServer\u7cfb\u7edf\u8fdb\u7a0b\u4e0e\u8d1f\u8f7d\u60c5\u51b5<\/span><\/span><\/code><code><span class=\"code-snippet_outer\"><span class=\"code-snippet__attr\">vi<\/span> <span class=\"code-snippet__string\">\/etc\/rc.local -- \u67e5\u770b\u7cfb\u7edf\u542f\u52a8\u4efb\u52a1<\/span><\/span><\/code><code><span class=\"code-snippet_outer\"><span class=\"code-snippet__attr\">crontab<\/span> <span class=\"code-snippet__string\">-e -- \u67e5\u770b\u5b9a\u65f6\u6267\u884c\u7684\u4efb\u52a1<\/span><\/span><\/code><code><span class=\"code-snippet_outer\"><span class=\"code-snippet__attr\">history<\/span> <span class=\"code-snippet__string\">-- \u67e5\u770b\u6700\u8fd1\u4f7f\u7528\u7684\u547d\u4ee4<\/span><\/span><\/code><code><span class=\"code-snippet_outer\"><span class=\"code-snippet__attr\">clear<\/span> <span class=\"code-snippet__string\">-- \u6e05\u5c4f<\/span><\/span><\/code><code><span class=\"code-snippet_outer\"><span class=\"code-snippet__attr\">curl<\/span> <span class=\"code-snippet__string\">\u57df\u540d -- \u8bbf\u95ee\u57df\u540d<\/span><\/span><\/code><\/pre>\n<\/section>\n<p style=\"color: #111111; font-family: 'PingFang SC', 'Microsoft YaHei', 'Helvetica Neue', Helvetica, Arial, sans-serif; margin: 10px auto; text-align: start; white-space: normal; background-color: #ffffff;\">\n<span style=\"outline: 0px; max-width: 100%; font-size: 17px; visibility: visible; box-sizing: border-box !important; overflow-wrap: break-word !important;\"><strong style=\"outline: 0px; max-width: 100%; visibility: visible; box-sizing: border-box !important; overflow-wrap: break-word !important;\">\u56db\u3001\u7cfb\u7edf\u64cd\u4f5c\u7c7b<\/strong><\/span><\/p>\n<section class=\"code-snippet__fix code-snippet__js\">\n<pre class=\"code-snippet__js\" data-lang=\"properties\"><code><span class=\"code-snippet_outer\"><span class=\"code-snippet__attr\">service<\/span> <span class=\"code-snippet__string\">xapi restart-\u91cd\u542fXAPI\u670d\u52a1(\u8d1f\u8f7d\u8fc7\u9ad8\u65f6\u614e\u7528)<\/span><\/span><\/code><code><span class=\"code-snippet_outer\"><span class=\"code-snippet__attr\">xe-toolstack-restart-\u91cd\u542fXenServer\u6240\u6709\u670d\u52a1(\u8d1f\u8f7d\u8fc7\u9ad8\u65f6\u614e\u7528)<\/span><\/span><\/code><code><span class=\"code-snippet_outer\"><span class=\"code-snippet__attr\">reboot-\u91cd\u542f\u670d\u52a1\u5668<\/span><\/span><\/code><code><span class=\"code-snippet_outer\"><span class=\"code-snippet__attr\">mount<\/span> <span class=\"code-snippet__string\">\u903b\u8f91\u5377 \u76ee\u5f55-\u5c06\u903b\u8f91\u5377\u6302\u8f7d\u5230\u8be5\u76ee\u5f55\uff08\u6302\u8f7d\u540edf -hal\u53ef\u67e5\u770b\uff09<\/span><\/span><\/code><code><span class=\"code-snippet_outer\"><span class=\"code-snippet__attr\">umount<\/span> <span class=\"code-snippet__string\">\u903b\u8f91\u5377 \u76ee\u5f55-\u53cd\u6302\u8f7d<\/span><\/span><\/code><code><span class=\"code-snippet_outer\"><span class=\"code-snippet__attr\">lvremove-\u79fb\u9664\u903b\u8f91\u5377<\/span><\/span><\/code><\/pre>\n<\/section>\n<p style=\"color: #111111; font-family: 'PingFang SC', 'Microsoft YaHei', 'Helvetica Neue', Helvetica, Arial, sans-serif; margin: 10px auto; text-align: start; white-space: normal; background-color: #ffffff;\">\n<span style=\"outline: 0px; max-width: 100%; font-size: 17px; visibility: visible; box-sizing: border-box !important; overflow-wrap: break-word !important;\"><strong style=\"outline: 0px; max-width: 100%; visibility: visible; box-sizing: border-box !important; overflow-wrap: break-word !important;\">\u4e94\u3001XE SR\u64cd\u4f5c\u7c7b<\/strong><\/span><\/p>\n<section class=\"code-snippet__fix code-snippet__js\">\n<pre class=\"code-snippet__js\" data-lang=\"cpp\"><code><span class=\"code-snippet_outer\">xe sr-<span class=\"code-snippet__built_in\">list<\/span>-\u663e\u793a\u6240\u6709\u7269\u7406\u5b58\u50a8\uff08SR\uff09\u4fe1\u606f<\/span><\/code><code><span class=\"code-snippet_outer\">xe sr-<span class=\"code-snippet__built_in\">list<\/span> uuid=<span class=\"code-snippet__string\">\"UUID\"<\/span> - \u5339\u914dSR\u7684UUID\u663e\u793aSR\u4fe1\u606f<\/span><\/code><code><span class=\"code-snippet_outer\">xe sr-<span class=\"code-snippet__built_in\">list<\/span> name-label=<span class=\"code-snippet__string\">\"SR\u540d\u79f0\"<\/span> - \u5339\u914dSR\u540d\u79f0\u663e\u793aSR\u4fe1\u606f<\/span><\/code><code><span class=\"code-snippet_outer\"><span class=\"code-snippet__number\">1.<\/span>\u5220\u9664SR\u64cd\u4f5c\uff08\u6570\u636e\u4f1a\u4e22\u5931\uff09<\/span><\/code><code><span class=\"code-snippet_outer\">xe pbd-<span class=\"code-snippet__built_in\">list<\/span> sr-uuid=<span class=\"code-snippet__string\">\"SR-UUID\"<\/span> -- \u5339\u914dSR\u7684UUID\u627e\u51fa\u5bf9\u5e94\u7684\u7269\u7406\u8fde\u63a5\uff08PBD\uff09\u4fe1\u606f<\/span><\/code><code><span class=\"code-snippet_outer\">xe pbd-unplug uuid=<span class=\"code-snippet__string\">\"PBD-UUID\"<\/span> -- \u5339\u914dPBD\u7684UUID\u5220\u9664\u5bf9\u5e94\u7684PBD<\/span><\/code><code><span class=\"code-snippet_outer\">xe sr-forget uuid=<span class=\"code-snippet__string\">\"SR-UUID\"<\/span> -- \u5339\u914dSR\u7684UUID\u9057\u5fd8\u5bf9\u5e94\u7684SR<\/span><\/code><code><span class=\"code-snippet_outer\"><span class=\"code-snippet__number\">2.<\/span>\u521b\u5efa\u7269\u7406\u5b58\u50a8\uff08\u6210\u529f\u540e\u539f\u6570\u636e\u4e22\u5931\uff09<\/span><\/code><code><span class=\"code-snippet_outer\">xe sr-create name-label=<span class=\"code-snippet__string\">\"\u81ea\u5b9a\u4e49\u540d\u79f0\"<\/span> shared=<span class=\"code-snippet__literal\">false<\/span> device-config-device=\/dev\/sdb\uff08\u8bbe\u5907\u540d\uff09 type=lvm<\/span><\/code><\/pre>\n<\/section>\n<p style=\"color: #111111; font-family: 'PingFang SC', 'Microsoft YaHei', 'Helvetica Neue', Helvetica, Arial, sans-serif; margin: 10px auto; text-align: start; white-space: normal; background-color: #ffffff;\">\n<span style=\"outline: 0px; max-width: 100%; font-size: 17px; visibility: visible; box-sizing: border-box !important; overflow-wrap: break-word !important;\"><strong style=\"outline: 0px; max-width: 100%; visibility: visible; box-sizing: border-box !important; overflow-wrap: break-word !important;\">\u516d\u3001XE VM\u64cd\u4f5c\u7c7b<\/strong><\/span><\/p>\n<section class=\"code-snippet__fix code-snippet__js\">\n<pre class=\"code-snippet__js\" data-lang=\"sql\"><code><span class=\"code-snippet_outer\">xe vm-<span class=\"code-snippet__keyword\">start<\/span> <span class=\"code-snippet__keyword\">name<\/span>-label=<span class=\"code-snippet__string\">\"VM\u540d\u79f0\"<\/span> <span class=\"code-snippet__comment\">-- \u5339\u914dVM\u540d\u79f0\u6267\u884cVM\u5f00\u673a<\/span><\/span><\/code><code><span class=\"code-snippet_outer\">xe vm-reboot <span class=\"code-snippet__keyword\">name<\/span>-label=<span class=\"code-snippet__string\">\"VM\u540d\u79f0\"<\/span> <span class=\"code-snippet__comment\">-- \u5339\u914dVM\u540d\u79f0\u6267\u884cVM\u91cd\u542f<\/span><\/span><\/code><code><span class=\"code-snippet_outer\">xe vm-<span class=\"code-snippet__keyword\">shutdown<\/span> <span class=\"code-snippet__keyword\">name<\/span>-label=<span class=\"code-snippet__string\">\"VM\u540d\u79f0\"<\/span> <span class=\"code-snippet__comment\">-- \u5339\u914dVM\u540d\u79f0\u6267\u884cVM\u5173\u673a<\/span><\/span><\/code><code><span class=\"code-snippet_outer\">xe vm-<span class=\"code-snippet__keyword\">shutdown<\/span> <span class=\"code-snippet__keyword\">uuid<\/span>=<span class=\"code-snippet__string\">\"UUID\"<\/span> <span class=\"code-snippet__comment\">-- \u5339\u914dVM\u7684UUID\u6267\u884cVM\u5173\u673a\uff0c\u4ee5\u4e0b\u540c\u7406<\/span><\/span><\/code><code><span class=\"code-snippet_outer\">xe vm-<span class=\"code-snippet__keyword\">start<\/span> <span class=\"code-snippet__keyword\">uuid<\/span>=<span class=\"code-snippet__string\">\"UUID\"<\/span><\/span><\/code><code><span class=\"code-snippet_outer\">xe vm-reboot <span class=\"code-snippet__keyword\">uuid<\/span>=<span class=\"code-snippet__string\">\"UUID\"<\/span><\/span><\/code><code><span class=\"code-snippet_outer\">xe vm-<span class=\"code-snippet__keyword\">list<\/span> <span class=\"code-snippet__comment\">-- \u663e\u793a\u6240\u6709VM\u4fe1\u606f<\/span><\/span><\/code><code><span class=\"code-snippet_outer\">xe vm-<span class=\"code-snippet__keyword\">list<\/span> <span class=\"code-snippet__keyword\">name<\/span>-label=<span class=\"code-snippet__string\">\"VM\u540d\u79f0\"<\/span> <span class=\"code-snippet__comment\">-- \u5339\u914d\u540d\u79f0\u663e\u793aVM\u4fe1\u606f<\/span><\/span><\/code><code><span class=\"code-snippet_outer\">xe vm-<span class=\"code-snippet__keyword\">list<\/span> <span class=\"code-snippet__keyword\">uuid<\/span>=<span class=\"code-snippet__string\">\"UUID\"<\/span> <span class=\"code-snippet__comment\">-- \u5339\u914duuid\u663e\u793aVM\u4fe1\u606f<\/span><\/span><\/code><code><span class=\"code-snippet_outer\">xe vdi-<span class=\"code-snippet__keyword\">list<\/span> <span class=\"code-snippet__comment\">-- \u663e\u793a\u6240\u6709\u865a\u62df\u786c\u76d8\uff08VDI\uff09\u4fe1\u606f<\/span><\/span><\/code><code><span class=\"code-snippet_outer\">xe vdi-<span class=\"code-snippet__keyword\">list<\/span> vm-<span class=\"code-snippet__keyword\">uuid<\/span>=<span class=\"code-snippet__string\">\"VM-UUID\"<\/span> <span class=\"code-snippet__comment\">-- \u5339\u914dVM\u7684UUID\u663e\u793aVDI\u4fe1\u606f<\/span><\/span><\/code><code><span class=\"code-snippet_outer\">xe vdi-<span class=\"code-snippet__keyword\">list<\/span> <span class=\"code-snippet__keyword\">uuid<\/span>=<span class=\"code-snippet__string\">\"UUID\"<\/span> <span class=\"code-snippet__comment\">-- \u5339\u914dVDI\u7684UUID\u663e\u793aVDI\u4fe1\u606f<\/span><\/span><\/code><code><span class=\"code-snippet_outer\">xe vdi-<span class=\"code-snippet__keyword\">list<\/span> <span class=\"code-snippet__keyword\">name<\/span>-label=<span class=\"code-snippet__string\">\"VDI\u540d\u79f0\"<\/span> <span class=\"code-snippet__comment\">-- \u5339\u914dVDI\u540d\u79f0\u663e\u793aVDI\u4fe1\u606f<\/span><\/span><\/code><code><span class=\"code-snippet_outer\">xe vdi-forgrt <span class=\"code-snippet__keyword\">uuid<\/span>=<span class=\"code-snippet__string\">\"UUID\"<\/span> <span class=\"code-snippet__comment\">-- \u5339\u914dVDI\u7684UUID\u9057\u5fd8\u8be5VDI\u4fe1\u606f\uff08srcan\u53ef\u627e\u56de\uff09<\/span><\/span><\/code><\/pre>\n<\/section>\n<p style=\"color: #111111; font-family: 'PingFang SC', 'Microsoft YaHei', 'Helvetica Neue', Helvetica, Arial, sans-serif; margin: 10px auto; text-align: start; white-space: normal; background-color: #ffffff;\">\n<span style=\"outline: 0px; max-width: 100%; font-size: 17px; visibility: visible; box-sizing: border-box !important; overflow-wrap: break-word !important;\"><strong style=\"outline: 0px; max-width: 100%; visibility: visible; box-sizing: border-box !important; overflow-wrap: break-word !important;\">\u4e03\u3001\u7aef\u53e3\u6620\u5c04\u7c7b<\/strong><\/span><\/p>\n<section class=\"code-snippet__fix code-snippet__js\">\n<pre class=\"code-snippet__js\" data-lang=\"properties\"><code><span class=\"code-snippet_outer\"><span class=\"code-snippet__attr\">iptables<\/span> <span class=\"code-snippet__string\">-t nat -nvL -- \u67e5\u770b\u7aef\u53e3\u6620\u5c04\u4fe1\u606f\u8868<\/span><\/span><\/code><code><span class=\"code-snippet_outer\"><span class=\"code-snippet__attr\">1.\u624b\u52a8\u6dfb\u52a0\u7aef\u53e3\u6620\u5c04\uff08\u91cd\u542f\u540e\u4f1a\u4e22\u5931\uff09<\/span><\/span><\/code><code><span class=\"code-snippet_outer\"><span class=\"code-snippet__attr\">iptables<\/span> <span class=\"code-snippet__string\">-t nat -A PREROUTING -i eth0\uff08\u7f51\u5361\u540d\uff09 -p tcp -d \u516c\u7f51IP --dport 80\uff08\u7aef\u53e3\uff09 -j DNAT --to-destination \u6620\u5c04IP:80<\/span><\/span><\/code><code><span class=\"code-snippet_outer\"><span class=\"code-snippet__attr\">2.\u6620\u5c04\u51fa\u53e3\u89c4\u5219\uff08\u91cd\u542f\u540e\u4f1a\u4e22\u5931\uff09<\/span><\/span><\/code><code><span class=\"code-snippet_outer\"><span class=\"code-snippet__attr\">iptables<\/span> <span class=\"code-snippet__string\">-t nat -A POSTROUTING -o eth0 -j MASQUERADE<\/span><\/span><\/code><code><span class=\"code-snippet_outer\"><span class=\"code-snippet__attr\">3.XenSystem_NAT_Server\uff08nginx\uff09<\/span><\/span><\/code><code><span class=\"code-snippet_outer\"><span class=\"code-snippet__meta\">\/etc\/init.d\/networking<\/span> <span class=\"code-snippet__string\">restart -- \u91cd\u542f\u7f51\u5361<\/span><\/span><\/code><code><span class=\"code-snippet_outer\"><span class=\"code-snippet__attr\">vi<\/span> <span class=\"code-snippet__string\">\/etc\/resolv.conf -- \u4fee\u6539DNS<\/span><\/span><\/code><code><span class=\"code-snippet_outer\"><span class=\"code-snippet__attr\">vi<\/span> <span class=\"code-snippet__string\">\/etc\/network\/interfaces -- \u67e5\u770bNAT\u7f51\u5361\u914d<\/span><\/span><\/code><\/pre>\n<\/section>\n<p style=\"color: #111111; font-family: 'PingFang SC', 'Microsoft YaHei', 'Helvetica Neue', Helvetica, Arial, sans-serif; margin: 10px auto; text-align: start; white-space: normal; background-color: #ffffff;\">\n<h3 style=\"color: #000000; font-family: 'PingFang SC', 'Microsoft YaHei', 'Helvetica Neue', Helvetica, Arial, sans-serif; margin-top: 10px; margin-bottom: 10px; font-weight: bold; line-height: 1.5; text-align: start; white-space: normal; background-color: #ffffff;\">\u516b\u3001\u5e38\u89c1\u95ee\u9898\u89e3\u7b54<\/h3>\n<p style=\"color: #111111; font-family: 'PingFang SC', 'Microsoft YaHei', 'Helvetica Neue', Helvetica, Arial, sans-serif; margin: 10px auto; font-size: 13px; text-align: start; white-space: normal; background-color: #ffffff;\"><span style=\"outline: 0px; max-width: 100%; visibility: visible; font-size: 16px; box-sizing: border-box !important; overflow-wrap: break-word !important;\"><strong style=\"outline: 0px; max-width: 100%; visibility: visible; box-sizing: border-box !important; overflow-wrap: break-word !important;\">\u4e00\u3001\u65e0\u6cd5\u5220\u9664POOL\u91cc\u9762\u7684\u865a\u62df\u673a\uff1f<\/strong><\/span><br \/>\n1.\u9009\u4e2d\u4e0d\u80fd\u5220\u9664\u7684\u865a\u62df\u673a\u6240\u5728\u7684\u7269\u7406\u673a\uff0c\u5728console\u4e0b\u8f93\u5165\u5982\u4e0b\u5185\u5bb9:<br \/>\n#xe host-forget uuid=<br \/>\n\u5176\u4e2duuid\u7684\u4fe1\u606f\u4f7f\u7528#xe host-list\u67e5\u770b<br \/>\n\u67e5\u770b\u865a\u62df\u673a\u8be6\u7ec6\u4fe1\u606f xe vm-list params=all\/(name-label,uuid,networks)<br \/>\n\u5173\u95ed\u865a\u62df\u673a xe vm-shutdown uuid=&lt;vm_uuid&gt;ext3-fs error (device xvda2) in start_transaction: journal has aborted<br \/>\n\u5173\u95edhalted\/running\u865a\u62df\u673a xe vm-reset-powerstate force=true vm=uuid<br \/>\n\u5220\u9664\u865a\u62df\u673a xe vm-destroy uuid=&lt;vm_uuid&gt;<\/p>\n<p style=\"color: #111111; font-family: 'PingFang SC', 'Microsoft YaHei', 'Helvetica Neue', Helvetica, Arial, sans-serif; margin: 10px auto; font-size: 13px; text-align: start; white-space: normal; background-color: #ffffff;\"><span style=\"outline: 0px; max-width: 100%; visibility: visible; font-size: 16px; box-sizing: border-box !important; overflow-wrap: break-word !important;\"><strong style=\"outline: 0px; max-width: 100%; visibility: visible; box-sizing: border-box !important; overflow-wrap: break-word !important;\">\u4e8c\u3001\u65e0\u6cd5\u4fee\u6539\u865a\u62df\u673a\u7684\u7cfb\u7edf\u65f6\u95f4\uff1f<\/strong><\/span><br \/>\n\u4fee\u6539 \/etc\/sysctl.conf \u6587\u4ef6,\u6dfb\u52a0<br \/>\n# Set independent wall clock time<br \/>\nxen.independent_wallclock=1<br \/>\n\u6216disable\u6389Window Time Service<\/p>\n<p style=\"color: #111111; font-family: 'PingFang SC', 'Microsoft YaHei', 'Helvetica Neue', Helvetica, Arial, sans-serif; margin: 10px auto; font-size: 13px; text-align: start; white-space: normal; background-color: #ffffff;\"><span style=\"outline: 0px; max-width: 100%; visibility: visible; font-size: 16px; box-sizing: border-box !important; overflow-wrap: break-word !important;\"><strong style=\"outline: 0px; max-width: 100%; visibility: visible; box-sizing: border-box !important; overflow-wrap: break-word !important;\">\u4e09\u3001pool\u4e2d\u7684\u4e3b\u8282\u70b9master\u5d29\u6e83\u6389\u4e4b\u540e\uff0cxencenter\u65e0\u6cd5\u8fde\u63a5pool\u4e0b\u7684\u6240\u6709xenserver\u4e3b\u673a\uff1f<\/strong><\/span><br \/>\n\u6267\u884c\u5982\u4e0b\u547d\u4ee4\uff1a#pool-emergency-transition-to-master<br \/>\n\u6307\u793a XenServer \u6210\u5458\u4e3b\u673a\u6210\u4e3a\u6c60\u4e3b\u8282\u70b9\u3002\u4ec5\u5728 XenServer \u4e3b\u673a\u8f6c\u6362\u5230\u7d27\u6025\u6a21\u5f0f\u540e\u624d\u63a5\u53d7\u6b64\u547d\u4ee4\u3002\u8fdb\u5165\u7d27\u6025\u6a21\u5f0f\u610f\u5473\u7740\u8be5\u6210\u5458\u4e3b\u673a\u6240\u5728\u7684\u6c60\u4e2d\u7684\u4e3b\u8282\u70b9\u5df2\u4ece\u7f51\u7edc\u4e2d\u6d88\u5931\uff0c\u7ecf\u8fc7\u82e5\u5e72\u6b21\u91cd\u8bd5\u4ecd\u65e0\u6cd5\u8fde\u63a5\u3002<br \/>\n#xe pool-recover-slaves \u8fd9\u4e9b\u6210\u5458\u6b64\u65f6\u5c06\u6307\u5411\u65b0\u4e3b\u8282\u70b9<br \/>\n\u5c06\u6210\u5458 XenServer \u4e3b\u673a\u8f6c\u6362\u4e3a\u4e3b\u8282\u70b9\u540e\uff0c\u60a8\u8fd8\u5e94\u68c0\u67e5\u9ed8\u8ba4\u6c60\u5b58\u50a8\u5e93\u662f\u5426\u8bbe\u7f6e\u4e86\u9002\u5f53\u7684\u503c\u3002\u901a\u8fc7\u4f7f\u7528 xe pool-param-list \u547d\u4ee4<br \/>\n\u5e76\u9a8c\u8bc1 default-SR \u53c2\u6570\u662f\u5426\u6307\u5411\u6709\u6548\u5b58\u50a8\u5e93\uff0c\u53ef\u5b9e\u73b0\u6b64\u64cd\u4f5c<\/p>\n<p style=\"color: #111111; font-family: 'PingFang SC', 'Microsoft YaHei', 'Helvetica Neue', Helvetica, Arial, sans-serif; margin: 10px auto; font-size: 13px; text-align: start; white-space: normal; background-color: #ffffff;\"><span style=\"outline: 0px; max-width: 100%; visibility: visible; font-size: 16px; box-sizing: border-box !important; overflow-wrap: break-word !important;\"><strong style=\"outline: 0px; max-width: 100%; visibility: visible; box-sizing: border-box !important; overflow-wrap: break-word !important;\">\u56db\u3001xencenter\u4e2d\u4e0d\u80fd\u663e\u793a CPU\uff0c\u5185\u5b58\uff0c\u786c\u76d8\u4fe1\u606f\uff1f<\/strong><\/span><br \/>\n\u5728\u52a0\u5165POOL\u65f6\uff0c\u8981\u4fdd\u8bc1xenserver\u7684\u7cfb\u7edf\u65f6\u95f4\u548cmaster\u540c\u6b65\u6216\u8005\u6bd4\u5b83\u5feb\u4e00\u70b9\uff0c\u5373\u80fd\u663e\u793a\u786c\u4ef6\u4fe1\u606f<\/p>\n<p style=\"color: #111111; font-family: 'PingFang SC', 'Microsoft YaHei', 'Helvetica Neue', Helvetica, Arial, sans-serif; margin: 10px auto; font-size: 13px; text-align: start; white-space: normal; background-color: #ffffff;\"><span style=\"outline: 0px; max-width: 100%; visibility: visible; font-size: 16px; box-sizing: border-box !important; overflow-wrap: break-word !important;\"><strong style=\"outline: 0px; max-width: 100%; visibility: visible; box-sizing: border-box !important; overflow-wrap: break-word !important;\">\u4e94\u3001Redhat Linux 5.6 \u65e0\u6cd5\u5b89\u88c5xs-tools\uff1f<\/strong><\/span><br \/>\n\u82e5\u5efa\u865a\u673a\u9009\u6a21\u677f\u65f6\u91c7\u7528Other media disc\u53ef\u80fd\u4f1a\u51fa\u73b0\u6b64\u95ee\u9898\uff0c\u5efa\u8bae\u91c7\u7528\u81ea\u5e26\u6a21\u677f\u8fdb\u884c\u521b\u5efa\u3002\u65e0\u6a21\u677f\u53ef\u9009\u65f6\u624d\u7528\u8111Other media disc\u9009\u9879<br \/>\n\u516d\u3001\u5220\u9664\u65e0\u6cd5\u5173\u95ed\u7684\u865a\u673a\uff1f<br \/>\n1.xe vm-list #\u67e5\u770b\u9700\u8981\u64cd\u4f5c\u7684\u865a\u62df\u673auuid<br \/>\n2.xe vm-reset-powerstate uuid=60207d23-979e-ef86-2ede-455bf3504eee force=true #\u91cd\u7f6e\u7535\u6e90\u72b6\u6001<br \/>\n3.xe vm-destroy uuid=60207d23-979e-ef86-2ede-455bf3504eee #\u5220\u9664\u5bf9\u5e94\u865a\u62df\u673a<\/p>\n<section style=\"outline: 0px; max-width: 100%; color: #222222; white-space: normal; font-family: CourierNewPS-ItalicMT; letter-spacing: 3px; line-height: 2em; box-sizing: border-box !important; overflow-wrap: break-word !important;\">\n<section style=\"outline: 0px; max-width: 100%; line-height: 2em; box-sizing: border-box !important; overflow-wrap: break-word !important;\">\n<section style=\"outline: 0px; max-width: 100%; line-height: 2em; box-sizing: border-box !important; overflow-wrap: break-word !important;\">\n<h3 style=\"margin-top: 24px; outline: 0px; max-width: 100%; letter-spacing: 0.544px; font-family: -apple-system, BlinkMacSystemFont, 'Helvetica Neue', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei UI', 'Microsoft YaHei', Arial, sans-serif; background-color: #ffffff; visibility: visible; box-sizing: border-box !important; overflow-wrap: break-word !important;\"><span style=\"outline: 0px; max-width: 100%; font-size: 17px; visibility: visible; box-sizing: border-box !important; overflow-wrap: break-word !important;\"><strong style=\"outline: 0px; max-width: 100%; visibility: visible; box-sizing: border-box !important; overflow-wrap: break-word !important;\">\u4e5d\u3001\u603b\u7ed3<\/strong><\/span><\/h3>\n<p style=\"margin-top: 24px; outline: 0px; max-width: 100%; text-indent: 2em; box-sizing: border-box !important; overflow-wrap: break-word !important;\"><span style=\"outline: 0px; max-width: 100%; visibility: visible; box-sizing: border-box !important; overflow-wrap: break-word !important;\"><strong style=\"outline: 0px; max-width: 100%; visibility: visible; box-sizing: border-box !important; overflow-wrap: break-word !important;\"><span style=\"outline: 0px; max-width: 100%; font-family: -apple-system, BlinkMacSystemFont, 'Helvetica Neue', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei UI', 'Microsoft YaHei', Arial, sans-serif; font-weight: 400; letter-spacing: 0.544px; color: #000000; visibility: visible; font-size: 14px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">\u8bf7\u5148\u5728\u6d4b\u8bd5\u73af\u5883\u6d4b\u8bd5\uff0c\u5728\u8fdb\u884c\u751f\u4ea7\u3002<\/span><\/strong><\/span><\/p>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>\u4e00\u3001\u7b80\u4ecb \u8fd1\u671f\u9879\u76ee\u4e2d\u9047\u5230\u5f88\u591aCitrix Xenserver\u95ee\u9898\uff0c \u4e0b\u9762\u7f57\u5217\u4e00\u4e9b\u5e38\u7528\u547d\u4ee4\u3002 \u4e8c\u3001\u76d1\u63a7\u68c0\u67e5\u7c7b x [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[20,4],"tags":[],"class_list":["post-11031","post","type-post","status-publish","format-standard","hentry","category-citrix","category-virtual"],"_links":{"self":[{"href":"https:\/\/www.xh86.me\/index.php?rest_route=\/wp\/v2\/posts\/11031","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.xh86.me\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.xh86.me\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.xh86.me\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.xh86.me\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=11031"}],"version-history":[{"count":1,"href":"https:\/\/www.xh86.me\/index.php?rest_route=\/wp\/v2\/posts\/11031\/revisions"}],"predecessor-version":[{"id":11228,"href":"https:\/\/www.xh86.me\/index.php?rest_route=\/wp\/v2\/posts\/11031\/revisions\/11228"}],"wp:attachment":[{"href":"https:\/\/www.xh86.me\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=11031"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.xh86.me\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=11031"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.xh86.me\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=11031"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}