mirror of
https://github.com/vdsm/virtual-dsm.git
synced 2025-11-10 20:13:41 +08:00
Compare commits
4 Commits
8fb6f1f9ad
...
v7.32
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0c7acd6e71 | ||
|
|
ad26129375 | ||
|
|
4e7822fedd | ||
|
|
4dfcbe4ab1 |
28
readme.md
28
readme.md
@@ -60,17 +60,6 @@ kubectl apply -f https://raw.githubusercontent.com/vdsm/virtual-dsm/refs/heads/m
|
|||||||
|
|
||||||
[`Click here to launch this container in the cloud!`](https://github.com/codespaces/new?skip_quickstart=true&machine=basicLinux32gb&repo=619260050&ref=master&devcontainer_path=.devcontainer.json)
|
[`Click here to launch this container in the cloud!`](https://github.com/codespaces/new?skip_quickstart=true&machine=basicLinux32gb&repo=619260050&ref=master&devcontainer_path=.devcontainer.json)
|
||||||
|
|
||||||
## Compatibility ⚙️
|
|
||||||
|
|
||||||
| **Product** | **Platform** | |
|
|
||||||
|---|---|---|
|
|
||||||
| Docker Engine | Linux | ✅ |
|
|
||||||
| Docker Desktop | Linux | ❌ |
|
|
||||||
| Docker Desktop | macOS | ❌ |
|
|
||||||
| Docker Desktop | Windows 11 | ✅ |
|
|
||||||
| Docker Desktop | Windows 10 | ❌ |
|
|
||||||
| Github Codespaces | Cloud | ✅ |
|
|
||||||
|
|
||||||
## FAQ 💬
|
## FAQ 💬
|
||||||
|
|
||||||
### How do I use it?
|
### How do I use it?
|
||||||
@@ -164,9 +153,16 @@ kubectl apply -f https://raw.githubusercontent.com/vdsm/virtual-dsm/refs/heads/m
|
|||||||
|
|
||||||
### How do I verify if my system supports KVM?
|
### How do I verify if my system supports KVM?
|
||||||
|
|
||||||
Only Linux and Windows 11 support KVM virtualization, macOS and Windows 10 do not unfortunately.
|
First check if your software is compatible using this chart:
|
||||||
|
|
||||||
You can run the following commands in Linux to check your system:
|
| **Product** | **Linux** | **Win11** | **Win10** | **macOS** |
|
||||||
|
|---|---|---|---|---|
|
||||||
|
| Docker CLI | ✅ | ✅ | ❌ | ❌ |
|
||||||
|
| Docker Desktop | ❌ | ✅ | ❌ | ❌ |
|
||||||
|
| Podman CLI | ✅ | ✅ | ❌ | ❌ |
|
||||||
|
| Podman Desktop | ✅ | ✅ | ❌ | ❌ |
|
||||||
|
|
||||||
|
After that you can run the following commands in Linux to check your system:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
sudo apt install cpu-checker
|
sudo apt install cpu-checker
|
||||||
@@ -181,11 +177,7 @@ kubectl apply -f https://raw.githubusercontent.com/vdsm/virtual-dsm/refs/heads/m
|
|||||||
|
|
||||||
- you are not using a cloud provider, as most of them do not allow nested virtualization for their VPS's.
|
- you are not using a cloud provider, as most of them do not allow nested virtualization for their VPS's.
|
||||||
|
|
||||||
If you do not receive any error from `kvm-ok` but the container still complains about KVM, please check whether:
|
If you did not receive any error from `kvm-ok` but the container still complains about a missing KVM device, it could help to add `privileged: true` to your compose file (or `sudo` to your `docker` command) to rule out any permission issue.
|
||||||
|
|
||||||
- you are not using "Docker Desktop for Linux" as it does not support KVM, instead make use of Docker Engine directly.
|
|
||||||
|
|
||||||
- it could help to add `privileged: true` to your compose file (or `sudo` to your `docker run` command), to rule out any permission issue.
|
|
||||||
|
|
||||||
### How do I assign an individual IP address to the container?
|
### How do I assign an individual IP address to the container?
|
||||||
|
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ set -Eeuo pipefail
|
|||||||
|
|
||||||
if [ -f "$STORAGE/dsm.ver" ]; then
|
if [ -f "$STORAGE/dsm.ver" ]; then
|
||||||
BASE=$(<"$STORAGE/dsm.ver")
|
BASE=$(<"$STORAGE/dsm.ver")
|
||||||
|
BASE="${BASE//[![:print:]]/}"
|
||||||
[ -z "$BASE" ] && BASE="DSM_VirtualDSM_69057"
|
[ -z "$BASE" ] && BASE="DSM_VirtualDSM_69057"
|
||||||
else
|
else
|
||||||
# Fallback for old installs
|
# Fallback for old installs
|
||||||
|
|||||||
@@ -399,6 +399,7 @@ getInfo() {
|
|||||||
if [ -z "$VM_NET_MAC" ]; then
|
if [ -z "$VM_NET_MAC" ]; then
|
||||||
local file="$STORAGE/dsm.mac"
|
local file="$STORAGE/dsm.mac"
|
||||||
[ -s "$file" ] && VM_NET_MAC=$(<"$file")
|
[ -s "$file" ] && VM_NET_MAC=$(<"$file")
|
||||||
|
VM_NET_MAC="${VM_NET_MAC//[![:print:]]/}"
|
||||||
if [ -z "$VM_NET_MAC" ]; then
|
if [ -z "$VM_NET_MAC" ]; then
|
||||||
# Generate MAC address based on Docker container ID in hostname
|
# Generate MAC address based on Docker container ID in hostname
|
||||||
VM_NET_MAC=$(echo "$HOST" | md5sum | sed 's/^\(..\)\(..\)\(..\)\(..\)\(..\).*$/02:11:32:\3:\4:\5/')
|
VM_NET_MAC=$(echo "$HOST" | md5sum | sed 's/^\(..\)\(..\)\(..\)\(..\)\(..\).*$/02:11:32:\3:\4:\5/')
|
||||||
|
|||||||
@@ -10,19 +10,20 @@ set -Eeuo pipefail
|
|||||||
: "${DEF_MODEL:="qemu64"}"
|
: "${DEF_MODEL:="qemu64"}"
|
||||||
|
|
||||||
CLOCKSOURCE="tsc"
|
CLOCKSOURCE="tsc"
|
||||||
[[ "${ARCH,,}" == "arm64" ]] && CLOCKSOURCE="arch_sys_counter"
|
[[ "${ARCH,,}" == "arm64" ]] && CLOCKSOURCE="arch_sys_counter"
|
||||||
CLOCK="/sys/devices/system/clocksource/clocksource0/current_clocksource"
|
CLOCK="/sys/devices/system/clocksource/clocksource0/current_clocksource"
|
||||||
|
|
||||||
if [ ! -f "$CLOCK" ]; then
|
if [ ! -f "$CLOCK" ]; then
|
||||||
warn "file \"$CLOCK\" cannot not found?"
|
warn "file \"$CLOCK\" cannot not found?"
|
||||||
else
|
else
|
||||||
result=$(<"$CLOCK")
|
result=$(<"$CLOCK")
|
||||||
|
result="${result//[![:print:]]/}"
|
||||||
case "${result,,}" in
|
case "${result,,}" in
|
||||||
"${CLOCKSOURCE,,}" ) ;;
|
"${CLOCKSOURCE,,}" ) ;;
|
||||||
"kvm-clock" ) info "Nested KVM virtualization detected.." ;;
|
"kvm-clock" ) info "Nested KVM virtualization detected.." ;;
|
||||||
"hyperv_clocksource_tsc_page" ) info "Nested Hyper-V virtualization detected.." ;;
|
"hyperv_clocksource_tsc_page" ) info "Nested Hyper-V virtualization detected.." ;;
|
||||||
"hpet" ) warn "unsupported clock source detected: '$result'. Please set host clock source to '$CLOCKSOURCE'" ;;
|
"hpet" ) warn "unsupported clock source detected: '$result'. Please set host clock source to '$CLOCKSOURCE'." ;;
|
||||||
*) warn "unexpected clock source detected: '$result'. Please set host clock source to '$CLOCKSOURCE'" ;;
|
*) warn "unexpected clock source detected: '$result'. Please set host clock source to '$CLOCKSOURCE'." ;;
|
||||||
esac
|
esac
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user