小主机

蓝枫
2022-05-02 / 0 评论 / 46 阅读 / 正在检测是否收录...

安装PVE

PVE直通

Intel CPU

shell里面输入命令:

nano /etc/default/grub

在里面找到:

GRUB_CMDLINE_LINUX_DEFAULT="quiet"

然后修改为

GRUB_CMDLINE_LINUX_DEFAULT="quiet intel_iommu=on"

在更新一下

update-grub

重启一下

reboot

添加内核模块

修改文件 /etc/modules 加入如下的行(默认为空):

vfio
vfio_iommu_type1
vfio_pci
vfio_virqfd

PVE升级

  1. 后台选择 更新 选择 存储库
  2. 选择 enterprise.proxmox.com/debian/pve 点击 禁用
  3. 添加 No-Subscription 然后会增加一个download.proxmox.com/debian/pve 即为成功
  4. 选择 更新 点击 升级
  5. 等待完成即可

PVE设置WIFI

​ 参考文章pve热点方案

  1. 查看无线网卡是否被检测到 lspci -nn
  2. 查看无线网卡调用的设备模块 lspci -k -nn -d 168c:0042 其中"168c:0042"是上一条指令出来的编码
  3. 查看无线网卡驱动是不是正常加载名称 ip link show
  4. 无线安装需要模块 apt-get install iw net-tools wireless-tools
  5. 查看是否支持AP iw list | grep -A 30 'Frequencies:'
  6. 查看是否支持多SSID iw list | grep -A 2 'valid interface combinations'
  7. 安装热点包 apt-get install hostapd
  8. 输入 nano /etc/default/hostapd 编辑文件,添加 DAEMON_CONF="/etc/hostapd/hostapd.conf"(配置文件位置)
  9. hostpad介绍 配置文件如下:备用网址 用vim编辑/etc/hostapd/hostapd.conf添加以下内容后保存
# pve bridge
bridge=vmbr0

# AP netdevice name (without 'ap' postfix, i.e., wlan0 uses wlan0ap for
# management frames); ath0 for madwifi
interface=wlp1s0

# Driver interface type (hostap/wired/madwifi/test/none/nl80211/bsd);
# default: hostap). nl80211 is used with all Linux mac80211 drivers.
# Use driver=none if building hostapd as a standalone RADIUS server that does
# not control any wireless/wired driver.
driver=nl80211

# SSID to be used in IEEE 802.11 management frames
ssid=MyWiFi

# Operation mode (a = IEEE 802.11a, b = IEEE 802.11b, g = IEEE 802.11g,
# ad = IEEE 802.11ad (60 GHz); a/g options are used with IEEE 802.11n, too, to
# specify band)
# Default: IEEE 802.11b
hw_mode=g

wme_enabled=1
ieee80211n=1
ht_capab=[HT40+][SHORT-GI-40][DSSS_CCK-40]

# Channel number (IEEE 802.11)
# (default: 0, i.e., not set)
# Please note that some drivers do not use this value from hostapd and the
# channel will need to be configured separately with iwconfig.
#
# If CONFIG_ACS build option is enabled, the channel can be selected
# automatically at run time by setting channel=acs_survey or channel=0, both of
# which will enable the ACS survey based algorithm.
channel=1

# Station MAC address -based authentication
# Please note that this kind of access control requires a driver that uses
# hostapd to take care of management frame processing and as such, this can be
# used with driver=hostap or driver=nl80211, but not with driver=madwifi.
# 0 = accept unless in deny list
# 1 = deny unless in accept list
# 2 = use external RADIUS server (accept/deny lists are searched first)
macaddr_acl=0

# IEEE 802.11 specifies two authentication algorithms. hostapd can be
# configured to allow both of these or only one. Open system authentication
# should be used with IEEE 802.1X.
# Bit fields of allowed authentication algorithms:
# bit 0 = Open System Authentication
# bit 1 = Shared Key Authentication (requires WEP)
auth_algs=3

# Send empty SSID in beacons and ignore probe request frames that do not
# specify full SSID, i.e., require stations to know SSID.
# default: disabled (0)
# 1 = send empty (length=0) SSID in beacon and ignore probe request for
#     broadcast SSID
# 2 = clear SSID (ASCII 0), but keep the original length (this may be required
#     with some clients that do not support empty SSID) and ignore probe
#     requests for broadcast SSID
ignore_broadcast_ssid=0

# Enable WPA. Setting this variable configures the AP to require WPA (either
# WPA-PSK or WPA-RADIUS/EAP based on other configuration). For WPA-PSK, either
# wpa_psk or wpa_passphrase must be set and wpa_key_mgmt must include WPA-PSK.
# Instead of wpa_psk / wpa_passphrase, wpa_psk_radius might suffice.
# For WPA-RADIUS/EAP, ieee8021x must be set (but without dynamic WEP keys),
# RADIUS authentication server must be configured, and WPA-EAP must be included
# in wpa_key_mgmt.
# This field is a bit field that can be used to enable WPA (IEEE 802.11i/D3.0)
# and/or WPA2 (full IEEE 802.11i/RSN):
# bit0 = WPA
# bit1 = IEEE 802.11i/RSN (WPA2) (dot11RSNAEnabled)
wpa=2

# WPA pre-shared keys for WPA-PSK. This can be either entered as a 256-bit
# secret in hex format (64 hex digits), wpa_psk, or as an ASCII passphrase
# (8..63 characters) that will be converted to PSK. This conversion uses SSID
# so the PSK changes when ASCII passphrase is used and the SSID is changed.
# wpa_psk (dot11RSNAConfigPSKValue)
# wpa_passphrase (dot11RSNAConfigPSKPassPhrase)
# wpa_psk=0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef
wpa_passphrase=toseeyou

# Set of accepted key management algorithms (WPA-PSK, WPA-EAP, or both). The
# entries are separated with a space. WPA-PSK-SHA256 and WPA-EAP-SHA256 can be
# added to enable SHA256-based stronger algorithms.
# (dot11RSNAConfigAuthenticationSuitesTable)
# wpa_key_mgmt=WPA-PSK WPA-EAP
wpa_key_mgmt=WPA-PSK

# Set of accepted cipher suites (encryption algorithms) for pairwise keys
# (unicast packets). This is a space separated list of algorithms:
# CCMP = AES in Counter mode with CBC-MAC [RFC 3610, IEEE 802.11i/D7.0]
# TKIP = Temporal Key Integrity Protocol [IEEE 802.11i/D7.0]
# Group cipher suite (encryption algorithm for broadcast and multicast frames)
# is automatically selected based on this configuration. If only CCMP is
# allowed as the pairwise cipher, group cipher will also be CCMP. Otherwise,
# TKIP will be used as the group cipher.
# (dot11RSNAConfigPairwiseCiphersTable)
# Pairwise cipher for WPA (v1) (default: TKIP)
# wpa_pairwise=TKIP CCMP
wpa_pairwise=TKIP

# Pairwise cipher for RSN/WPA2 (default: use wpa_pairwise value)
rsn_pairwise=CCMP
  1. 调试 hostapd /etc/hostapd/hostapd.conf 测试是否能收到WIFI
  2. 桥接无线网卡,直接到网络设置操作
  3. 如果您启停hostapd服务出现类似Failed to start hostapd.service: Unit hostapd.service is masked.等错误,请执行下面命令。
systemctl unmask hostapd
systemctl enable hostapd
systemctl start hostapd

更换更新源

pvetools

安装ROS

官网下载chr版本,使用帐号登陆激活试用

安装 OpenWRT

双软路由方案

旁路由

将ROS的DHCP服务器网关设置成OpenWRT的IP,OpenWRT关闭DHCP,并将网关设置为ROS。ROS本身网关设置为光猫。

DHCP的DNS服务器设置为ROS,ROS将DNS设置为OpenWRT,并开启缓存。以便启用 AdGuard Home 的DNS。OpenWRT的DNS设置为外网的DNS 119.29.29.29等

OSPF通信路由表

OSPF在OpenWRT安装bird,但是bird的路由下一跳有问题(暂时不用)

黑群晖

安装6.2.3版本

隐藏启动盘

全盘映射

  1. 读取硬盘ID
ls /dev/disk/by-id
  1. 找到硬盘ID复制
  2. 输入
qm set 100 -sata1 /dev/disk/by-id/ata-WDC_WD10SPCX-24HWST1_WD-WXJ1AA5J8E18  

若返回以下值,说明成功

update VM 100: -sata1 /dev/disk/by-id/ata-WDC_XXXX_XXXX_XXXX

win10

需要加载的虚拟驱动

PVE安装win时,需要加载虚拟驱动盘,下载地址:

https://fedorapeople.org/groups/virt/virtio-win/direct-downloads/latest-virtio/virtio-win.iso

在安装时,如果找不到磁盘,加载虚拟光盘的这里:

光驱virtio-win.isovioscsiw10amd64

安装win成功后进系统打驱动

这一步很多教程都是进设备管理器,一个一个添加,其实不用,

直接运行光驱virtio-win-guest-tools.exe

会安装驱动

PVE安装win后,QEMU Guest Agent安装出现错误代码的解决方法

这个是镜像原因,一般精简的系统容易出现这个问题

guest agent还是比较重要的,安装成功才能的虚拟后台直接开关机系统。

windows打开空密码远程

虚拟机里面的win如果没有密码,一般远程时会提示错误,打开允许空密码远程就可以

“win+R”,输入GPEDIT.MSC,找到“计算机配置-WINDOWS设置-安全设置-本地策略-安全选项”

“帐户:使用空白密码的本地帐户只允许进行控制台登录”,将其设置为“已停用”。

0

评论 (0)

取消