I have a requirement to create and maintain a minimal server installation for use as a Xen domain0 host. This would be a minimal and server-oriented thing with no gui and designed to be as small and quick to install as possible. What is the best way to do this? Thanks, Matt. -- This message posted from opensolaris.org
Matt wrote:> I have a requirement to create and maintain a minimal> server installation for use as a Xen domain0 host. > This would be a minimal and server-oriented thing with > no gui and designed to be as small and quick to install > as possible. What is the best way to do this? It really depends on what you mean by a minimal server installation. With the existing tool sets (xm, xend, and the opensolaris pkg tools), we require python which creates a good bit of bloat. Also intrd brings in perl which is a little more bloat.. And then the SDL support in qemu-dm brings in some X libs. And finally, the OpenSolaris packages need to be refactored.. Right now there are too many cross dependencies and packages which were combined which cause a lot of unneeded stuff to be pulled in. Unfortunately there is no way to tell pkg to ignore dependencies. But with all this, you still can create an image which is much smaller than the default... I have a script @ http://blogs.sun.com/mrj/resource/slim-guest-installer that you can play with... You would have to modify the package list to include the devices you need for your H/W and the xen packages. This isn''t supported by Sun of course... We are actively trying to make this better... But it''s going to take some time. MRJ
Meanwhile, is there something like a "jass" profile (like we saw for LDOMS) to make sure all the unneeded services are shut down and the dom0 is firewalled strongly using the built-in ipfilter FW? So far I disabled gdm, as that was obvious, then I enabled vtdaemon and vt2 which enabled a simple text login on the "graphical console" while the real console is /dev/ttya. I generally also disable rpc/bind and the host of other rpc services (unless they are needed for something?) Open Solaris comes out of the box a lot "slimmer" than Solaris 10 or NV, I am pretty impressed actually. Tommy On Nov 3, 2009, at 8:27 AM, Mark Johnson wrote:> > Matt wrote: >> I have a requirement to create and maintain a minimal > > server installation for use as a Xen domain0 host. > > This would be a minimal and server-oriented thing with > > no gui and designed to be as small and quick to install > > as possible. What is the best way to do this? > > It really depends on what you mean by a minimal > server installation. > > With the existing tool sets (xm, xend, and the > opensolaris pkg tools), we require python which > creates a good bit of bloat. > > Also intrd brings in perl which is a little more > bloat.. And then the SDL support in qemu-dm brings > in some X libs. > > And finally, the OpenSolaris packages need to be > refactored.. Right now there are too many cross > dependencies and packages which were combined which > cause a lot of unneeded stuff to be pulled in. > Unfortunately there is no way to tell pkg to > ignore dependencies. > > But with all this, you still can create an image > which is much smaller than the default... I have a > script @ > http://blogs.sun.com/mrj/resource/slim-guest-installer > > that you can play with... You would have to modify > the package list to include the devices you need for > your H/W and the xen packages. This isn''t supported > by Sun of course... > > We are actively trying to make this better... But it''s > going to take some time. > > > > MRJ > > _______________________________________________ > xen-discuss mailing list > xen-discuss@opensolaris.org
Thanks, Mark. I''ll take a look at your script. I suppose what I meant by ''minimal server installation'' is actually a combination of minimal in size and less disabling, configuring and securing of stuff immediately after install. I can cope with the ''disabling, configuring and securing of stuff'' for the most part. The bigger issue is that of all the packages which are installed by default and would not normally be used in a headless server environment. For my sins I''m coming from a Linux background where I tend to start off with very little and can easily script the installation and config of the packages you want. Are there any plans to provide OpenSolaris in server and desktop flavours (or an install option for minimal/server only)? The other option I have considered is perhaps to build and maintain one image which could be booted over iSCSI. Is that possible? Cheers, Matt. -- This message posted from opensolaris.org
Matt wrote:> Thanks, Mark. > > I''ll take a look at your script. > > I suppose what I meant by ''minimal server installation''> is actually a combination of minimal in size and less > disabling, configuring and securing of stuff immediately > after install.> > I can cope with the ''disabling, configuring and securing> of stuff'' for the most part. The bigger issue is that > of all the packages which are installed by default and > would not normally be used in a headless server environment. The script I sent will probably be good enough for you then... > For my sins I''m coming from a Linux background where I tend > to start off with very little and can easily script the > installation and config of the packages you want. yeah... OpenSolaris is heading in the right direction. The installer started off targeted for developers on desktops. I expect it to mature...> Are there any plans to provide OpenSolaris in server and> desktop flavours (or an install option for minimal/server only)? I''m not sure what the plans are...> The other option I have considered is perhaps to build> and maintain one image which could be booted over iSCSI. > Is that possible? Yes, iscsi boot is supported.. I have never done it so I can''t of be any help here. You need an adapter which supports it. MRJ
I suggest looking at the minimization.ksh script from the ISC project or, alternatively, tweak the JeOS project to work on bare metal I haven''t used Mark''s script, and so can not compare, but I had the following results with the minimization.ksh script: fresh 2009.06 install: 2.9G post minimization.ksh: 1.3G post image-update to b126: 1.9G post pkg install xvm-gui: 2.0G Kent Matt wrote:> I have a requirement to create and maintain a minimal server installation for use as a Xen domain0 host. This would be a minimal and server-oriented thing with no gui and designed to be as small and quick to install as possible. What is the best way to do this? > > Thanks, > > Matt. >
Kent Watsen wrote:> > I suggest looking at the minimization.ksh script from the ISC project > or, alternatively, tweak the JeOS project to work on bare metal > > I haven''t used Mark''s script, and so can not compare, but I had the > following results with the minimization.ksh script: > > fresh 2009.06 install: 2.9G > post minimization.ksh: 1.3G > post image-update to b126: 1.9G > post pkg install xvm-gui: 2.0GThe script I sent out is a script you run from a shell off the OpenSolaris install iso. http://blogs.sun.com/mrj/entry/installing_a_small_xvm_or It builds a xvm or vbox guest image @ around 380M for 2009.06. If you update to the latest builds, and remove the downloads, it jumps up to somewhere around 500M due to more dependency bloat... a dom0 would probably be 50-100M over that.. I have been playing with minimal opensolaris setups for a while now.. http://blogs.sun.com/mrj/entry/how_small_can_solaris_go1 I''ve been working (on the side) on a new script which will build up a new minimal BE (32 or 64-bit kernel) from scratch. It won''t have pkg or python on the BE, but you will be able to switch to activate it and use the grub menu to switch back. It should be < 100M for a 64-bit kernel (right now I''m at ~ 50M (32-bit kernel) but still need to get SMF and xbow to work, but I can ssh in and out). Unfortunately, I haven''t had much spare time to work on it the last couple of months.. MRJ> Kent > > > Matt wrote: >> I have a requirement to create and maintain a minimal server >> installation for use as a Xen domain0 host. This would be a minimal >> and server-oriented thing with no gui and designed to be as small and >> quick to install as possible. What is the best way to do this? >> >> Thanks, >> >> Matt. >> > > _______________________________________________ > xen-discuss mailing list > xen-discuss@opensolaris.org
Mark Johnson wrote:> > Kent Watsen wrote: >> >> I suggest looking at the minimization.ksh script from the ISC project >> or, alternatively, tweak the JeOS project to work on bare metal >> >> I haven''t used Mark''s script, and so can not compare, but I had the >> following results with the minimization.ksh script: >> >> fresh 2009.06 install: 2.9G >> post minimization.ksh: 1.3G >> post image-update to b126: 1.9G >> post pkg install xvm-gui: 2.0G > > The script I sent out is a script you run from a > shell off the OpenSolaris install iso. > http://blogs.sun.com/mrj/entry/installing_a_small_xvm_or > > It builds a xvm or vbox guest image @ around 380M > for 2009.06. If you update to the latest builds, > and remove the downloads, it jumps up to somewhere > around 500M due to more dependency bloat... a dom0 > would probably be 50-100M over that.. > > I have been playing with minimal opensolaris setups > for a while now.. > http://blogs.sun.com/mrj/entry/how_small_can_solaris_go1 > > I''ve been working (on the side) on a new script which will > build up a new minimal BE (32 or 64-bit kernel) from scratch. > It won''t have pkg or python on the BE, but you will be able > to switch to activate it and use the grub menu to switch back. > It should be < 100M for a 64-bit kernel (right now I''m at ~ > 50M (32-bit kernel) but still need to get SMF and xbow to > work, but I can ssh in and out). > > Unfortunately, I haven''t had much spare time to work on it > the last couple of months.. > > > > > MRJ >Hey Mark, Your numbers are impressive! Better, I like your script more than the JeOS project''s suggestion of setting up a local install server for use with AI... Looking at your script, it seems that I might want to run `slim-guest-installer --profile=slim --swap=0 --dump=0` - as I want to install Dom0 onto a compact flash card on metal...none of your examples show using these options but, as they''re in the script, can I assume they''re OK to use? Also, I noticed the "slim" profile includes "slim_install", which is not included in the other profiles - why not? Lastly, below you write "and remove the downloads" - I didn''t even realize that I could save more space by deleting the package files after installing them - where are they located and is there a special command needed or is `rm -f` all that''s needed? Thanks, Kent
Kent Watsen wrote:> >> MRJ >> > > Hey Mark, > > Your numbers are impressive! Better, I like your script more than the > JeOS project''s suggestion of setting up a local install server for use > with AI... > > Looking at your script, it seems that I might want to run > `slim-guest-installer --profile=slim --swap=0 --dump=0` - as I want to > install Dom0 onto a compact flash card on metal...none of your examples > show using these options but, as they''re in the script, can I assume > they''re OK to use?yes for swap and dump... You probably don''t want slim since it''s what the graphical installer installs which is big.. You''ll want to create a new profile for your dom0. It would be something like the following.. Make sure you include your NIC and disk adapter drivers... dom0_min = [ "entire", "SUNWcsd", "SUNWcs", "SUNWcar", "SUNWcakr", "SUNWos86r", "SUNWkvm", "SUNWrmodr", "SUNWpsdcr", "SUNWpsdir", "SUNWcnetr", "SUNWesu", "SUNWkey", "SUNWuprl", "SUNWkrb", "SUNWbip", "SUNWzfskr", "SUNWbash", "SUNWipf", "SUNWbash", "SUNWgrub", "SUNWtoo", "SUNWbind", "SUNWrcmdc", "SUNWmkcd", "SUNWPython", "SUNWPython-extra", "SUNWipkg", "SUNWinstall", "SUNWbeadm", "SUNWadmap", "SUNWadmlib-sysid", "SUNWadmr", "SUNWintgige", "SUNWahci", "SUNWpsdcr", "SUNWpsdpr", "SUNWos86r", "SUNWusb", "SUNWxdt", "SUNWxvmpv", "SUNWxvmdom", "SUNWxvm", "SUNWlibvirt", ]> Also, I noticed the "slim" profile includes "slim_install", which is not > included in the other profiles - why not?That''s the stock install bits you get with OpenSolaris today. I added that one in so you could use this as a text installer and get the stock bits..> Lastly, below you write "and remove the downloads" - I didn''t even > realize that I could save more space by deleting the package files after > installing them - where are they located and is there a special command > needed or is `rm -f` all that''s needed?This is what I do in the script... "/bin/rm -rf " + mountDir + "/var/pkg/download/*", MRJ
Hey Mark, Your script is great! - very easy to use... Here are my results: - post slim.py (b111): 377M (awesome!) - post `image-update` to b126 and `rm -rf /var/pkg/download/*`: 393M - post `pkg install xvm-gui` and `rm -rf /var/pkg/download/*`: 896M BTW, I didn''t realize before that I could remove the package files after installing them. I checked and could''ve saved 345M from the numbers I reported before. Before, when using the ISC minimization script, I reported 2.0G for post pkg install xvm-gui, this *should* have been 1.65G...almost double what using your script enabled! Now I''m bummed that I just bought a couple 8GB Industrial CFs, I could''ve stuck with my 4GB CFs...heck, I probably could''ve stuck with my 2GB CFs! Thanks, Kent Mark Johnson wrote:> Lastly, below you write "and remove the downloads" - I didn''t even > realize that I could save more space by deleting the package files > after installing them - where are they located and is there a special > command needed or is `rm -f` all that''s needed? > > This is what I do in the script... > > "/bin/rm -rf " + mountDir + "/var/pkg/download/*", >
You know, I just realized that "xvm-gui" adding 500M may be excessive for me as I don''t really need a "gui"... I was just following these instructions, but I only use command-line tools like `virt-install` and `xm` - is there an opportunity to save even more space installing something less "gui" oriented? Also, just for kicks, if I do have a GUI installed, how do I access it? - desktop application or web browser? Thanks, Kent Kent Watsen wrote: Hey Mark, Your script is great! - very easy to use... Here are my results: - post slim.py (b111): 377M (awesome!) - post `image-update` to b126 and `rm -rf /var/pkg/download/*`: 393M - post `pkg install xvm-gui` and `rm -rf /var/pkg/download/*`: 896M BTW, I didn''t realize before that I could remove the package files after installing them. I checked and could''ve saved 345M from the numbers I reported before. Before, when using the ISC minimization script, I reported 2.0G for post pkg install xvm-gui, this *should* have been 1.65G...almost double what using your script enabled! Now I''m bummed that I just bought a couple 8GB Industrial CFs, I could''ve stuck with my 4GB CFs...heck, I probably could''ve stuck with my 2GB CFs! Thanks, Kent
Kent Watsen wrote:> You know, I just realized that "xvm-gui" adding 500M may be excessive > for me as I don''t really need a "gui"... I was just following these > instructions > <http://hub.opensolaris.org/bin/view/Community+Group+xen/2008_11_dom0>, > but I only use command-line tools like `virt-install` and `xm` - is > there an opportunity to save even more space installing something less > "gui" oriented?Yes, that should save a lot of space...> Also, just for kicks, if I do have a GUI installed, how do I access it? > - desktop application or web browser?redirect X display? MRJ