本文及资源最后更新时间 2022-04-17 by sky995
一、Kimsufi独服通过虚拟KVM安装ISO镜像(Proxmox7)
机器拿到手后肯定就是要装个系统了,虽然kimsufi后台有非常全的系统模板,也可以调整分区方案,但还是不太好用,2x2T的盘子默认装系统的话是做raid1,我想全部都做成raid0就没办法做,因为它这个后台分区强制根必须是raid1。
其次我打算把zfs用作proxmox的根文件系统,因为这两块盘子都是古董了,我觉得就算做raid0的话性能也就那样,但是机器本身有32g内存,这么多内存放着不用也是浪费,不如喂给zfs。
所以最终我选择的方案就是用zfs做raid0,并且把zfs作为proxmox的根文件系统。那现在问题就来了,想实现这一套方案的话,安装proxmox就只能用iso来装了,但是这机器没有ipmi,咋办呢?
好在kimsufi后台还提供了一个基于debian的救援系统!我们可以在这个救援系统里面安装kvm然后把硬盘直通给虚拟机来安装proxmox。这里就记录一下折腾的过程。
首先登录到kimsufi的后台,把这个监控关了:
这里说下为啥要把这个关了,因为如果你开着这个,到时候装系统要是配置哪里出了问题导致机器网络不通的话,你在后台执行硬重启会卡很久,因为它这个监控会ping你的机器ip,如果不通的话就会卡很久才有反应,很浪费时间,所以这里先关了,后面等配置全部好了后再打开。
接着点右上角的Netboot,在里面选择Rescue,然后点Next:
点Confirm:
再点右上角的Restart执行硬重启,等待片刻,邮箱里面会收到救援系统的ssh登录ip/账号/密码。
登录到救援系统内,首先查看硬盘的基本情况:
<span class="pln">lsblk</span>
可以看到之前系统做了raid1:
查看阵列状态:
<span class="pln">mdadm </span><span class="pun">--</span><span class="pln">detail </span><span class="pun">/</span><span class="pln">dev</span><span class="pun">/</span><span class="pln">md127</span>
可以看到这个阵列当前正在工作:
我们需要先停止这个阵列:
<span class="pln">mdadm </span><span class="pun">--</span><span class="pln">stop </span><span class="pun">/</span><span class="pln">dev</span><span class="pun">/</span><span class="pln">md127</span>
然后删除两块硬盘的分区表:
<span class="pln">wipefs </span><span class="pun">-</span><span class="pln">a </span><span class="pun">/</span><span class="pln">dev</span><span class="pun">/</span><span class="pln">sda wipefs </span><span class="pun">-</span><span class="pln">a </span><span class="pun">/</span><span class="pln">dev</span><span class="pun">/</span><span class="pln">sdb</span>
在这个救援系统内查看机器的公网ip:
<span class="pln">ip a</span>
回显类似:
<span class="pln">eth0</span><span class="pun">:...</span><span class="pln"> link</span><span class="pun">/</span><span class="pln">ether </span><span class="pun">...</span><span class="pln"> inet xx</span><span class="pun">.</span><span class="pln">xx</span><span class="pun">.</span><span class="pln">xx</span><span class="pun">.</span><span class="pln">xx </span><span class="pun">...</span>
查看网关ip:
<span class="pln">ip route list</span>
回显类似:
<span class="kwd">default</span><span class="pln"> via xx</span><span class="pun">.</span><span class="pln">xx</span><span class="pun">.</span><span class="pln">xx</span><span class="pun">.</span><span class="pln">xx dev eth0</span>
查看dns:
<span class="pln">cat </span><span class="pun">/</span><span class="pln">etc</span><span class="pun">/</span><span class="pln">resolv</span><span class="pun">.</span><span class="pln">conf</span>
回显类似:
<span class="pln">nameserver </span><span class="lit">213.186</span><span class="pun">.</span><span class="lit">33.99</span>
记住这些,待会安装的时候需要用到。
安装kvm:
<span class="pln">apt </span><span class="pun">-</span><span class="pln">y update apt </span><span class="pun">-</span><span class="pln">y install qemu qemu</span><span class="pun">-</span><span class="pln">kvm</span>
下载proxmox的iso:
<span class="pln">wget http</span><span class="pun">:</span><span class="com">//download.proxmox.com/iso/proxmox-ve_7.1-1.iso</span>
启动虚拟机:
<span class="pln">qemu</span><span class="pun">-</span><span class="pln">system</span><span class="pun">-</span><span class="pln">x86_64 \ </span><span class="pun">-</span><span class="pln">enable</span><span class="pun">-</span><span class="pln">kvm \ </span><span class="pun">-</span><span class="pln">nodefaults \ </span><span class="pun">-</span><span class="pln">cdrom </span><span class="pun">/</span><span class="pln">root</span><span class="pun">/</span><span class="pln">proxmox</span><span class="pun">-</span><span class="pln">ve_7</span><span class="pun">.</span><span class="lit">1</span><span class="pun">-</span><span class="lit">1.iso</span><span class="pln"> \ </span><span class="pun">-</span><span class="pln">hda </span><span class="pun">/</span><span class="pln">dev</span><span class="pun">/</span><span class="pln">sda \ </span><span class="pun">-</span><span class="pln">hdb </span><span class="pun">/</span><span class="pln">dev</span><span class="pun">/</span><span class="pln">sdb \ </span><span class="pun">-</span><span class="pln">cpu host \ </span><span class="pun">-</span><span class="pln">smp </span><span class="lit">4</span><span class="pln"> \ </span><span class="pun">-</span><span class="pln">m </span><span class="lit">8G</span><span class="pln"> \ </span><span class="pun">-</span><span class="pln">net nic \ </span><span class="pun">-</span><span class="pln">net user \ </span><span class="pun">-</span><span class="pln">vga std \ </span><span class="pun">-</span><span class="pln">vnc </span><span class="lit">127.0</span><span class="pun">.</span><span class="lit">0.1</span><span class="pun">:</span><span class="lit">0</span><span class="pln"> \ </span><span class="pun">-</span><span class="pln">usbdevice tablet \ </span><span class="pun">-</span><span class="pln">k en</span><span class="pun">-</span><span class="pln">us</span>
现在需要配置一个ssh隧道,用来访问虚拟机的vnc。当然如果你嫌麻烦,不怕安全问题的话可以把上面的vnc地址监听到0.0.0.0,这样就可以直接访问了。我这里为了安全起见还是用ssh隧道访问了。下面就用xshell示范一下如何建立ssh隧道。
在登录这台救援系统的ssh会话里面打开下图这个界面:
然后按照下图填写,33321端口可以任意修改,只要本地没有占用这个端口即可:
像这样配置好了后再新打开一个ssh会话连接,隧道就建立好了。之后可以用vnc客户端连接:
正常的话就能看到proxmox的安装界面了:
一步一步跟着安装进程走,到硬盘这里,选择zfs(raid0):
网络配置这里,把之前查看得到的ip/网关/dns填写上去:
确认无误后开始安装:
安装完成后,登录到proxmox的控制台,编辑grub配置文件:
<span class="pln">nano </span><span class="pun">/</span><span class="pln">etc</span><span class="pun">/</span><span class="kwd">default</span><span class="pun">/</span><span class="pln">grub</span>
修改如下配置,加入net.ifnames=0 biosdevname=0内核启动参数:
<span class="pln">GRUB_CMDLINE_LINUX_DEFAULT</span><span class="pun">=</span><span class="str">"quiet net.ifnames=0 biosdevname=0"</span>
更新grub:
<span class="pln">update</span><span class="pun">-</span><span class="pln">grub</span>
然后编辑网卡配置文件:
<span class="pln">nano </span><span class="pun">/</span><span class="pln">etc</span><span class="pun">/</span><span class="pln">network</span><span class="pun">/</span><span class="pln">interfaces</span>
默认的配置应该是这样:
<span class="kwd">auto</span><span class="pln"> lo iface lo inet loopback iface ens3 inet manual </span><span class="kwd">auto</span><span class="pln"> vmbr0 iface vmbr0 inet </span><span class="kwd">static</span><span class="pln"> address xx</span><span class="pun">.</span><span class="pln">xx</span><span class="pun">.</span><span class="pln">xx</span><span class="pun">.</span><span class="pln">xx</span><span class="pun">/</span><span class="lit">24</span><span class="pln"> gateway xx</span><span class="pun">.</span><span class="pln">xx</span><span class="pun">.</span><span class="pln">xx</span><span class="pun">.</span><span class="pln">xx bridge</span><span class="pun">-</span><span class="pln">ports ens3 bridge</span><span class="pun">-</span><span class="pln">stp off bridge</span><span class="pun">-</span><span class="pln">fd </span><span class="lit">0</span>
改为:
<span class="kwd">auto</span><span class="pln"> lo iface lo inet loopback iface eth0 inet manual </span><span class="kwd">auto</span><span class="pln"> vmbr0 iface vmbr0 inet </span><span class="kwd">static</span><span class="pln"> address xx</span><span class="pun">.</span><span class="pln">xx</span><span class="pun">.</span><span class="pln">xx</span><span class="pun">.</span><span class="pln">xx</span><span class="pun">/</span><span class="lit">24</span><span class="pln"> gateway xx</span><span class="pun">.</span><span class="pln">xx</span><span class="pun">.</span><span class="pln">xx</span><span class="pun">.</span><span class="pln">xx bridge</span><span class="pun">-</span><span class="pln">ports eth0 bridge</span><span class="pun">-</span><span class="pln">stp off bridge</span><span class="pun">-</span><span class="pln">fd </span><span class="lit">0</span> <span class="kwd">auto</span><span class="pln"> vmbr1 iface vmbr1 inet </span><span class="kwd">static</span><span class="pln"> address </span><span class="lit">192.168</span><span class="pun">.</span><span class="lit">0.1</span><span class="pln"> netmask </span><span class="lit">255.255</span><span class="pun">.</span><span class="lit">255.0</span><span class="pln"> bridge_ports none bridge_stp off bridge_fd </span><span class="lit">0</span><span class="pln"> post</span><span class="pun">-</span><span class="pln">up echo </span><span class="lit">1</span> <span class="pun">></span> <span class="str">/proc/</span><span class="pln">sys</span><span class="pun">/</span><span class="pln">net</span><span class="pun">/</span><span class="pln">ipv4</span><span class="pun">/</span><span class="pln">ip_forward post</span><span class="pun">-</span><span class="pln">up iptables </span><span class="pun">-</span><span class="pln">t nat </span><span class="pun">-</span><span class="pln">A POSTROUTING </span><span class="pun">-</span><span class="pln">s </span><span class="str">'192.168.0.0/24'</span> <span class="pun">-</span><span class="pln">o vmbr0 </span><span class="pun">-</span><span class="pln">j MASQUERADE post</span><span class="pun">-</span><span class="pln">down iptables </span><span class="pun">-</span><span class="pln">t nat </span><span class="pun">-</span><span class="pln">D POSTROUTING </span><span class="pun">-</span><span class="pln">s </span><span class="str">'192.168.0.0/24'</span> <span class="pun">-</span><span class="pln">o vmbr0 </span><span class="pun">-</span><span class="pln">j MASQUERADE</span>
这里解释一下为何这么配置。首先是加了net.ifnames=0 biosdevname=0这两个内核启动参数,让网卡接口的命名强制统一变为ethX。
这样做可以解决机器重启后找不到网卡接口的问题。因为通过虚拟机安装的proxmox网卡名和宿主机的网卡名是对不上的。
kimsufi不能加ip,要开小鸡只能开nat,所以下面的vmbr1是为nat小鸡准备的。
做完这些改动后,把运行这台proxmox的虚拟机关机:
<span class="pln">systemctl poweroff</span>
回到kimsufi的控制台,把系统启动模式改为从硬盘启动:
再点右上角的restart执行硬重启。等待片刻,如果一切正常的话,现在应该就可以访问到proxmox的webui了:
最后简单来个bench:
有点遗憾的是,本文没有涉及到ipv6的配置,因为我当时忘记查看原系统ipv6相关的信息了,不知道网关ip之类的信息也就没办法配置ipv6,等有空重装看看吧。
二、Kimsufi独服使用Proxmox开NATIPv4+IPv6双栈小鸡
首先在kimsufi的后台用他们提供的系统模板把机器重装一次,随便用哪个linux发行版都可以,我这里重装的是debian11。目的只是为了获取机器原始的ipv6网络配置信息。
登到机器内查看机器的ipv6地址:
<span class="pln">ip </span><span class="pun">-</span><span class="lit">6</span><span class="pln"> a</span>
回显类似:
查看机器的ipv6网关:
<span class="pln">ip </span><span class="pun">-</span><span class="lit">6</span><span class="pln"> route list</span>
回显类似:
kimsufi的网站上虽然标明每台机器只有/128的ipv6,但实际可用应该是/64,为了后续的步骤能够正常进行,这里先简单检查一下机器到底能用多少个ipv6,可以先往机器的主网卡接口添加一个ipv6测试:
<span class="pln">ip addr add </span><span class="lit">2001</span><span class="pun">:</span><span class="lit">41d0</span><span class="pun">:</span><span class="pln">x</span><span class="pun">:</span><span class="pln">xxxx</span><span class="pun">::</span><span class="lit">2</span><span class="pun">/</span><span class="lit">128</span><span class="pln"> dev eno1</span>
在别的机器上能ping通刚添加的地址就说明可用的ipv6不止/128:
那就可以继续下面的操作了,按照文章一的步骤安装好proxmox:
<span class="pln">nano </span><span class="pun">/</span><span class="pln">etc</span><span class="pun">/</span><span class="pln">network</span><span class="pun">/</span><span class="pln">interfaces</span>
在先前这篇文章的配置基础上,加入ipv6相关的配置:
<span class="kwd">auto</span><span class="pln"> lo iface lo inet loopback iface eth0 inet manual </span><span class="kwd">auto</span><span class="pln"> vmbr0 iface vmbr0 inet </span><span class="kwd">static</span><span class="pln"> address xx</span><span class="pun">.</span><span class="pln">xx</span><span class="pun">.</span><span class="pln">xx</span><span class="pun">.</span><span class="pln">xx</span><span class="pun">/</span><span class="lit">24</span><span class="pln"> gateway xx</span><span class="pun">.</span><span class="pln">xx</span><span class="pun">.</span><span class="pln">xx</span><span class="pun">.</span><span class="pln">xx bridge</span><span class="pun">-</span><span class="pln">ports eth0 bridge</span><span class="pun">-</span><span class="pln">stp off bridge</span><span class="pun">-</span><span class="pln">fd </span><span class="lit">0</span><span class="pln"> iface vmbr0 inet6 </span><span class="kwd">static</span><span class="pln"> address </span><span class="lit">2001</span><span class="pun">:</span><span class="lit">41d0</span><span class="pun">:</span><span class="pln">x</span><span class="pun">:</span><span class="pln">xxxx</span><span class="pun">::</span><span class="lit">1</span><span class="pun">/</span><span class="lit">64</span><span class="pln"> gateway </span><span class="lit">2001</span><span class="pun">:</span><span class="lit">41d0</span><span class="pun">:</span><span class="pln">x</span><span class="pun">:</span><span class="pln">xxxx</span><span class="pun">:</span><span class="pln">ff</span><span class="pun">:</span><span class="pln">ff</span><span class="pun">:</span><span class="pln">ff</span><span class="pun">:</span><span class="pln">ff </span><span class="kwd">auto</span><span class="pln"> vmbr1 iface vmbr1 inet </span><span class="kwd">static</span><span class="pln"> address </span><span class="lit">192.168</span><span class="pun">.</span><span class="lit">0.1</span><span class="pln"> netmask </span><span class="lit">255.255</span><span class="pun">.</span><span class="lit">255.0</span><span class="pln"> bridge_ports none bridge_stp off bridge_fd </span><span class="lit">0</span><span class="pln"> post</span><span class="pun">-</span><span class="pln">up echo </span><span class="lit">1</span> <span class="pun">></span> <span class="str">/proc/</span><span class="pln">sys</span><span class="pun">/</span><span class="pln">net</span><span class="pun">/</span><span class="pln">ipv4</span><span class="pun">/</span><span class="pln">ip_forward post</span><span class="pun">-</span><span class="pln">up iptables </span><span class="pun">-</span><span class="pln">t nat </span><span class="pun">-</span><span class="pln">A POSTROUTING </span><span class="pun">-</span><span class="pln">s </span><span class="str">'192.168.0.0/24'</span> <span class="pun">-</span><span class="pln">o vmbr0 </span><span class="pun">-</span><span class="pln">j MASQUERADE post</span><span class="pun">-</span><span class="pln">down iptables </span><span class="pun">-</span><span class="pln">t nat </span><span class="pun">-</span><span class="pln">D POSTROUTING </span><span class="pun">-</span><span class="pln">s </span><span class="str">'192.168.0.0/24'</span> <span class="pun">-</span><span class="pln">o vmbr0 </span><span class="pun">-</span><span class="pln">j MASQUERADE</span>
重启网络服务:
<span class="pln">systemctl restart networking</span><span class="pun">.</span><span class="pln">service</span>
正常的话,现在母鸡的ipv6就通了:
为了让小鸡也能用上ipv6,现在还需要做一系列的配置。首先开启ipv6转发:
<span class="pln">echo </span><span class="str">"net.ipv6.conf.all.forwarding = 1"</span> <span class="pun">>></span> <span class="str">/etc/</span><span class="pln">sysctl</span><span class="pun">.</span><span class="pln">conf </span><span class="pun">&&</span><span class="pln"> sysctl </span><span class="pun">-</span><span class="pln">p</span>
然后安装ndppd:
<span class="pln">apt </span><span class="pun">-</span><span class="pln">y install ndppd</span>
编辑ndppd的配置文件:
<span class="pln">nano </span><span class="pun">/</span><span class="pln">etc</span><span class="pun">/</span><span class="pln">ndppd</span><span class="pun">.</span><span class="pln">conf</span>
写入如下配置,ipv6地址块换成你自己的:
<span class="pln">proxy vmbr0 </span><span class="pun">{</span><span class="pln"> rule </span><span class="lit">2001</span><span class="pun">:</span><span class="lit">41d0</span><span class="pun">:</span><span class="pln">x</span><span class="pun">:</span><span class="pln">xxxx</span><span class="pun">::/</span><span class="lit">64</span> <span class="pun">{</span> <span class="kwd">static</span> <span class="pun">}</span> <span class="pun">}</span>
重启ndppd服务使其生效,并设置开机自启:
<span class="pln">systemctl restart ndppd</span><span class="pun">.</span><span class="pln">service systemctl enable ndppd</span><span class="pun">.</span><span class="pln">service</span>
现在开小鸡的话ipv6实际上就能用了,但是只能手动设置小鸡的ipv6地址,每台都手动设置的话太麻烦,重复劳动浪费时间,所以这里可以配置radvd实现slaac。
安装radvd:
<span class="pln">apt </span><span class="pun">-</span><span class="pln">y install radvd</span>
新建radvd配置文件:
<span class="pln">nano </span><span class="pun">/</span><span class="pln">etc</span><span class="pun">/</span><span class="pln">radvd</span><span class="pun">.</span><span class="pln">conf</span>
写入如下配置,ipv6地址块换成你自己的:
<span class="kwd">interface</span><span class="pln"> vmbr0 </span><span class="pun">{</span> <span class="typ">AdvSendAdvert</span><span class="pln"> on</span><span class="pun">;</span> <span class="typ">MinRtrAdvInterval</span> <span class="lit">3</span><span class="pun">;</span> <span class="typ">MaxRtrAdvInterval</span> <span class="lit">10</span><span class="pun">;</span><span class="pln"> prefix </span><span class="lit">2001</span><span class="pun">:</span><span class="lit">41d0</span><span class="pun">:</span><span class="pln">x</span><span class="pun">:</span><span class="pln">xxxx</span><span class="pun">::/</span><span class="lit">64</span> <span class="pun">{</span> <span class="typ">AdvOnLink</span><span class="pln"> on</span><span class="pun">;</span> <span class="typ">AdvAutonomous</span><span class="pln"> on</span><span class="pun">;</span> <span class="typ">AdvRouterAddr</span><span class="pln"> on</span><span class="pun">;</span> <span class="pun">};</span> <span class="pun">};</span>
重启radvd服务使其生效,并设置开机自启:
<span class="pln">systemctl restart radvd</span><span class="pun">.</span><span class="pln">service systemctl enable radvd</span><span class="pun">.</span><span class="pln">service</span>
下面是开小鸡时的设置,注意不论是lxc还是kvm架构的小鸡,我这个配置统一都需要添加两个网卡。
对于lxc小鸡,在创建的时候可以先添加一个用于ipv6网络的eth0,桥接vmbr0,ipv6选择slaac:
等小鸡创建完成后再添加一个用于ipv4网络的eth1,桥接vmbr1,手动配置ipv4的地址和网关:
正常情况下,小鸡现在就是natipv4+ipv6双栈网络了:
对于kvm小鸡,实际操作大同小异,这里我就开个debian11的小鸡演示一下配置。
创建的时候先添加一个桥接vmbr0的网卡:
等小鸡创建完成后再添加一个桥接vmbr1的网卡:
打开vnc控制台开始安装系统:
这里有两块网卡ens18和ens19,实际ens18对应vmbr0,ens19对应vmbr1,这里选择ens18就可以实现ipv6的slaac:
至于ens19那块对应vmbr1的网卡,等待系统安装完成后手动配置ipv4即可。
接下来需要配置一个dns:
剩下的就是设置root密码,创建普通用户,还有分区这些了,这里就不多说了。等系统安装好,登录进去后,测试ipv6是否正常:
现在这台小鸡只有ipv6,如果还需要natipv4的话就得修改网卡配置文件,默认的配置是这样:
只需要在文件的尾部添加ens19网卡的ipv4配置:
<span class="kwd">auto</span><span class="pln"> ens19 iface ens19 inet </span><span class="kwd">static</span><span class="pln"> address </span><span class="lit">192.168</span><span class="pun">.</span><span class="lit">0.4</span><span class="pun">/</span><span class="lit">32</span><span class="pln"> gateway </span><span class="lit">192.168</span><span class="pun">.</span><span class="lit">0.1</span>
然后添加一个dns服务器:
<span class="pln">nano </span><span class="pun">/</span><span class="pln">etc</span><span class="pun">/</span><span class="pln">resolv</span><span class="pun">.</span><span class="pln">conf</span>
写入如下配置:
<span class="pln">nameserver </span><span class="lit">8.8</span><span class="pun">.</span><span class="lit">8.8</span>
重启机器即可。
在母鸡上做dnat,把小鸡的ssh端口暴露出来:
<span class="pln">iptables </span><span class="pun">-</span><span class="pln">t nat </span><span class="pun">-</span><span class="pln">A PREROUTING </span><span class="pun">-</span><span class="pln">p tcp </span><span class="pun">-</span><span class="pln">m tcp </span><span class="pun">--</span><span class="pln">dport </span><span class="lit">16823</span> <span class="pun">-</span><span class="pln">j DNAT </span><span class="pun">--</span><span class="pln">to</span><span class="pun">-</span><span class="pln">destination </span><span class="lit">192.168</span><span class="pun">.</span><span class="lit">0.4</span><span class="pun">:</span><span class="lit">22</span>
最后在这台kvm小鸡内跑个bench,简单测试一下各项配置:
三、Kimsufi独服使用Proxmox7创建Windows11小鸡
win11iso下载:https://www.microsoft.com/zh-cn/software-download/windows11
可以把地址复制到pve面板里面下载:
virtio驱动iso下载,下载latest版本:https://github.com/virtio-win/virtio-win-pkg-scripts
同样也可以在pve面板里面下载:
创建虚拟机,选择刚下载的win11iso,注意选择正确的操作系统类别和版本:
下一步到系统配置这块,如果上一步选择的版本是11/2022那么这里默认就是最佳配置了,只需要选择一下efi和tpm的存储池即可,另外建议启用qemu代理这个选项,后面再详细介绍qemu代理的作用:
硬盘这里的总线/设备配置为virtioblock,缓存配置为回写,这样可以让虚拟机的硬盘性能达到最好:
cpu类别建议选择host,并且启用numa,其他根据自己的需要配置即可:
内存的设置这里就不截图详细说明了,建议给4g以上。
网络模型建议选择virtio半虚拟化,这样可以让虚拟机的网络性能达到最好:
由于我是ipv4+ipv6双栈,一个网卡只处理一种协议,之前的vmbr0只处理ipv6,所以这里等机器创建好以后继续添加一个vmbr1的网卡来支持ipv4:
关于网络这块的配置可以参考我这文章二:
接下来还需要添加一个cd/dvd驱动器来挂载之前下载的virtio驱动,由于我们之前在创建虚拟机的时候,硬盘和网卡都设置的是virtio模型,所以这里必须要用到virtio的驱动,否则在安装的时候系统识别不到硬盘和网络:
全部设置好了后,启动虚拟机,打开vnc控制台在看到proxmox的logo时按回车进入windows的安装界面:
不出意外的话,在硬盘分区这一步的时候windows安装程序会提示找不到任何硬盘,此时点击加载驱动程序:
浏览virtio-win这个驱动器,找到里面的目录amd64/w10:
即可安装硬盘驱动:
此时可以看到硬盘能够识别了,但别急着分区,还是点击加载驱动程序:
和之前一样浏览virtio-win驱动器,找到netkvm/w10/amd64目录:
安装网卡驱动:
然后又会回到硬盘分区那里,此时virtio硬盘驱动和网卡驱动均已安装完成,一直下一步即可完成安装。
win11的网络配置,打开设置-网络和internet-以太网:
里面会有两个网络,第一个网络实际对应vmbr0,第二个网络实际对应vmbr1:
第一个网络是用来支持ipv6的,由于我之前配置radvd的时候忘记配置dns了,所以这里radvd虽然自动分配了ipv6地址,但是没有配置dns,手动加个dns地址即可:
第二个网络是用来支持ipv4的,这里全部手动配置一下即可:
嫌麻烦的话也可以在母鸡装个dhcp服务,这里就不介绍了,以前水过文章的。。
在系统安装的时候只装了硬盘和网卡驱动,现在把剩下没有安装的驱动全部安装上。
打开virtio-win驱动器,双击virtio-win-gt-x64开始安装:
在之前创建虚拟机的时候勾选了qemu代理,为了这个功能能够正常使用,你还需要双击virtio-win-guest-tools来安装qemu代理:
验证qemu代理是否正常,可以在pve面板看到虚拟机的网络信息:
qemu代理主要的作用:
https://pve.proxmox.com/wiki/Qemu-guest-agent
最后吐槽一下这个win11,这系统我感觉现在还不太适合升级,我这才在虚拟机装了试了一下就碰到一个巨搞笑的bug,刚才那个网络配置的界面,会莫名其妙自动切换网络配置文件类型,也就是从公开-专用,又从专用-公开,自己这样来回切,我也是佛了,这样切来切去是小事,但是切到专用网的话远程桌面会断,导致只能从vnc里面进去把这个界面关了才行。。
可能这样描述不太清楚,咱来个gif欣赏一下,我鼠标键盘键盘可是完全没动的:
转载原文:
1、https://lala.im/8123.html
2、https://lala.im/8145.html
3、https://lala.im/8163.html