{"id":19465,"date":"2017-03-16T06:49:43","date_gmt":"2017-03-15T22:49:43","guid":{"rendered":"https:\/\/2blog.ilc.edu.tw\/25793\/2017\/03\/16\/proxmox-%e8%a4%87%e8%a3%bd-lxc-%e8%99%9b%e6%93%ac%e6%a9%9f%e5%99%a8%e4%be%86%e4%bd%bf%e7%94%a8\/"},"modified":"2021-03-18T17:24:57","modified_gmt":"2021-03-18T09:24:57","slug":"proxmox-%e8%a4%87%e8%a3%bd-lxc-%e8%99%9b%e6%93%ac%e6%a9%9f%e5%99%a8%e4%be%86%e4%bd%bf%e7%94%a8","status":"publish","type":"post","link":"https:\/\/2blog.ilc.edu.tw\/25793\/2017\/03\/16\/proxmox-%e8%a4%87%e8%a3%bd-lxc-%e8%99%9b%e6%93%ac%e6%a9%9f%e5%99%a8%e4%be%86%e4%bd%bf%e7%94%a8\/","title":{"rendered":"Proxmox &#8211; \u8907\u88fd LXC \u865b\u64ec\u6a5f\u5668\u4f86\u4f7f\u7528"},"content":{"rendered":"<p>1. \u5207\u63db\u76ee\u9304 <br \/># <span style=\"color: #ff0000\">cd \/VM\/images<\/span> <\/p>\n<p>2. \u5217\u51fa\u76ee\u9304\uff0c\u5176\u4e2d <br \/>\u00a0\u00a0\u00a0 100 \u662f CentOS 7 LXC <br \/>\u00a0\u00a0\u00a0 101 \u662f Ubuntu 16.04 LXC <br \/>\u00a0\u00a0\u00a0 102 \u662f FreeBSD kvm <br \/>#<span style=\"color: #ff0000\"> ls -l<\/span> <br \/><span style=\"color: #0000ff\">drwxr&#8212;&#8211; 2 root root 4096 Feb\u00a0 2 10:25 100\/<\/span> <br \/><span style=\"color: #0000ff\">drwxr&#8212;&#8211; 2 root root 4096 Feb\u00a0 2 10:56 101\/<\/span> <br \/><span style=\"color: #0000ff\">drwxr&#8212;&#8211; 2 root root 4096 Feb\u00a0 2 12:49 102\/<\/span> <br \/> <a id=\"res_3771935\" href=\"https:\/\/2blog.ilc.edu.tw\/wp-content\/uploads\/sites\/985\/25793\/25793-3771935.png\"> <img decoding=\"async\" src=\"https:\/\/2blog.ilc.edu.tw\/wp-content\/uploads\/sites\/985\/25793\/previews-med\/25793-3771935.png\" border=\"0\" alt=\"\" \/> <\/a> <br \/>[@more@]3. \u5efa\u7acb\u76ee\u9304 <br \/># <span style=\"color: #ff0000\">mkdir 103<\/span> <\/p>\n<p>4. \u8907\u88fd\u539f CentOS 7 LXC <br \/># <span style=\"color: #ff0000\">cp 100\/vm-100-disk-1.raw 103\/LXC-CentOS7-Test.raw<\/span> <\/p>\n<p>5. \u8907\u88fd\u8a2d\u5b9a\u6a94 <br \/># <span style=\"color: #ff0000\">cp \/etc\/pve\/lxc\/100.conf \/etc\/pve\/lxc\/103.conf<\/span> <\/p>\n<p>6. \u4fee\u6539\u8a2d\u5b9a\u6a94 <span style=\"color: #0000ff\">\/etc\/pve\/lxc\/103.conf<\/span> <br \/>\u5176\u4e2d\u4e00\u5b9a\u8981\u4fee\u6539\u7684\u6709 <span style=\"color: #0000ff\">hostanme<\/span> \/ <span style=\"color: #0000ff\">hwaddr<\/span> \/ <span style=\"color: #0000ff\">rootfs<\/span> <br \/># <span style=\"color: #ff0000\">cat \/etc\/pve\/lxc\/103.conf<\/span> <br \/><span style=\"color: #0000ff\">arch: amd64<\/span> <br \/><span style=\"color: #0000ff\">cores: 1<\/span> <br \/><span style=\"color: #ff0000\">hostname: CentOS7-Test<\/span> <br \/><span style=\"color: #0000ff\">memory: 512<\/span> <br \/><span style=\"color: #0000ff\">net0: name=eth0,bridge=vmbr0,gw=192.168.131.2,<span style=\"color: #ff0000\">hwaddr=DE:6F:EA:6B:9C:6B<\/span>,<span style=\"color: #ff0000\">ip=192.168.131.230\/24<\/span>,ip6=dhcp,type=veth<\/span> <br \/><span style=\"color: #0000ff\">onboot: 1<\/span> <br \/><span style=\"color: #0000ff\">ostype: centos<\/span> <br \/><span style=\"color: #ff0000\">rootfs: VM:103\/LXC-CentOS7-Test.raw,size=8G<\/span> <br \/><span style=\"color: #0000ff\">swap: 512<\/span><\/p>\n<p>7. \u53ef\u4ee5\u5728\u524d\u53f0\u627e\u5212\u65b0\u589e\u7684 LXC<br \/><a id=\"res_3771962\" href=\"https:\/\/2blog.ilc.edu.tw\/wp-content\/uploads\/sites\/985\/25793\/25793-3771962.png\"><img decoding=\"async\" src=\"https:\/\/2blog.ilc.edu.tw\/wp-content\/uploads\/sites\/985\/25793\/previews-med\/25793-3771962.png\" border=\"0\" alt=\"\" \/><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>1. \u5207\u63db\u76ee\u9304 # cd \/VM\/images 2. \u5217\u51fa\u76ee\u9304\uff0c\u5176\u4e2d \u00a0\u00a0\u00a0 100 \u662f CentOS 7 L &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/2blog.ilc.edu.tw\/25793\/2017\/03\/16\/proxmox-%e8%a4%87%e8%a3%bd-lxc-%e8%99%9b%e6%93%ac%e6%a9%9f%e5%99%a8%e4%be%86%e4%bd%bf%e7%94%a8\/\" class=\"more-link\">\u95b1\u8b80\u5168\u6587<span class=\"screen-reader-text\">\u3008Proxmox &#8211; \u8907\u88fd LXC \u865b\u64ec\u6a5f\u5668\u4f86\u4f7f\u7528\u3009<\/span><\/a><\/p>\n","protected":false},"author":55,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[191],"tags":[],"class_list":["post-19465","post","type-post","status-publish","format-standard","hentry","category-c-104943"],"meta_key":{"_pingme":["1"],"_encloseme":["1"],"lt_post_id":["685342"]},"_links":{"self":[{"href":"https:\/\/2blog.ilc.edu.tw\/25793\/wp-json\/wp\/v2\/posts\/19465"}],"collection":[{"href":"https:\/\/2blog.ilc.edu.tw\/25793\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/2blog.ilc.edu.tw\/25793\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/2blog.ilc.edu.tw\/25793\/wp-json\/wp\/v2\/users\/55"}],"replies":[{"embeddable":true,"href":"https:\/\/2blog.ilc.edu.tw\/25793\/wp-json\/wp\/v2\/comments?post=19465"}],"version-history":[{"count":1,"href":"https:\/\/2blog.ilc.edu.tw\/25793\/wp-json\/wp\/v2\/posts\/19465\/revisions"}],"predecessor-version":[{"id":20991,"href":"https:\/\/2blog.ilc.edu.tw\/25793\/wp-json\/wp\/v2\/posts\/19465\/revisions\/20991"}],"wp:attachment":[{"href":"https:\/\/2blog.ilc.edu.tw\/25793\/wp-json\/wp\/v2\/media?parent=19465"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/2blog.ilc.edu.tw\/25793\/wp-json\/wp\/v2\/categories?post=19465"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/2blog.ilc.edu.tw\/25793\/wp-json\/wp\/v2\/tags?post=19465"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}