update some content

This commit is contained in:
2021-10-28 14:15:01 +08:00
parent b8600ab259
commit 27b5a11382
163 changed files with 951 additions and 922 deletions

View File

@@ -45,9 +45,9 @@
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.3.1/css/all.css" integrity="sha384-mzrmE5qonljUremFsqc01SB46JvROS7bZs3IO2EmfFsd15uHvIt+Y8vEf7N7fWAU" crossorigin="anonymous">
<link href="https://h.cowbay.org/css/style.css?v=1634607506" rel="stylesheet" id="theme-stylesheet" type='text/css' media='all'>
<link href="https://h.cowbay.org/css/style.css?v=1635401692" rel="stylesheet" id="theme-stylesheet" type='text/css' media='all'>
<link href="https://h.cowbay.org/css/custom.css?v=1634607506" rel="stylesheet" type='text/css' media='all'>
<link href="https://h.cowbay.org/css/custom.css?v=1635401692" rel="stylesheet" type='text/css' media='all'>
<link rel="shortcut icon" href="https://h.cowbay.org/img/favicon.ico" type="image/x-icon">
<link rel="icon" href="https://h.cowbay.org/img/favicon.ico" type="image/x-icon">
@@ -331,7 +331,7 @@ if (!doNotTrack) {
<p>設定了新的 vmbridge 之後就可以在新VM的設定畫面中指定網卡走這個界面出去</p>
<p>可是這樣做出來的VM ,一直無法開機</p>
<p>錯誤訊息如下</p>
<pre tabindex="0"><code>kvm: -drive file=/zp/images/100/vm-100-disk-1.qcow2,if=none,id=drive-virtio0,format=qcow2,cache=none,aio=native,detect-zeroes=on: file system may not support O_DIRECT
<pre><code>kvm: -drive file=/zp/images/100/vm-100-disk-1.qcow2,if=none,id=drive-virtio0,format=qcow2,cache=none,aio=native,detect-zeroes=on: file system may not support O_DIRECT
kvm: -drive file=/zp/images/100/vm-100-disk-1.qcow2,if=none,id=drive-virtio0,format=qcow2,cache=none,aio=native,detect-zeroes=on: Could not open '/zp/images/100/vm-100-disk-1.qcow2': Invalid argument
TASK ERROR: start failed: command '/usr/bin/kvm -id 100 -name 123123 -chardev 'socket,id=qmp,path=/var/run/qemu-server/100.qmp,server,nowait' -mon 'chardev=qmp,mode=control' -pidfile /var/run/qemu-server/100.pid -daemonize -smbios 'type=1,uuid=da27a9ea-fd55-4542-b2a7-8d5b09bf7611' -smp '2,sockets=1,cores=2,maxcpus=2' -nodefaults -boot 'menu=on,strict=on,reboot-timeout=1000,splash=/usr/share/qemu-server/bootsplash.jpg' -vga std -vnc unix:/var/run/qemu-server/100.vnc,x509,password -cpu kvm64,+lahf_lm,+sep,+kvm_pv_unhalt,+kvm_pv_eoi,enforce -m 2048 -device 'pci-bridge,id=pci.2,chassis_nr=2,bus=pci.0,addr=0x1f' -device 'pci-bridge,id=pci.1,chassis_nr=1,bus=pci.0,addr=0x1e' -device 'piix3-usb-uhci,id=uhci,bus=pci.0,addr=0x1.0x2' -device 'usb-tablet,id=tablet,bus=uhci.0,port=1' -device 'virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3' -iscsi 'initiator-name=iqn.1993-08.org.debian:01:b972d1ad783' -drive 'file=/zp/template/iso/ubuntu-18.04.1-live-server-amd64.iso,if=none,id=drive-ide2,media=cdrom,aio=threads' -device 'ide-cd,bus=ide.1,unit=0,drive=drive-ide2,id=ide2,bootindex=200' -drive 'file=/zp/images/100/vm-100-disk-1.qcow2,if=none,id=drive-virtio0,format=qcow2,cache=none,aio=native,detect-zeroes=on' -device 'virtio-blk-pci,drive=drive-virtio0,id=virtio0,bus=pci.0,addr=0xa,bootindex=100' -netdev 'type=tap,id=net0,ifname=tap100i0,script=/var/lib/qemu-server/pve-bridge,downscript=/var/lib/qemu-server/pve-bridgedown,vhost=on' -device 'virtio-net-pci,mac=A2:EA:45:EE:17:25,netdev=net0,bus=pci.0,addr=0x12,id=net0,bootindex=300'' failed: exit code 1
</code></pre><p>當然先去拜google果然就看到了提示需要把 磁碟的 Cache 從預設的 Default(No Cache) 改成 write through</p>
@@ -340,14 +340,14 @@ TASK ERROR: start failed: command '/usr/bin/kvm -id 100 -name 123123 -chardev 's
<p>總之呢,改完之後就可以了 &hellip;</p>
<h3 id="strongfont-colorred必須手動設定路由fontstrong"><!-- raw HTML omitted --><!-- raw HTML omitted -->必須手動設定路由<!-- raw HTML omitted --><!-- raw HTML omitted --></h3>
<h4 id="update">Update</h4>
<pre tabindex="0"><code>這邊可能是我有誤解應該不需要先在pve 本機設定 10G網卡的 IP
<pre><code>這邊可能是我有誤解應該不需要先在pve 本機設定 10G網卡的 IP
直接進web console 去設定 vmbr1 就好了
</code></pre><p>設定好新的VM開機、設定IP、重開機之後會發現還是ping 不到另一台機器..(翻桌!)</p>
<p>只好又去拜google ,就看到了底下這篇</p>
<p><a href="https://forum.proxmox.com/threads/how-to-add-second-nic.40905/">https://forum.proxmox.com/threads/how-to-add-second-nic.40905/</a></p>
<p>大概點出了方向,必須要手動增加路由(感覺有點蠢)</p>
<p>像我的光纖網卡走的是 192.168.50.0/24 就要去把原有的192.168.50.0/24的路由給砍掉然後再新增(是不是很蠢?)</p>
<pre tabindex="0"><code>root@ssd:/etc/network# ip route del 192.168.50.0/24
<pre><code>root@ssd:/etc/network# ip route del 192.168.50.0/24
root@ssd:/etc/network# ip route add 192.168.50.0/24 dev vmbr1
root@ssd:/etc/network# ip route
@@ -357,7 +357,7 @@ default via 192.168.11.253 dev vmbr0 onlink
root@ssd:/etc/network#
</code></pre><p>OK ping 一下對面看能不能過</p>
<pre tabindex="0"><code>root@ssd:/etc/network# ping 192.168.50.10
<pre><code>root@ssd:/etc/network# ping 192.168.50.10
PING 192.168.50.10 (192.168.50.10) 56(84) bytes of data.
64 bytes from 192.168.50.10: icmp_seq=1 ttl=64 time=0.083 ms
64 bytes from 192.168.50.10: icmp_seq=2 ttl=64 time=0.067 ms
@@ -374,9 +374,9 @@ PING 192.168.50.10 (192.168.50.10) 56(84) bytes of data.
<p>在linux 上,我習慣用 iperf 來測試兩台主機的連接速度</p>
<p>兩邊都用 apt install iperf 裝好套件</p>
<p>然後找一台作為 server ,執行</p>
<pre tabindex="0"><code>iperf -s
<pre><code>iperf -s
</code></pre><p>然後到另一台,去執行</p>
<pre tabindex="0"><code>2018-11-30 15:36:58 [minion@ubuntu ~]$ iperf -d -t 600 -P 10 -c 192.168.50.200
<pre><code>2018-11-30 15:36:58 [minion@ubuntu ~]$ iperf -d -t 600 -P 10 -c 192.168.50.200
WARNING: option -d is not valid for server mode
------------------------------------------------------------
Client connecting to 192.168.50.200, TCP port 5001
@@ -389,7 +389,7 @@ TCP window size: 85.0 KByte (default)
</code></pre><p>哈哈哈,有目有!測試速度來到了 9.18 Gbits 啊! 就是一個爽啊!</p>
<p>記得那個 server IP 是你 VM 裡面設定的 IP不是 proxmox 上面的</p>
<p>同場加映走 1Gb 網路的測試結果</p>
<pre tabindex="0"><code>2018-11-30 16:39:37 [minion@ubuntu ~]$ iperf -d -t 600 -P 10 -c 192.168.11.171
<pre><code>2018-11-30 16:39:37 [minion@ubuntu ~]$ iperf -d -t 600 -P 10 -c 192.168.11.171
WARNING: option -d is not valid for server mode
------------------------------------------------------------
Client connecting to 192.168.11.171, TCP port 5001
@@ -410,16 +410,16 @@ TCP window size: 85.0 KByte (default)
<p>在 mapuser/mapgroup這邊要改成 root/wheel 不然會有無法寫入的問題</p>
<p><img src="https://i.imgur.com/Yn7qYdK.png" alt="FREENAS NFS Sharing"></p>
<p>安裝完之後,實際跑一下 dd 看看速度多少</p>
<pre tabindex="0"><code>Last login: Mon Dec 3 03:10:54 2018
<pre><code>Last login: Mon Dec 3 03:10:54 2018
2018-12-03 03:15:03 [administrator@ubuntu ~]$ dd if=/dev/zero of=testfile bs=10240 count=1000000
1000000+0 records in
1000000+0 records out
10240000000 bytes (10 GB, 9.5 GiB) copied, 9.63458 s, 1.1 GB/s
</code></pre><pre tabindex="0"><code>2018-12-03 03:17:28 [administrator@ubuntu ~]$ dd if=/dev/zero of=testfile bs=20480 count=1000000
</code></pre><pre><code>2018-12-03 03:17:28 [administrator@ubuntu ~]$ dd if=/dev/zero of=testfile bs=20480 count=1000000
1000000+0 records in
1000000+0 records out
20480000000 bytes (20 GB, 19 GiB) copied, 16.0786 s, 1.3 GB/s
</code></pre><pre tabindex="0"><code>2018-12-03 03:17:50 [administrator@ubuntu ~]$ dd if=/dev/zero of=testfile bs=4096 count=1000000
</code></pre><pre><code>2018-12-03 03:17:50 [administrator@ubuntu ~]$ dd if=/dev/zero of=testfile bs=4096 count=1000000
1000000+0 records in
1000000+0 records out
4096000000 bytes (4.1 GB, 3.8 GiB) copied, 4.80629 s, 852 MB/s
@@ -723,7 +723,7 @@ title="pinterest icon"></i>
</div>
<script src="https://h.cowbay.org/js/jquery.min.js"></script>
<script src="https://h.cowbay.org/js/jquerymigrate.js"></script>
<script src="https://h.cowbay.org/js/production.min.js?v=1634607506"></script>
<script src="https://h.cowbay.org/js/production.min.js?v=1635401692"></script>
</body>
</html>