Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I am running an arch linux system and want to host a few arch linux VMs.

For installing and updating the VMs they need access to the arch package repository which is usually achieved by a direct network connection to the official arch servers.

In my situation this would result in downloading the same packages again and again for my host and all the VMs.

Is there a good way to cache those packages locally to avoid downloading them again?

share|improve this question
    
You could create your own local package repository, modelled on how your distribution does it. I don't use Arch, so can't offer any details. –  Faheem Mitha Jan 18 at 11:41

2 Answers 2

up vote 2 down vote accepted

Using a local repository is definitely a good option, but there is a tool made almost exactly for this scenario that you may want to contemplate using.

The tool in question, pacserve, was created specifically to allow sharing packages downloaded to one Arch rig with others on the same network to speed up the transfer and cut-down on bandwidth usage (I imagine getting it to work with VMs shouldn't be that difficult). It is in the ALUR along with one other dependency that is not in the official repos. Give it a shot!

share|improve this answer

There're many ways to do it.

One simple solution is create a NFS server and mount them on all your client VMs, so they fetch both package files and the package database files from the exported NFS directory.

See the official wiki for instructions

share|improve this answer
    
What is this alsync they are talking about? I couldn't find any command like that. –  michas Jan 18 at 13:48
    
What file does this serverip/network configuration refer to? –  michas Jan 18 at 13:53

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.