How to allow VMs to access external storage?

mpeters

New Member
Mar 20, 2013
8
0
1
Montreal, Canada
I have created several KVM vm's on Proxmox 2.3 host. I have a standalone Nas4Free server set up as a iScsi target with several luns.

I would like to give each of my vm's access to the external storage. I know that I can configure each vm to access storage directly on the server,
either thru' iScsi or NFS.

Is is possible to have the Proxmox host attach to the storage server, and then export fixed-size luns to each of the vm's (eg. each vm would see the external storage as a local disk device such as /dev/hda1) ???
 
For best performance, you can use scsi as virtual disk, with virtio scsi controller (in vm options).
It'll do scsi passthrough, and vm should see the lun in /dev/sda.


(note that it's work also if you choose ide, virtio, sata as virtual disk, but you won't see the lun)
 
Have you added the Lun as a disk to the VM in the 'Hardware' tab?

If so you can either do: dmesg | egrep -e 'vd\w:'
or: fdisk -l
 
@mir
AHA!!!

I followed your instructions and added a hard disk (VIRTIO1) to my test VM thru' the ProxMox 'Hardware' tab.

@spirit
Then I started the VM and voila, the device magically appeared in the Ubuntu guest as device /dev/vdb
I was able to format and mount the device within the guest. :D

Thanks to Mir and Spirit for both hitting the nail on the head.

Final Question:

What is the best practice in a Proxmox environment for provisioning external storage to the guests with live migration in mind?

For example:

a) guests can manage their own storage needs by connecting directly to storage servers using iSCSI, NFS, RDB, etc

b) provision storage to guests thru' Proxmox host using iSCSI passthrough (as I am now doing) or any other passthrough

c) your suggestions
 
@mir
AHA!!!

I followed your instructions and added a hard disk (VIRTIO1) to my test VM thru' the ProxMox 'Hardware' tab.

@spirit
Then I started the VM and voila, the device magically appeared in the Ubuntu guest as device /dev/vdb
I was able to format and mount the device within the guest.

Thanks to Mir and Spirit for both hitting the nail on the head.

Final Question:

What is the best practice in a Proxmox environment for provisioning external storage to the guests with live migration in mind?

For example:

a) guests should manage their own storage needs by connecting directly to storage servers using iSCSI, NFS, RDB, etc.

b) provision storage to guests thru' Proxmox host using iSCSI passthrough (as I am now doing) or any other passthrough.

c) your suggestions
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!