{"id":250,"date":"2024-04-18T14:27:57","date_gmt":"2024-04-18T06:27:57","guid":{"rendered":"https:\/\/hjwzs.xyz\/?p=250"},"modified":"2024-04-18T14:27:57","modified_gmt":"2024-04-18T06:27:57","slug":"%e5%9c%a8-vmware-esxi-%e6%88%96%e8%80%85%e7%b1%bb%e4%bc%bc%e8%99%9a%e6%8b%9f%e6%9c%ba%e6%89%a9%e5%ae%b9-ubuntu-%e6%a0%b9%e7%9b%ae%e5%bd%95","status":"publish","type":"post","link":"https:\/\/hjwzs.xyz\/?p=250","title":{"rendered":"\u5728 VMWare ESXi \u6216\u8005\u7c7b\u4f3c\u865a\u62df\u673a\u6269\u5bb9 Ubuntu \u6839\u76ee\u5f55"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">\u6700\u8fd1\u4e0b\u8f7d\u7684\u5927\u6a21\u578b\u8d8a\u6765\u8d8a\u591a\uff0c\u786c\u76d8\u5df2\u7ecf\u625b\u4e0d\u4f4f\u4e86\uff0c\u76f4\u63a5\u5728 VMWare \u4e2d\u4fee\u6539\u786c\u76d8\u914d\u7f6e\u5c45\u7136\u6ca1\u6709\u751f\u6548\u3002\u67e5\u9605\u4e86\u4e00\u4e0b\u8d44\u6599\u539f\u6765\u9700\u8981\u4fee\u6539\u914d\u7f6e\u540e\u9700\u8981\u5728 Ubuntu \u4e2d\u6269\u5bb9\u4e0b ubuntu-vg \u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u4ee5\u4e0b\u662f\u5177\u4f53\u7684\u64cd\u4f5c\u6b65\u9aa4\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">1. VMWare \u7684\u64cd\u4f5c\u5c31\u4e0d\u7d2f\u8ff0\u4e86\uff0c\u5927\u5bb6\u90fd\u4f1a\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">2. SSH \u767b\u5f55\u670d\u52a1\u5668\uff0c\u4f7f\u7528 <code>sudo -s<\/code> \u63d0\u6743\u3002\u5982\u679c\u4f60\u6709\u76f4\u63a5\u4f7f\u7528 <code>root<\/code> \u7528\u6237\u7684\u201c\u4e0d\u826f\u4e60\u60ef\u201d\u7684\u8bdd\uff0c\u4e0d\u9700\u8981\u63d0\u6743\u4e86\uff08\u5e9f\u8bdd\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">3. \u6267\u884c <code>fdisk -l<\/code>\uff0c\u4f60\u4f1a\u53d1\u73b0\u6709\u884c\u7ea2\u5b57\u3002\u5982\u679c\u6ca1\u6709\u7684\u8bdd\uff0c\u8bf7\u68c0\u67e5\u4e0b\u4f60\u7684\u865a\u62df\u673a\u6269\u5bb9\u64cd\u4f5c\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"640\" height=\"136\" src=\"https:\/\/hjwzs.xyz\/wp-content\/uploads\/2024\/04\/image.png\" alt=\"\" class=\"wp-image-251\" srcset=\"https:\/\/hjwzs.xyz\/wp-content\/uploads\/2024\/04\/image.png 640w, https:\/\/hjwzs.xyz\/wp-content\/uploads\/2024\/04\/image-300x64.png 300w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">4. \u6267\u884c <code>fdisk \/dev\/sda<\/code>\uff0c\u4f9d\u6b21\u8f93\u5165 n -> \u9ed8\u8ba4\u56de\u8f66 -> \u9ed8\u8ba4\u56de\u8f66 -> \u9ed8\u8ba4\u56de\u8f66 -> w<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<pre class=\"wp-block-syntaxhighlighter-code\">$ fdisk \/dev\/sda\n\nWelcome to fdisk (util-linux 2.34).\nChanges will remain in memory only, until you decide to write them.\nBe careful before using the write command.\n\nGPT PMBR size mismatch (2147483647 != 4294967295) will be corrected by write.\n\nCommand (m for help): n\nPartition number (6-128, default 6):\nFirst sector (2147483615-4294967262, default 2147483648):\nLast sector, +\/-sectors or +\/-size{K,M,G,T,P} (2147483648-4294967262, default 4294967262):\n\nCreated a new partition 6 of type 'Linux filesystem' and of size 1024 GiB.\n\nCommand (m for help): w\nThe partition table has been altered.\nSyncing disks.<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">5. \u63a5\u7740\u6267\u884c\u4e0b <code>fdisk -l<\/code>\uff0c\u4f60\u4f1a\u770b\u5230\u4f60\u65b0\u6269\u5bb9\u7684 Disk\uff0c\u6211\u8fd9\u91cc\u662f <code>\/dev\/sda6<\/code><\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"560\" height=\"136\" src=\"https:\/\/hjwzs.xyz\/wp-content\/uploads\/2024\/04\/image-1.png\" alt=\"\" class=\"wp-image-252\" srcset=\"https:\/\/hjwzs.xyz\/wp-content\/uploads\/2024\/04\/image-1.png 560w, https:\/\/hjwzs.xyz\/wp-content\/uploads\/2024\/04\/image-1-300x73.png 300w\" sizes=\"auto, (max-width: 560px) 100vw, 560px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">6. \u63a5\u4e0b\u6765\uff0c\u8981\u4f7f\u7528 <code>\/dev\/sda6<\/code> \u6269\u5bb9 <code>ubuntu-vg<\/code> \u5206\u533a\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u6267\u884c\uff1a<code>vgextend ubuntu-vg \/dev\/sda6<\/code><\/p>\n\n\n\n<pre class=\"wp-block-syntaxhighlighter-code\"># \u8fd9\u91cc\u63d0\u793a\uff0c\u8f93\u5165y\nWARNING: ext4 signature detected on \/dev\/sda6 at offset 1080. Wipe it? [y\/n]: y\n  Wiping ext4 signature on \/dev\/sda6.\n  Physical volume \"\/dev\/sda6\" successfully created.\n  Volume group \"ubuntu-vg\" successfully extended<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u6267\u884c <code>vgdisplay<\/code>\uff0c\u68c0\u67e5\u4e00\u4e0b\u6269\u5bb9\u662f\u5426\u5b8c\u6210\u3002<\/p>\n\n\n\n<pre class=\"wp-block-syntaxhighlighter-code\">  --- Volume group ---\n  VG Name               ubuntu-vg\n  System ID\n  Format                lvm2\n  Metadata Areas        3\n  Metadata Sequence No  6\n  VG Access             read\/write\n  VG Status             resizable\n  MAX LV                0\n  Cur LV                1\n  Open LV               1\n  Max PV                0\n  Cur PV                3\n  Act PV                3\n  VG Size               &lt;2.00 TiB\n  PE Size               4.00 MiB\n  Total PE              523901\n  Alloc PE \/ Size       261758 \/ 1022.49 GiB\n  Free  PE \/ Size       262143 \/ &lt;1024.00 GiB\n# \u4e3b\u8981\u770b\u4e0a\u65b9\u7684 Free PE \/ Size \u662f\u5426\u5927\u4e8e0\uff0c\u5c3a\u5bf8\u5e94\u8be5\u5c31\u662f\u4f60\u9700\u8981\u6269\u5bb9\u7684\u5bb9\u91cf\u3002<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">7. \u4f7f\u7528 <code>df -TH<\/code> \u83b7\u53d6\u4f60\u7cfb\u7edf\u4e2d Ubuntu \u4e3b\u5206\u533a\u7684\u540d\u5b57\uff0c\u6211\u8fd9\u91cc\u662f <code>\/dev\/mapper\/ubuntu--vg-ubuntu--lv<\/code><\/p>\n\n\n\n<pre class=\"wp-block-syntaxhighlighter-code\">$ df -TH\nFilesystem                        Type      Size  Used Avail Use% Mounted on\nudev                              devtmpfs   34G     0   34G   0% \/dev\ntmpfs                             tmpfs     6.8G  1.7M  6.8G   1% \/run\n\/dev\/mapper\/ubuntu--vg-ubuntu--lv ext4      1.1T  776G  260G  75% \/\n...<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u6267\u884c\u4ee5\u4e0b2\u4e2a\u547d\u4ee4\u5b8c\u6210\u6269\u5bb9\u3002<\/p>\n\n\n\n<pre class=\"wp-block-syntaxhighlighter-code\">$ lvextend \/dev\/mapper\/ubuntu--vg-ubuntu--lv \/dev\/sda6\n$ resize2fs \/dev\/mapper\/ubuntu--vg-ubuntu--lv<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">8. \u6700\u540e\u4f7f\u7528 <code>df -h<\/code> \u68c0\u67e5\u4e3b\u5206\u533a\u5bb9\u91cf\u662f\u5426\u5df2\u7ecf\u6210\u529f\u6269\u5bb9\u3002<\/p>\n\n\n\n<pre class=\"wp-block-syntaxhighlighter-code\">$ df -h\nFilesystem                         Size  Used Avail Use% Mounted on\nudev                                32G     0   32G   0% \/dev\ntmpfs                              6.3G  1.6M  6.3G   1% \/run\n\/dev\/mapper\/ubuntu--vg-ubuntu--lv  2.0T  723G  1.2T  38% \/<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u5927\u529f\u544a\u6210~<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6700\u8fd1\u4e0b\u8f7d\u7684\u5927\u6a21\u578b\u8d8a\u6765\u8d8a\u591a\uff0c\u786c\u76d8\u5df2\u7ecf\u625b\u4e0d\u4f4f\u4e86\uff0c\u76f4\u63a5\u5728 VMWare \u4e2d\u4fee\u6539\u786c\u76d8\u914d\u7f6e\u5c45\u7136\u6ca1\u6709\u751f\u6548\u3002\u67e5\u9605\u4e86\u4e00\u4e0b\u8d44\u6599\u539f [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[16],"class_list":["post-250","post","type-post","status-publish","format-standard","hentry","category-experience-sharing","tag-devops"],"_links":{"self":[{"href":"https:\/\/hjwzs.xyz\/index.php?rest_route=\/wp\/v2\/posts\/250","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/hjwzs.xyz\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/hjwzs.xyz\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/hjwzs.xyz\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/hjwzs.xyz\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=250"}],"version-history":[{"count":3,"href":"https:\/\/hjwzs.xyz\/index.php?rest_route=\/wp\/v2\/posts\/250\/revisions"}],"predecessor-version":[{"id":255,"href":"https:\/\/hjwzs.xyz\/index.php?rest_route=\/wp\/v2\/posts\/250\/revisions\/255"}],"wp:attachment":[{"href":"https:\/\/hjwzs.xyz\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=250"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/hjwzs.xyz\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=250"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/hjwzs.xyz\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=250"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}