Skip to content

Instantly share code, notes, and snippets.

@mean-cj
Created June 13, 2019 07:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mean-cj/c8329bf339391501070f6947c3fe1998 to your computer and use it in GitHub Desktop.
Save mean-cj/c8329bf339391501070f6947c3fe1998 to your computer and use it in GitHub Desktop.
Proxmox - Physical disk to kvm, Source: https://pve.proxmox.com/wiki/Physical_disk_to_kvm
# Install if lshw not found
apt-get update
apt install lshw
# Check disk info
lshw -class disk -class storage
# Do this again for every disk
qm set <disk_id> -virtio<number from 2 to 999, remember that you cannot use 1!> /dev/disk/by-id/<disk_long_id>
# (this prints: update VM <disk_id> -virtio2 /dev/disk/by-id/<disk_long_id>)
# Check if it did work
cat /etc/pve/qemu-server/<disk_id>.conf
# (output is something like this:
# virtio2: /dev/disk/by-id/<disk_long_id>,size=1953514584K
# virtio3: /dev/disk/by-id/<disk_long_id>,size=2930266584K
# virtio4: /dev/disk/by-id/<disk_long_id>,size=2930266584K
# )
# As always when you change the hardware for a KVM guest, do a poweroff and a start (reboot is not enough).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment