Skip to content
Closed
Show file tree
Hide file tree
Changes from 17 commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@
// Use 'postCreateCommand' to run commands after the container is created
"postCreateCommand": "bash .devcontainer/setup.sh",

// Runs each time the container starts/restarts and set kvm permissions
"postStartCommand": "bash .devcontainer/setup.sh",

"customizations": {
"vscode": {
"extensions": [
Expand Down
8 changes: 8 additions & 0 deletions .devcontainer/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,11 @@
# Change device ownership
sudo chown -R $REMOTE_USER:$REMOTE_GROUP $DEVICE

# Check for the KVM device and adjust permissions.
if [ -e /dev/kvm ]; then
sudo chown root:kvm /dev/kvm
sudo chmod 660 /dev/kvm
sudo usermod -aG kvm vscode
else
echo 'KVM device not found, skipping...'
fi