Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Gentoo guest VMware
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
alal
n00b
n00b


Joined: 22 Apr 2016
Posts: 17
Location: Russia

PostPosted: Mon Mar 20, 2017 6:19 am    Post subject: Gentoo guest VMware Reply with quote

Hello!

I need to make several VMware guest machines on the same computer for testing.
When installing gentoo, a lot of space is required for compilation.
How can I minimize the size of the disks under the guest systems?

I think I can make one big partition for compilation, and periodically connect it to one machine, then to another one for a time when I need to install / update packages. Is there any other option?
The problem is that on my PC only 100GB of space, and I need 10 VMs running at the same time.

If this is important, wmvare starts from Windows 7
Back to top
View user's profile Send private message
massimo
Veteran
Veteran


Joined: 22 Jun 2003
Posts: 1226

PostPosted: Mon Mar 20, 2017 8:00 am    Post subject: Reply with quote

You could prepare/update/... one VM and then create 9 so-called Linked Clones which share disk space and therefore save you some disk space.
_________________
Hello 911? How are you?
Back to top
View user's profile Send private message
szatox
Advocate
Advocate


Joined: 27 Aug 2013
Posts: 3150

PostPosted: Mon Mar 20, 2017 10:54 pm    Post subject: Reply with quote

Some hints:

Start with one gentoo: extract stage3, enable FEATURES: buildpkg, binpkg-multi-instance, set use flags you need, etc. Rebuild the whole world; you can update at the same time: emerge -euDN @world
Once you're done with compilation, create /etc/portage/package.provided and put there packages from @system you don't need in the final image. Say, you don't need gcc. You don't need portage. You don't need kernel headers or sources. Basically, you don't need anything that makes it gentoo in the final build. Hell, you don't even need kernel there (though modules _may_ be handy, depending on how good you are with building monolithic kernel ;) )

And... Use what you prepared to build a striped version:
emerge --root=</path/to/your/new/build/target/directory> [ --config-root=/ ] -ek --root-deps=rdeps @world

By removing pieces with package.provided you will get a frozen system you can't easily update, but by installing the things you need into that medium stage you will also pull runtime dependencies into the final image, so you can at least run programs you wanted there in the first place. And since you don't have gentoo toolchain inside, no portage tree, no sources and other stuff needed for maintenance, you will save a good chunk of space. The final directory tree will be much smaller than "regular". You can use it to your advantage to build smaller disk image.
And if you happen to use LVM, you can also consider keeping that image as a master copy and working on LVM snapshots instead. This way all images will share unchanged blocks. As this image is unmaintainable by design, blocks occupied by executables will never change, so you only have to worry about the "empty" space inside.

Obviously you will need chroot now and then. I'm leaving finding out when as an exercise for the reader :lol:
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum