{"id":733,"date":"2024-02-21T16:16:52","date_gmt":"2024-02-21T08:16:52","guid":{"rendered":"http:\/\/madapapa.com\/wordpress\/?p=733"},"modified":"2024-02-22T18:27:42","modified_gmt":"2024-02-22T10:27:42","slug":"zhong-xin-chuang-jiangcp-instance-bing-an-zhuang","status":"publish","type":"post","link":"http:\/\/madapapa.com\/wordpress\/?p=733","title":{"rendered":"\u91cd\u65b0\u521b\u5efaGCP instance\u5e76\u5b89\u88c5"},"content":{"rendered":"<h2><a id=\"%E5%A4%AD%E6%8A%98%E7%9A%84gcp-instance\" class=\"anchor\" aria-hidden=\"true\"><span class=\"octicon octicon-link\"><\/span><\/a>\u592d\u6298\u7684GCP instance<\/h2>\n<ul>\n<li>\u56e0\u4e3a\u4e0d\u77e5\u9053\u4ec0\u4e48\u539f\u56e0\uff0c\u6211\u5728google cloud\u4e0a\u7684\u7b2c\u4e00\u4e2ainstance\uff0820240215\uff0c\u6625\u8282\u671f\u95f4\u7533\u8bf7\uff09\u88ab\u505c\u673a\u4e86\uff0c\u65e0\u6cd5\u91cd\u542f\uff0c\u5b98\u65b9\u7ed9\u51fa\u7684\u8bf4\u660e\u5982\u4e0b\uff1a<img decoding=\"async\" src=\"http:\/\/madapapa.com\/wordpress\/wp-content\/uploads\/2024\/02\/17085887769701.jpg\" alt=\"\" \/><\/li>\n<li>\u5206\u6790:\u662f\u5728\u8bbe\u7f6evpn network\u7684firewall rule\u65f6\uff0c\u6309\u7167eve\u5b89\u88c5\u6587\u6863\u8981\u6c42\uff0c\u65b0\u589e\u4e86\u5b9a\u5236\u7684egress\u6d41\u91cf\uff08outband\uff09\uff0c\u5176\u4e2dtcp\u534f\u8bae\u662f\u5168\u90e8\u7aef\u53e3\uff080-65535\uff09\uff0c\u6765\u6e90ip\u662f\u6240\u6709\u8303\u56f4\uff08ipv4\uff0c0.0.0.0\/0\uff09\uff0c\u6240\u4ee5\u9020\u6210instance\u8fd0\u884c\u6ca1\u4e24\u5929\uff0c\u5c31\u88ab\u5f3a\u5236\u505c\u673a\u3002<\/li>\n<li>\u6ca1\u529e\u6cd5\uff0c\u6211\u4e00\u65b9\u9762\u53d1\u90ae\u4ef6\u7ed9google cloud\u7684support\u53d1\u4e86\u90ae\u4ef6\uff0c\u540c\u65f6\u4e5f\u601d\u8003\u89e3\u51b3\u65b9\u6848\u3002\u90ae\u4ef6\u5f88\u5feb\u6709\u56de\u590d<img decoding=\"async\" src=\"http:\/\/madapapa.com\/wordpress\/wp-content\/uploads\/2024\/02\/17085886864908.jpg\" alt=\"\" \/><br \/>\n\u8fd9\u5e76\u6ca1\u6709\u4ec0\u4e48\u5375\u7528\uff0c\u6211\u9664\u4e86\u793c\u8c8c\u611f\u8c22\u5916\uff0c\u6ca1\u6709\u5176\u4ed6\u529e\u6cd5\u3002<\/li>\n<li>\u8fd8\u597d\u8fd9\u662f\u4e91\u554a\uff0c\u76f4\u63a5\u5220\u9664instance\uff0c\u91cd\u65b0\u5b89\u88c5\u90e8\u7f72\uff08\u53ef\u601c\u77ed\u77ed\u51e0\u5929\uff0c85\u52a0\u5e01\u5c31\u6ca1\u6709\u4e86\uff09<\/li>\n<\/ul>\n<h2><a id=\"%E9%87%8D%E6%96%B0%E5%88%9B%E5%BB%BAgcp%E7%9A%84instance\" class=\"anchor\" aria-hidden=\"true\"><span class=\"octicon octicon-link\"><\/span><\/a>\u91cd\u65b0\u521b\u5efaGCP\u7684instance<\/h2>\n<ul>\n<li>\u6309\u7167eve\u8981\u6c42\uff0c\u91cd\u65b0\u521b\u5efa\u5177\u6709vmx\u529f\u80fd\u7684\u865a\u62df\u673a\uff0c\u4e5f\u5c31\u662fnested\u5957\u5a03\u865a\u62df\u673a\uff1b<\/li>\n<li>\u8fd9\u6b21\u7279\u5730\u9009\u62e9\u4e86vm\u662fspot vm\uff0c\u662f\u6240\u6709vm\u4e2d\u7684\u4e10\u4e2d\u4e10\uff0c\u4ef7\u683c\u636e\u8bf4off 60%\uff0c\u4ee3\u4ef7\u662f\u968f\u65f6\u4f1a\u88ab\u505c\u673a\uff0c\u4e0b\u9762\u662f\u4ecb\u7ecd<\/li>\n<\/ul>\n<pre><code class=\"language-plain_text\">This page describes Spot VMs: virtual machine (VM) instances that are excess Compute Engine capacity. Spot VMs have significant discounts, but Compute Engine might preemptively stop or delete (preempt) Spot VMs to reclaim the capacity at any time. Spot VMs are the latest version of preemptible VMs.\n\nThe provisioning model of a VM affects its discounts and availability; Compute Engine VMs can use either the standard provisioning model (standard VMs) (default) or the spot provisioning model (Spot VMs). In contrast to standard VMs, Spot VMs are available at much lower prices but have lower availability because they are subject to preemption. Use Spot VMs to reduce costs for fault-tolerant workloads.\n\nTo learn more about Compute Engine VMs in general, read the Virtual machine instances documentation. To learn how to create Spot VMs, read Create and use Spot VMs.\n\nWhat are Spot VMs?\n\nSpot VMs are available at much lower prices\u201460-91% discounts for most machine types and GPUs as well as smaller discounts for local SSDs and A3 VMs\u2014compared to the on-demand price for standard VMs. However, Compute Engine might preempt Spot VMs at any time, such as when it needs the resources for other tasks. At this uncertain preemption time, Compute Engine either stops (default) or deletes your Spot VMs depending on your specified termination action for each Spot VM. Spot VMs are excess Compute Engine capacity, so their availability varies based on Compute Engine usage. Spot VMs do not have a minimum or maximum runtime unless you specifically limit the runtime.\n\nIf your workloads are fault-tolerant and can withstand possible VM preemption, Spot VMs can reduce your Compute Engine costs significantly. For example, batch processing jobs can run on Spot VMs. If some of those VMs stop during processing, the job slows but does not completely stop. Spot VMs complete your batch processing tasks without placing additional load on your existing VMs and without requiring you to pay full price for additional standard VMs.\n\n<\/code><\/pre>\n<ul>\n<li>\n<p>\u6211\u4eec\u53ef\u4ee5\u770b\u5230\uff0c\u5728spot\u6a21\u5f0f\u4e0b\uff0cgoogle vm\u53ef\u4ee5\u4fbf\u5b9c\u52300.01\u7f8e\u5143\u6bcf\u5c0f\u65f6<br \/>\n*<img decoding=\"async\" src=\"http:\/\/madapapa.com\/wordpress\/wp-content\/uploads\/2024\/02\/17085913599050.jpg\" alt=\"\" \/><\/p>\n<\/li>\n<li>\n<p>\u4e0b\u9762\u662f\u6211\u7684\u9009\u62e9<br \/>\n<img decoding=\"async\" src=\"http:\/\/madapapa.com\/wordpress\/wp-content\/uploads\/2024\/02\/17085909360971.jpg\" alt=\"\" \/><\/p>\n<\/li>\n<li>\n<p>\u8fd8\u53ef\u4ee5\u66f4\u52a0\u4e27\u5fc3\u75c5\u72c2\uff0c\u56e0\u4e3aspot\u505c\u673a\u540e\u662f\u4e0d\u6536\u8d39\u7684\uff08\u786c\u76d8\u548c\u9759\u6001ip\u9700\u8981\u6536\u8d39\uff09\uff0c\u90a3\u4e48\u6211\u4eec\u518d\u6765\u4e00\u4e2a\u5b9a\u671f\u505c\u673a\uff0c\u4e00\u5207\u5c31\u5b8c\u7f8e\u4e86\u3002<br \/>\n\u5f53\u5b8c\u6210\u5b9a\u671f\u8ba1\u5212\u6765\u542f\u505c\u673a\u5668\u65f6\uff0c\u4f1a\u51fa\u73b0\u5982\u4e0b\u544a\u8b66<\/p>\n<\/li>\n<\/ul>\n<pre><code class=\"language-plain_text\">Compute Engine System service account service-111462968063@compute-system.iam.gserviceaccount.com needs to have [compute.instances.start] permissions applied in order to perform this operation.\n<\/code><\/pre>\n<p>\u53c2\u8003\u4e0b\u9762\u7684\u65b9\u6848\u5c31\u80fd\u89e3\u51b3<br \/>\nSolution:<\/p>\n<ul>\n<li>Login to the Google Cloud Console<\/li>\n<li>To to IAM &amp; Admin<\/li>\n<li>Select IAM in the left panel<\/li>\n<li>Click the box Include Google-provided role grants on the right side of the window. This enables showing Google-managed service accounts.<\/li>\n<li>Locate the service account. Press CTRL-F5 to open a search box. Enter the text compute-system.<\/li>\n<li>Click the pencil icon to edit the service account.<\/li>\n<li>Click ADD ANOTHER ROLE<\/li>\n<li>In the role filter enter Compute. Select Compute Instance Admin (v1).<\/li>\n<li>Click SAVE<\/li>\n<\/ul>\n<p>Wait a few minutes before trying to use the new permissions.<br \/>\n<img decoding=\"async\" src=\"http:\/\/madapapa.com\/wordpress\/wp-content\/uploads\/2024\/02\/17085935291406.jpg\" alt=\"\" \/><\/p>\n<ul>\n<li>\u5b8c\u6210\u540e\u4e0a\u4f20\u4ea4\u6362\u673a\u7684os\u6587\u4ef6\uff08\u89c1\u4e0b\u9762\u7ae0\u8282\uff09<\/li>\n<li>\u5b89\u88c5eve\uff0c\u5e76\u542f\u52a8<\/li>\n<li>eve\u754c\u9762\u542f\u52a8\u540e\uff0c\u6dfb\u52a0node\uff0c\u542f\u52a8switch\u90fd\u6b63\u5e38\uff0c\u4f46\u662ftelnet\u65e0\u6cd5\u5de5\u4f5c\uff08ssh\u6b63\u5e38\uff09\n<ul>\n<li>firewall rule\u6dfb\u52a0ingress\uff0ctcp 23\uff0c\u65e0\u6548<\/li>\n<li>firewall rule\u6dfb\u52a0egress\uff0ctcp 23\uff0c\u65e0\u6548<\/li>\n<li>firewall rule\u6dfb\u52a0ingress\uff0ctcp 0-65535\uff0cip 0.0.0.0\/0,telnet\u6210\u529f\uff01<br \/>\n<img decoding=\"async\" src=\"http:\/\/madapapa.com\/wordpress\/wp-content\/uploads\/2024\/02\/17085907265910.jpg\" alt=\"\" \/><\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<h2><a id=\"%E4%B8%8A%E4%BC%A0%E4%BA%A4%E6%8D%A2%E6%9C%BA%E5%92%8C%E8%B7%AF%E7%94%B1%E5%99%A8%E7%9A%84%E7%B3%BB%E7%BB%9F%E6%96%87%E4%BB%B6\" class=\"anchor\" aria-hidden=\"true\"><span class=\"octicon octicon-link\"><\/span><\/a>\u4e0a\u4f20\u4ea4\u6362\u673a\u548c\u8def\u7531\u5668\u7684\u7cfb\u7edf\u6587\u4ef6<\/h2>\n<ol>\n<li>\n<p>Cisco\u7684iol\/ios\u955c\u50cf\u6587\u4ef6<\/p>\n<ol>\n<li>\u628aiol\u6587\u4ef6\uff0c\u540e\u7f00\u662fbin\uff0c\u4e0a\u4f20\u5230\u76ee\u5f55\uff1a\/opt\/unetlab\/addons\/iol\/bin\/<\/li>\n<li>\u4f7f\u7528\u5982\u4e0b\u547d\u4ee4\u6765\u4fee\u6539\u6743\u9650(\u5207\u8bb0)<\/li>\n<\/ol>\n<pre><code class=\"language-plain_text\">\/opt\/unetlab\/wrappers\/unl_wrapper -a fixpermissions\n<\/code><\/pre>\n<ol start=\"3\">\n<li>\u8fd0\u884c\u6388\u6743\u6587\u4ef6No need to fix the permission of the license file as we will run this file using the python program. Run command<\/li>\n<\/ol>\n<pre><code class=\"language-plain_text\">python3     CiscoIOUKeygen3f.py\n<\/code><\/pre>\n<ol start=\"4\">\n<li>\u4f7f\u7528\u5982\u4e0b\u547d\u4ee4\u6765\u6d4b\u8bd5iou\/ios\u6587\u4ef6\u662f\u5426\u5b89\u88c5\u6210\u529f<\/li>\n<\/ol>\n<pre><code class=\"language-plain_text\">cd \/opt\/unetlab\/addons\/iol\/bin\ntouch NETMAP\nLD_LIBRARY_PATH=\/opt\/unetlab\/addons\/iol\/lib \/opt\/unetlab\/addons\/iol\/bin\/&lt;iosname.bin&gt; 1\n\n***************************************************************\nIOS On Unix - Cisco Systems confidential, internal use only\nUnder no circumstances is this software to be provided to any\nnon Cisco staff or customers.  To do so is likely to result\nin disciplinary action. Please refer to the IOU Usage policy at\nwwwin-iou.cisco.com for more information.\n***************************************************************\n\n              Restricted Rights Legend\n\nUse, duplication, or disclosure by the Government is\nsubject to restrictions as set forth in subparagraph\n(c) of the Commercial Computer Software - Restricted\nRights clause at FAR sec. 52.227-19 and subparagraph\n(c) (1) (ii) of the Rights in Technical Data and Computer\nSoftware clause at DFARS sec. 252.227-7013.\n\n           cisco Systems, Inc.\n           170 West Tasman Drive\n           San Jose, California 95134-1706\n<\/code><\/pre>\n<\/li>\n<li>\n<p>Cisco\u7684\u5176\u4ed6\u955c\u50cf\u6587\u4ef6<br \/>\n1.<\/p>\n<\/li>\n<li>\n<p>\u534e\u4e3a\u7684\u955c\u50cf\u6587\u4ef6<br \/>\n1.<\/p>\n<\/li>\n<li>\n<p>\u534e\u4e09\u7684\u955c\u50cf\u6587\u4ef6<br \/>\n1.<\/p>\n<\/li>\n<\/ol>\n","protected":false},"excerpt":{"rendered":"<p>\u592d\u6298\u7684GCP instance \u56e0\u4e3a\u4e0d\u77e5\u9053\u4ec0\u4e48\u539f\u56e0\uff0c\u6211\u5728google cloud\u4e0a\u7684\u7b2c\u4e00\u4e2ainstance\uff0820240215\uff0c\u6625\u8282\u671f\u95f4\u7533\u8bf7\uff09\u88ab\u505c\u673a\u4e86\uff0c\u65e0\u6cd5\u91cd\u542f\uff0c\u5b98\u65b9\u7ed9\u51fa\u7684\u8bf4\u660e\u5982\u4e0b\uff1a \u5206\u6790:\u662f\u5728\u8bbe\u7f6evpn network\u7684firewall rule\u65f6\uff0c\u6309\u7167eve\u5b89\u88c5\u6587\u6863\u8981\u6c42\uff0c\u65b0\u589e\u4e86\u5b9a\u5236\u7684egress\u6d41\u91cf\uff08outband\uff09\uff0c\u5176\u4e2dtcp\u534f\u8bae\u662f\u5168\u90e8\u7aef\u53e3\uff080-65535\uff09\uff0c\u6765\u6e90ip\u662f\u6240\u6709\u8303\u56f4\uff08ipv4\uff0c0.0.0.0\/0\uff09\uff0c\u6240\u4ee5\u9020\u6210instance\u8fd0\u884c\u6ca1\u4e24\u5929\uff0c\u5c31\u88ab\u5f3a\u5236\u505c\u673a\u3002 \u6ca1\u529e\u6cd5\uff0c\u6211\u4e00\u65b9\u9762\u53d1\u90ae\u4ef6\u7ed9google cloud\u7684support\u53d1\u4e86\u90ae\u4ef6\uff0c\u540c\u65f6\u4e5f\u601d\u8003\u89e3\u51b3\u65b9\u6848\u3002\u90ae\u4ef6\u5f88\u5feb\u6709\u56de\u590d \u8fd9\u5e76\u6ca1\u6709\u4ec0\u4e48\u5375\u7528\uff0c\u6211\u9664\u4e86\u793c\u8c8c\u611f\u8c22\u5916\uff0c\u6ca1\u6709\u5176\u4ed6\u529e\u6cd5\u3002 \u8fd8\u597d\u8fd9\u662f\u4e91\u554a\uff0c\u76f4\u63a5\u5220\u9664instance\uff0c\u91cd\u65b0\u5b89\u88c5\u90e8\u7f72\uff08\u53ef\u601c\u77ed\u77ed\u51e0\u5929\uff0c85\u52a0\u5e01\u5c31\u6ca1\u6709\u4e86\uff09 \u91cd\u65b0\u521b\u5efaGCP\u7684instance \u6309\u7167eve\u8981\u6c42\uff0c\u91cd\u65b0\u521b\u5efa\u5177\u6709vmx\u529f\u80fd\u7684\u865a\u62df\u673a\uff0c\u4e5f\u5c31\u662fnested\u5957\u5a03\u865a\u62df\u673a\uff1b \u8fd9\u6b21\u7279\u5730\u9009\u62e9\u4e86vm\u662fspot vm\uff0c\u662f\u6240\u6709vm\u4e2d\u7684\u4e10\u4e2d\u4e10\uff0c\u4ef7\u683c\u636e\u8bf4off 60%\uff0c\u4ee3\u4ef7\u662f\u968f\u65f6\u4f1a\u88ab\u505c\u673a\uff0c\u4e0b\u9762\u662f\u4ecb\u7ecd This page describes Spot VMs: virtual machine (VM) instances that are excess Compute Engine capacity. Spot VMs have significant discounts, but Compute Engine might preemptively stop or delete (preempt) Spot VMs to reclaim the capacity at any time. Spot &hellip; <a href=\"http:\/\/madapapa.com\/wordpress\/?p=733\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">\u91cd\u65b0\u521b\u5efaGCP instance\u5e76\u5b89\u88c5<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_bbp_topic_count":0,"_bbp_reply_count":0,"_bbp_total_topic_count":0,"_bbp_total_reply_count":0,"_bbp_voice_count":0,"_bbp_anonymous_reply_count":0,"_bbp_topic_count_hidden":0,"_bbp_reply_count_hidden":0,"_bbp_forum_subforum_count":0,"footnotes":""},"categories":[46,5],"tags":[],"class_list":["post-733","post","type-post","status-publish","format-standard","hentry","category-apple-ios","category-linux"],"_links":{"self":[{"href":"http:\/\/madapapa.com\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/733","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/madapapa.com\/wordpress\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/madapapa.com\/wordpress\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/madapapa.com\/wordpress\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/madapapa.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=733"}],"version-history":[{"count":2,"href":"http:\/\/madapapa.com\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/733\/revisions"}],"predecessor-version":[{"id":744,"href":"http:\/\/madapapa.com\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/733\/revisions\/744"}],"wp:attachment":[{"href":"http:\/\/madapapa.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=733"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/madapapa.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=733"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/madapapa.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=733"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}