{"id":611,"date":"2021-10-25T04:08:00","date_gmt":"2021-10-25T04:08:00","guid":{"rendered":"https:\/\/262235.xyz\/?p=611"},"modified":"2021-10-25T04:08:00","modified_gmt":"2021-10-25T04:08:00","slug":"611","status":"publish","type":"post","link":"https:\/\/lyvba.com\/index.php\/2021\/10\/25\/611\/","title":{"rendered":"PVE \u4f7f\u7528\u4e91\u6620\u50cf\u5b89\u88c5 Debian 11"},"content":{"rendered":"<p><img decoding=\"async\" src=\"https:\/\/lyvba.com\/wp-content\/uploads\/2021\/10\/2595710115.webp\" alt=\"debian.png_new.webp\" title=\"debian.png_new.webp\"><\/p>\n<h2>\u83b7\u53d6 Debian \u8bbf\u95ee <a href=\"https:\/\/www.debian.org\/distrib\/\">https:\/\/www.debian.org\/distrib\/<\/a><\/h2>\n<p>Debian \u662f\u901a\u8fc7\u4e92\u8054\u7f51\u81ea\u7531\u53d1\u884c\u7684\u3002\u672c\u9875\u9762\u63d0\u4f9b\u4e86\u4ee5\u4e0b\u51e0\u79cd\u5b89\u88c5 Debian \u7a33\u5b9a\u7248\u7684\u65b9\u5f0f\u3002<\/p>\n<h2><a href=\"https:\/\/cloud.debian.org\/images\/cloud\/\">\u4f7f\u7528 Debian \u4e91\u6620\u50cf<\/a><\/h2>\n<ul>\n<li><a href=\"https:\/\/cloud.debian.org\/images\/cloud\/\">https:\/\/cloud.debian.org\/images\/cloud\/<\/a><\/li>\n<li>\u4e0b\u8f7d\u8fd9\u4e2a\u955c\u50cf\uff0c\u6216\u8005\u6d4f\u89c8\u76ee\u5f55\uff0c\u9009\u62e9\u66f4\u5408\u9002\u955c\u50cf\uff0c\u5728PVE\u5bbf\u4e3b\u673a\uff0c\u4f7f\u7528wget\u4e0b\u8f7d<\/li>\n<li>azure\uff1a\u9488\u5bf9 Microsoft Azure \u73af\u5883\u8fdb\u884c\u4e86\u4f18\u5316<\/li>\n<li>ec2\uff1a\u9488\u5bf9 Amazon EC2 \u8fdb\u884c\u4e86\u4f18\u5316<\/li>\n<li>generic\uff1a\u5e94\u8be5\u5728\u4efb\u4f55\u4f7f\u7528 cloud-init \u7684\u73af\u5883\u4e2d\u8fd0\u884c\uff0c\u4f8b\u5982 OpenStack\u3001DigitalOcean \u548c\u88f8\u673a\u3002<\/li>\n<li>genericcloud\uff1a\u7c7b\u4f3c\u4e8e\u901a\u7528\u3002\u5e94\u8be5\u5728\u4efb\u4f55\u865a\u62df\u5316\u73af\u5883\u4e2d\u8fd0\u884c\u3002\u901a\u8fc7\u6392\u9664\u7269\u7406\u786c\u4ef6\u7684\u9a71\u52a8\u7a0b\u5e8f\u800c\u5c0f\u4e8e\u201c\u901a\u7528\u201d\u3002<\/li>\n<li>nocloud\uff1a\u4e3b\u8981\u7528\u4e8e\u6d4b\u8bd5\u6784\u5efa\u8fc7\u7a0b\u672c\u8eab\u3002\u6ca1\u6709\u5b89\u88c5 cloud-init\uff0c\u800c\u662f\u5141\u8bb8\u6ca1\u6709\u5bc6\u7801\u7684 root \u767b\u5f55\u3002<\/li>\n<\/ul>\n<h2>\u9009\u62e9 nocloud\uff1a\u4e3b\u8981\u7528\u4e8e\u6d4b\u8bd5\u6784\u5efa\u8fc7\u7a0b\u672c\u8eab\u3002\u6ca1\u6709\u5b89\u88c5 cloud-init\uff0c\u800c\u662f\u5141\u8bb8\u6ca1\u6709\u5bc6\u7801\u7684 root \u767b\u5f55\u3002<\/h2>\n<pre><code>wget https:\/\/cloud.debian.org\/images\/cloud\/bullseye\/20211011-792\/\\r\ndebian-11-nocloud-amd64-20211011-792.qcow2<\/code><\/pre>\n<h2>PVE \u5efa\u7acb \u4e00\u4e2a linux \u865a\u62df\u673a\uff0c\u540d\u79f0 Debian ; VMID 104 \uff0c\u786c\u76d8\u5206\u79bb\u548c\u5220\u9664<\/h2>\n<pre><code>$ qm list\nVMID NAME                 STATUS     MEM(MB)    BOOTDISK(GB) PID\n104 Debian               stopped    1024               0.00 0 <\/code><\/pre>\n<h2>PVE \u4f7f\u7528 <code>qm importdisk<\/code> \u547d\u4ee4\u8f6c\u6362\u5bfc\u5165\u786c\u76d8\u955c\u50cf<\/h2>\n<pre><code>$ qm importdisk 104  debian-11-nocloud-amd64-20211011-792.qcow2 local\n\nimporting disk 'debian-11-nocloud-amd64-20211011-792.qcow2' to VM 104 ...\nFormatting '\/var\/lib\/vz\/images\/104\/vm-104-disk-0.raw', fmt=raw size=2147483648\n...\ntransferred 2.0 GiB of 2.0 GiB (100.00%)\nSuccessfully imported disk as 'unused0:local:104\/vm-104-disk-0.raw'<\/code><\/pre>\n<h2>PVE \u7f16\u8f91\u6302\u8f7d\u786c\u76d8-\u8c03\u6574\u78c1\u76d8\u589e\u91cf8G-\u4fee\u6539\u786c\u76d8\u4f18\u5148\u542f\u52a8<\/h2>\n<p><img decoding=\"async\" src=\"https:\/\/lyvba.com\/wp-content\/uploads\/2021\/10\/3057180563.png\" alt=\"hd.png\" title=\"hd.png\"><\/p>\n<h2>\u7531\u4e8e\u9009\u62e9 noclou \u5141\u8bb8\u6ca1\u6709\u5bc6\u7801\u7684 root \u767b\u5f55\uff0cOpenSSH-SERVER \u4e0d\u80fd\u542f\u52a8\u7684\u3002<\/h2>\n<pre><code>passwd  # \u5148\u4fee\u6539\u5bc6\u7801\uff0c\u4e0d\u4fee\u6539\u5e94\u8be5\u4e5f\u6ca1\u4e8b\nsystemctl status sshd<\/code><\/pre>\n<h2>\u542f\u52a8sshd\u5931\u8d25\uff0c\u62a5\u9519\uff1aFailed to start OpenBSD Secure Shell server<\/h2>\n<pre><code>sshd -T      # \u4f1a\u63d0\u793a\u4f60\u9519\u8bef\u7684\u539f\u56e0\uff0c\u6ca1\u6709\u53ef\u7528\u7684\u4e3b\u673a\u5bc6\u94a5\u3002\nsshd: no hostkeys available -- exiting.\n\nssh-keygen -A   # \u4f7f\u7528\u8fd9\u4e2a\u547d\u4ee4 \u6dfb\u52a0\u4e3b\u673a\u5bc6\u94a5\nsystemctl start sshd<\/code><\/pre>\n<p><img decoding=\"async\" src=\"https:\/\/lyvba.com\/wp-content\/uploads\/2021\/10\/3226225641.png\" alt=\"ssh.png\" title=\"ssh.png\"><\/p>\n<p><img decoding=\"async\" src=\"https:\/\/lyvba.com\/wp-content\/uploads\/2021\/10\/203943684.png\" alt=\"ssh.png\" title=\"ssh.png\"><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u83b7\u53d6 Debian \u8bbf\u95ee https:\/\/www.debian.org\/distrib\/ Debia [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8,6],"tags":[23,60,17],"class_list":["post-611","post","type-post","status-publish","format-standard","hentry","category-linux","category-vps","tag-linux","tag-pve","tag-vps"],"_links":{"self":[{"href":"https:\/\/lyvba.com\/index.php\/wp-json\/wp\/v2\/posts\/611","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lyvba.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lyvba.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lyvba.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lyvba.com\/index.php\/wp-json\/wp\/v2\/comments?post=611"}],"version-history":[{"count":0,"href":"https:\/\/lyvba.com\/index.php\/wp-json\/wp\/v2\/posts\/611\/revisions"}],"wp:attachment":[{"href":"https:\/\/lyvba.com\/index.php\/wp-json\/wp\/v2\/media?parent=611"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lyvba.com\/index.php\/wp-json\/wp\/v2\/categories?post=611"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lyvba.com\/index.php\/wp-json\/wp\/v2\/tags?post=611"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}