-
Notifications
You must be signed in to change notification settings - Fork 17
Expand file tree
/
Copy pathdrive-passtrough.sh
More file actions
29 lines (21 loc) · 835 Bytes
/
drive-passtrough.sh
File metadata and controls
29 lines (21 loc) · 835 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#!/bin/bash
# Tonton Jo - 2020
# Join me on Youtube: https://www.youtube.com/c/TontonJo
# Script aimed to help pass a disk directly to a VM
varversion=1.0
#V1.0: Initial Release - proof of concept
# USAGE
# You can run this scritp directly using:
# wget -q -O drive-passtrough.sh https://raw.githubusercontent.com/Tontonjo/proxmox/master/drive-passtrough.sh
# bash drive-passtrough.sh
echo "----------------------------------------------------------------"
echo "Tonton Jo - 2020"
echo "Proxmox drive passtrough helper"
echo "----------------------------------------------------------------"
echo "Target VM ID (100): "
read 'varvmid'
echo "Target virtual drive ID (scsi1, sata2, ide3): "
read 'vardriveid'
echo "Drive to pass trough? (/dev/sda - /dev/disk/by-id/yyyy): "
read 'vardrive'
qm set $varvmid -$vardriveid $vardrive