mirror of
https://github.com/vdsm/virtual-dsm.git
synced 2025-11-06 01:54:52 +08:00
Compare commits
3 Commits
138742c953
...
fefe1af9e6
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
fefe1af9e6 | ||
|
|
87a8cf7513 | ||
|
|
7f31cb6023 |
@ -507,12 +507,11 @@ addDevice () {
|
|||||||
physical="${physical%% *}"
|
physical="${physical%% *}"
|
||||||
|
|
||||||
if [ -n "$physical" ]; then
|
if [ -n "$physical" ]; then
|
||||||
if [[ "$physical" == "512" || "$physical" == "4096" ]]; then
|
if [[ "$physical" != "512" ]]; then
|
||||||
if [[ "$physical" == "4096" ]]; then
|
sectors=",logical_block_size=$logical,physical_block_size=$physical"
|
||||||
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
|
fi
|
||||||
else
|
|
||||||
warn "Unknown physical sector size: $physical for $DISK_DEV"
|
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
warn "Failed to determine the sector size for $DISK_DEV"
|
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)}')
|
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"
|
[[ "$DEBUG" == [Yy1]* ]] && info "Detected NIC: $NIC"
|
||||||
error "This container does not support host mode networking!" && exit 29
|
error "This container does not support host mode networking!" && exit 29
|
||||||
fi
|
fi
|
||||||
|
|||||||
@ -126,8 +126,8 @@ cpu() {
|
|||||||
cpu="${cpu// [0-9] Core}"
|
cpu="${cpu// [0-9] Core}"
|
||||||
cpu="${cpu// [0-9][0-9] Core}"
|
cpu="${cpu// [0-9][0-9] Core}"
|
||||||
cpu="${cpu// [0-9][0-9][0-9] Core}"
|
cpu="${cpu// [0-9][0-9][0-9] Core}"
|
||||||
cpu="${cpu// [0-9]th Gen}"
|
cpu="${cpu//[0-9]th Gen }"
|
||||||
cpu="${cpu// [0-9][0-9]th Gen}"
|
cpu="${cpu//[0-9][0-9]th Gen }"
|
||||||
cpu="${cpu// Processor/}"
|
cpu="${cpu// Processor/}"
|
||||||
cpu="${cpu// Quad core/}"
|
cpu="${cpu// Quad core/}"
|
||||||
cpu="${cpu// Dual core/}"
|
cpu="${cpu// Dual core/}"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user