Global (not local) ISO repositiry, not possible?
-
Hello,
In VMware vCenter one can mount a NFS share as a data store available to ALL hosts. I have done this and put all my ISOs I use to create new VMs with.
Is there no way to do this in XO short of creating a "local" ISO NFS storage repository on each host? I only have 3 hosts now but I'd like to have a dozen at some point.
It sure would be nice to have a global NFS ISO repository in XO.
Comments anyone?
Regards.
-
@Kajetan321 Hello!
You can find how to make NFS ISO repository here: https://xcp-ng.org/docs/storage.html#iso-sr
If you want a quickly "how to" create the NFS for ISO SR, here's my notes (on Debian 11):
fdisk /dev/xvdb mkfs.ext4 -b 4096 /dev/xvdb1 apt install nfs-kernel-server mkdir /ISOs mount /dev/xvdb1 /ISOs emacs /etc/exports /ISOs 192.168.X.0/24(rw,sync,no_subtree_check,no_root_squash) exportfs -arv
Don't forget to add /dev/xvdb1 to fstab
-
@AtaxyaNetwork So on the link you provided there is a warning on a yellow background that reads:
WARNING The ISO SR will be only available on the host where you have created the directory.
That is pretty much the opposite of what I'm trying to achieve.
If I understand your command lines, this is for setting up a NFS server on a Linux box. I already have the NFS server setup and working on a Synology NAS.
I think we misunderstood each other
-
@Kajetan321 Ok, I think my PR made things more confusing ^^
This warning is only valid for local ISO SR, the one you create with
mkdir -p /opt/var/iso_repository
NFS ISO SR is available on all host on the same pool.
@olivierlambert can confirm if my right, and I will update the doc tomorrow
If you have already a NFS share ready, you can go to New/Storage, and add it
-
@Kajetan321 You should be able to create a new SR in the Xen Orchestra GUI.
New -> Storage -> NFS ISO
Even though you're attaching it to a single host it'll be available on the pool just like an NFS SR for VMs. You might need to go to the SR itself in Home -> Storage -> SR-> Hosts and then manually connect it
-
Thank you guys for replying, I do appreciate it. I don't think I explained what I'm after very well. I know that you can create a local to the host ISO SR that resides on a NFS share somewhere. This is not a problem. I understand I can then repeat this on the next host.
For a moment, let's pretend you have 200 hosts. You will need to do this 200 times at first (once on each host). You will also need to do this 200 time anytime you want to change where that share resides.
What I suggesting is a new capability (because it looks like this is not possible right now) where you can create a global ISO SR repository (like a remote) that then all hosts will be able to see as such without editing each host. This already works for NFS remotes, where you setup the NFS parameters once and then all hosts can see the repository (from drop down lists).
Another way of putting it, please add the capability of designating a remote as an ISO SR. Maybe that is how I should have stated it from the beginning.
Cheers.
-
@Kajetan321 So you're looking for a cross-pool ISO store if I'm reading this right?
-
I’m still confused what is asked here and how it’s supposed to work NFS ISO repository works exactly as described, all hosts in the pool should be able to access it once configured (once), no matter how many hosts there are. For separate pools it needs to be added individually.
There are terms like remote and SR mixed here which have nothing to do with each other which is a bit confusing. Remote is a thing purely in Xen Orchestra and SR is something you configure to XCP-ng/Xenserver hosts via XO or other means.
-
@gsrfan01 Yes please
-
It already works this way. You can connect one NFS share (ISO) to any number of pools. It works very well.
So I'm not sure to understand the issue
-
@ronivay @olivierlambert So ISO stores are across pool. OK, that makes sense (somehow I figured they would need to be configured on each host in a pool). In my test setup I have only one host per pool right now.
Ultimately it would be great (in my opinion) to have an across pool ISO store, like @gsrfan01 is saying.
-
@Kajetan321 I think there is a misunderstanding how the ISO repository works vs. the XO remotes.
The remotes on XO are connected to XO and not XCP. XO used them for backups, etc.
The ISO repository is connected to each XCP host server. You can't use an ISO on XCP that is accessible only by XO. So if XO has access to the ISOs it won't help because XCP needs direct access to them.
When you use an ISO to boot or mount in a VM it needs to be accessible to the XCP host and not the XO system.
So if you have a pool of 200 XCP hosts then you add the ISO repository (NFS share) to the pool once.
If you have 200 XCP hosts (not a pool of 200) then you need to add the shared ISO to each XCP host (or each pool that's a group of hosts).
Just script adding it to the servers.
-
@Andrew Thank you for the clarification.
-
@AtaxyaNetwork said in Global (not local) ISO repositiry, not possible?:
@Kajetan321 Ok, I think my PR made things more confusing ^^
This warning is only valid for local ISO SR, the one you create with
mkdir -p /opt/var/iso_repository
NFS ISO SR is available on all host on the same pool.
@olivierlambert can confirm if my right, and I will update the doc tomorrow
If you have already a NFS share ready, you can go to New/Storage, and add it
The documention is indeed not very clear, as the bigger part of the section is dedicated to a special case and very little is said about NFS and SMB ISO SRs, which are the most common use.
I re-read it, and didn't understand the logic. There's talk about shared SRs then local then shared again
The section should probably follow a structure like this instead:
- Foreword: what are they, why you need them, the different kinds that exist (shared - recommended, or local)
- Shared ISO SRs (NFS or SMB): how to use them. Pointers to setup one, but not in details: links to existing guides related to SMB and NFS + a few words on the common gotchas (ACLs?)
- Local ISO SR: how to create one.
-
@stormi Yeah, seems better this way ^^
I will try to write a draft in the next few days to update the documentation