systemctl unmask sleep.target
/etc/systemd/logind.conf
IdleAction=suspend
IdleActionSec=5min
发布时间:November 17, 2021 // 分类: // No Comments
systemctl unmask sleep.target
/etc/systemd/logind.conf
IdleAction=suspend
IdleActionSec=5min
发布时间:November 14, 2021 // 分类: // No Comments
下载Proxmox iso并制作initrd:
wget http://download.proxmox.com/iso/proxmox-ve_7.0-2.iso
wget https://raw.githubusercontent.com/morph027/pve-iso-2-pxe/master/pve-iso-2-pxe.sh
apt install zstd gzip genisoimage
bash pve-iso-2-pxe.sh proxmox-ve_7.0-2.iso
ipxe引导启动项:
#!ipxe
kernel http://192.168.1.8/pxeboot/linux26 ro vga=791 ramdisk_size=16777216 quiet splash=silent
initrd http://192.168.1.8/pxeboot/initrd
boot
发布时间:November 13, 2021 // 分类: // No Comments
Proxmox关机时要卡在关闭windows10虚拟机几分钟,日志提示错误:
QEMU[1792]: kvm: terminating on signal 15 from pid 92319 (task UPID:pve:0001689F:0002BF02:618E0218:qmshutdown:101
Proxmox默认通过ACPI关闭虚拟机,无效时可在虚拟机内安装guest-agent,并在Proxmox管理界面为虚拟机开启QEMU Guest Agent。
参考:
https://pve.proxmox.com/wiki/QEMU/KVM_ACPI_Guest_Shutdown
https://pve.proxmox.com/wiki/Qemu-guest-agent
https://pve.proxmox.com/wiki/Windows_VirtIO_Drivers
发布时间:November 11, 2021 // 分类: // No Comments
修改grub添加内核参数:
intel_iommu=on iommu=pt pci=assign-busses
查看支持多少个虚拟网卡:
cat /sys/class/net/enp5s0f1/device/sriov_totalvfs
开启虚拟数量:
echo 7 > /sys/class/net/enp5s0f0/device/sriov_numvfs
查看网卡名称与pci地址对应:
ls -l /sys/class/net/
列出所有网卡,可见虚拟网卡已识别。
创建虚拟机系统选择Q35,后续添加pci网卡时可设置为pcie。
CPU类别选择host,可使用AES。
创建虚拟机完毕后再添加PCI设备虚拟网卡。
LXC虚拟机使用虚拟网卡:
/etc/pve/lxc/100.conf
lxc.net.1.type: phys
lxc.net.1.link: enp5s0f0v5
lxc.net.1.name: eth1
lxc.net.1.flags: up
lxc.net.1.ipv4.address: 192.168.1.125/24
lxc.net.1.ipv4.gateway: 192.168.1.1
systemd开机设置虚拟网卡数量:
[Unit]
Description=sriov_numvfs
After=network.target
Before=pve-guests.service
[Service]
ExecStart=/usr/bin/bash -c '/usr/bin/echo 7 > /sys/class/net/enp5s0f0/device/sriov_numvfs'
Type=oneshot
[Install]
WantedBy=multi-user.target
发布时间:November 10, 2021 // 分类: // No Comments
查看网卡信息,发现网卡运行闪存固件的功能被禁用:
tar zxf preboot_26.6.tar.gz
cd APPS/BootUtil/
chmod +x Linux_x64/bootutil64e
./Linux_x64/bootutil64e
Port Network Address Location Series WOL Flash Firmware Version
==== =============== ======== ======= === ============================= =======
1 xxx 5:00.0 Gigabit YES FLASH Disabled
2 xxx 5:00.1 Gigabit N/A FLASH Disabled
查看闪存固件信息,可见固件内包含PXE功能:
./Linux_x64/bootutil64e -IMAGEVERSION -nic 1
Flash firmware on port 1
PXE v1.3.98
启用在端口1上运行闪存固件的功能:
./Linux_x64/bootutil64e -nic=1 -FLASHENABLE
重启系统就可以使用PXE引导了,查看网卡信息:
./Linux_x64/bootutil64e
Port Network Address Location Series WOL Flash Firmware Version
==== =============== ======== ======= === ============================= =======
1 xxx 5:00.0 Gigabit YES PXE 1.3.98
2 xxx 5:00.1 Gigabit N/A FLASH Disabled
查看preboot自带BootIMG.FLB固件版本信息:
./Linux_x64/bootutil64e -IMAGEVERSION -FILE BootIMG.FLB
Image versions in BootIMG.FLB
Combo Image Version Name 1.3082.0
Combo Rules v4.91.00
Clp-Loader Option ROM v3.1.30
40G Interface Module v1.0.88
iSCSI Option ROM v3.1.80
iSCSI Setup Option ROM v3.1.80
Intel(R) Boot Agent GE v1.5.89
Intel(R) Boot Agent XE v2.4.45
Intel(R) Boot Agent XE (X550) v2.4.45
Intel(R) Boot Agent I40E v1.1.31
Intel(R) Boot Agent CL v0.1.16
Intel(R) Boot Agent ICE v2.5.00
UEFI x64 PCI-E gigabit driver v9.7.06
UEFI x64 10 gigabit driver v8.1.00
UEFI x64 40 gigabit driver v4.8.08
UEFI x64 100 gigabit driver v3.0.11
更新PXE固件,未经测试。
./Linux_x64/bootutil64e -NIC=1 -up=pxe -FILE=BootIMG.FLB
开启WOL:
./Linux_x64/bootutil64e -nic 1 -WOLE
参考:
https://www.intel.cn/content/www/cn/zh/support/articles/000005790/software/manageability-products.html
https://maple52046.github.io/posts/enable-pxe-boot-on-intel-nic-under-rhel/