0

From redhat documentation:

A guest virtual machine installed on shared storage using one of the following protocols:
 Fibre Channel-based LUNs
 iSCSI
 FCoE
 NFS
SCSI RDMA protocols (SCSI RCP): the block export protocol used in Infiniband and 
10GbE iWARP adapters

Till now I simply created an iscsi target leading to a .dsk file which was the VM's hard disk. Problem is that now I'd like to have a central server hosting .dsk files so that, installing a custom program on it, I could generate new vms by simply copying these .dsk files.

In short: I'd like to implement an on demand VM creation, generating their hard disks by simply copying files.

So, my idea would be to set the VM's disk to

<source file='<network file system root path/aVMImage.dsk'/>

Is it possible to do something like that? And would live migration still work?

user2358943
  • 105
  • 1
  • 3

1 Answers1

0

Have your central storage server export the directory of disk images over NFS. The servers running the VMs can access the disk images using the Network Filesystem backend for libvirt storage pools, or you can perform the NFS mount yourself and use the directory backend. Migration should work.

sciurus
  • 12,493
  • 2
  • 30
  • 49
  • I will try and let you know, it seems a good idea! Have you any easy to set up nfs server implementation for linux to suggest to me? (i am using ubuntu) – user2358943 Apr 01 '14 at 19:09
  • See https://help.ubuntu.com/12.04/serverguide/network-file-system.html – sciurus Apr 01 '14 at 19:26
  • It seems it requires a subnet...but this storage should be accessed by anyone throught the internet. I'll add some sort of authentication (saw it supports kerberos and ldap), but I don't want to put a limitation on the ips who can access to my nfs... – user2358943 Apr 03 '14 at 16:30
  • "this storage should be accessed by anyone throught the internet". That sounds unusual and dangerous. Why shouldn't the IPs should be limited to your virtualization hosts? – sciurus Apr 03 '14 at 19:31
  • Because my hypervisors are not on the same local network. If an hypervisor wants to associate a disk image, present on my image storage server, to his vm he has to be allowed to do so. – user2358943 Apr 04 '14 at 13:14
  • Even though they're not on the local network you still know the IP addresses of your hypervisors, right? – sciurus Apr 06 '14 at 17:05
  • yes but as it is for a thesis project I don't have any registered IP address so they just change according to my ISP...oh well * wildcard will do, your answer is correct :) – user2358943 Apr 07 '14 at 18:16