mirror of
https://github.com/vdsm/virtual-dsm.git
synced 2025-11-07 02:23:42 +08:00
Compare commits
3 Commits
v7.39
...
fefe1af9e6
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
fefe1af9e6 | ||
|
|
87a8cf7513 | ||
|
|
7f31cb6023 |
@@ -507,12 +507,11 @@ addDevice () {
|
||||
physical="${physical%% *}"
|
||||
|
||||
if [ -n "$physical" ]; then
|
||||
if [[ "$physical" == "512" || "$physical" == "4096" ]]; then
|
||||
if [[ "$physical" == "4096" ]]; then
|
||||
sectors=",logical_block_size=$logical,physical_block_size=$physical"
|
||||
if [[ "$physical" != "512" ]]; then
|
||||
sectors=",logical_block_size=$logical,physical_block_size=$physical"
|
||||
if [[ "$physical" != "4096" && "$physical" != "32768" ]]; then
|
||||
warn "Unknown physical sector size: $physical for $DISK_DEV"
|
||||
fi
|
||||
else
|
||||
warn "Unknown physical sector size: $physical for $DISK_DEV"
|
||||
fi
|
||||
else
|
||||
warn "Failed to determine the sector size for $DISK_DEV"
|
||||
|
||||
@@ -395,7 +395,7 @@ getInfo() {
|
||||
|
||||
NIC=$(ethtool -i "$VM_NET_DEV" | grep -m 1 -i 'driver:' | awk '{print $(2)}')
|
||||
|
||||
if [[ "${NIC,,}" != "veth" ]]; then
|
||||
if [[ "${NIC,,}" != "veth" && "${NIC,,}" != "macvlan" ]]; then
|
||||
[[ "$DEBUG" == [Yy1]* ]] && info "Detected NIC: $NIC"
|
||||
error "This container does not support host mode networking!" && exit 29
|
||||
fi
|
||||
|
||||
@@ -126,8 +126,8 @@ cpu() {
|
||||
cpu="${cpu// [0-9] Core}"
|
||||
cpu="${cpu// [0-9][0-9] Core}"
|
||||
cpu="${cpu// [0-9][0-9][0-9] Core}"
|
||||
cpu="${cpu// [0-9]th Gen}"
|
||||
cpu="${cpu// [0-9][0-9]th Gen}"
|
||||
cpu="${cpu//[0-9]th Gen }"
|
||||
cpu="${cpu//[0-9][0-9]th Gen }"
|
||||
cpu="${cpu// Processor/}"
|
||||
cpu="${cpu// Quad core/}"
|
||||
cpu="${cpu// Dual core/}"
|
||||
|
||||
Reference in New Issue
Block a user