Re: [zones-discuss] How to enable a service of a zone that is not running...
Thanks to everyone that responded! Of the options presented, I believe that the best option that will have the longest supportability across Solaris and OpenSolaris versions over time is... ...create an rc script in the zone with the svcadm enable command which removes itself after executing the svcadm command. - Bernd Schemmer Thanks again! Brad Brad Diggs Principal Field Technologist Sun Microsystems, Inc. Phone x52957/+1 972-992-0002 Mail bradley.di...@sun.com Blog http://TheZoneManager.com Blog http://BradDiggs.com On Sep 28, 2009, at 1:41 PM, Renaud Manus wrote: It should be possible to do it since the integration of PSARC 2008/015 svccfg refresh subcommand in nevada. eg. # svccfg svc: repository zonepath/etc/svc/repository.db svc: select instance_FMRI svc: setprop general/enabled = true svc: refresh svc: exit I've never tried it though and I'm not sure you can manipulate the 'general' property group offline. Btw, to be able to do it, the NGZ must be running the same OS as the Global Zone otherwise you could corrupt the repository. -- Renaud Bernd Schemmer wrote: AFAIK the upgrade script is not an stable interface. IMHO it's better to create an rc script in the zone with the svcadm enable command which removes itself after executing the svcadm command. regards Bernd Mike Gerdts wrote: On Sun, Sep 27, 2009 at 10:50 AM, Brad Diggs bradley.di...@sun.com wrote: I would like to svcadm enable a service of a non-global zone who's state is not 'running'. Is that possible? If so, how? Thanks in advance, Brad Brad Diggs Principal Field Technologist You can cause it to become enabled on the next boot with: echo svcadm enable $fmri $zonepath/root/var/svc/profile/upgrade This will get processed when manifest-import runs early in the zone boot process. I'm not so sure that this is considered to be an interface, so it may break at any time. It is probably best to ask on smf-discuss if you care about the stability of this mechanism. -- Mike Gerdts http://mgerdts.blogspot.com/ ___ zones-discuss mailing list zones-discuss@opensolaris.org ___ zones-discuss mailing list zones-discuss@opensolaris.org ___ zones-discuss mailing list zones-discuss@opensolaris.org
Re: [zones-discuss] How to enable a service of a zone that is not running...
AFAIK the upgrade script is not an stable interface. IMHO it's better to create an rc script in the zone with the svcadm enable command which removes itself after executing the svcadm command. regards Bernd Mike Gerdts wrote: On Sun, Sep 27, 2009 at 10:50 AM, Brad Diggs bradley.di...@sun.com wrote: I would like to svcadm enable a service of a non-global zone who's state is not 'running'. Is that possible? If so, how? Thanks in advance, Brad Brad Diggs Principal Field Technologist You can cause it to become enabled on the next boot with: echo svcadm enable $fmri $zonepath/root/var/svc/profile/upgrade This will get processed when manifest-import runs early in the zone boot process. I'm not so sure that this is considered to be an interface, so it may break at any time. It is probably best to ask on smf-discuss if you care about the stability of this mechanism. -- Mike Gerdts http://mgerdts.blogspot.com/ ___ zones-discuss mailing list zones-discuss@opensolaris.org -- Bernd Schemmer, Frankfurt am Main, Germany http://bnsmb.de/ M s temprano que tarde el mundo cambiar . Fidel Castro ___ zones-discuss mailing list zones-discuss@opensolaris.org
Re: [zones-discuss] How to enable a service of a zone that is not running...
It should be possible to do it since the integration of PSARC 2008/015 svccfg refresh subcommand in nevada. eg. # svccfg svc: repository zonepath/etc/svc/repository.db svc: select instance_FMRI svc: setprop general/enabled = true svc: refresh svc: exit I've never tried it though and I'm not sure you can manipulate the 'general' property group offline. Btw, to be able to do it, the NGZ must be running the same OS as the Global Zone otherwise you could corrupt the repository. -- Renaud Bernd Schemmer wrote: AFAIK the upgrade script is not an stable interface. IMHO it's better to create an rc script in the zone with the svcadm enable command which removes itself after executing the svcadm command. regards Bernd Mike Gerdts wrote: On Sun, Sep 27, 2009 at 10:50 AM, Brad Diggs bradley.di...@sun.com wrote: I would like to svcadm enable a service of a non-global zone who's state is not 'running'. Is that possible? If so, how? Thanks in advance, Brad Brad Diggs Principal Field Technologist You can cause it to become enabled on the next boot with: echo svcadm enable $fmri $zonepath/root/var/svc/profile/upgrade This will get processed when manifest-import runs early in the zone boot process. I'm not so sure that this is considered to be an interface, so it may break at any time. It is probably best to ask on smf-discuss if you care about the stability of this mechanism. -- Mike Gerdts http://mgerdts.blogspot.com/ ___ zones-discuss mailing list zones-discuss@opensolaris.org ___ zones-discuss mailing list zones-discuss@opensolaris.org
[zones-discuss] How to enable a service of a zone that is not running...
I would like to svcadm enable a service of a non-global zone who's state is not 'running'. Is that possible? If so, how? Thanks in advance, Brad Brad Diggs Principal Field Technologist Sun Microsystems, Inc. Phone x52957/+1 972-992-0002 Mail bradley.di...@sun.com Blog http://TheZoneManager.com Blog http://BradDiggs.com ___ zones-discuss mailing list zones-discuss@opensolaris.org
Re: [zones-discuss] How to enable a service of a zone that is not running...
Do you mean you mean from the global zone like this? zlogin $ZONE_NAME svcadm enable svc:/system/foo Brad Diggs wrote: I would like to svcadm enable a service of a non-global zone who's state is not 'running'. Is that possible? If so, how? Thanks in advance, Brad Brad Diggs Principal Field Technologist Sun Microsystems, Inc. Phone x52957/+1 972-992-0002 Mailbradley.di...@sun.com Bloghttp://TheZoneManager.com Bloghttp://BradDiggs.com -- Trevor Pretty | Technical Account Manager | +64 9 639 0652 | +64 21 666 161 Eagle Technology Group Ltd. Gate D, Alexandra Park, Greenlane West, Epsom Private Bag 93211, Parnell, Auckland www.eagle.co.nz This email is confidential and may be legally privileged. If received in error please destroy and immediately notify us. ___ zones-discuss mailing list zones-discuss@opensolaris.org
Re: [zones-discuss] How to enable a service of a zone that is not running...
Not exactly. That will work if the zone is running. However, it will not work for a non-running zone because because it requires an execution environment to run within. Imagine if you will that we created a zone and then shut it down and halted it. Now, while the zone is down how can I enable say the smb service which is disabled by default. Brad Brad Diggs Principal Field Technologist Sun Microsystems, Inc. Phone x52957/+1 972-992-0002 Mail bradley.di...@sun.com Blog http://TheZoneManager.com Blog http://BradDiggs.com On Sep 27, 2009, at 6:01 PM, Trevor Pretty wrote: Do you mean you mean from the global zone like this? zlogin $ZONE_NAME svcadm enable svc:/system/foo Brad Diggs wrote: I would like to svcadm enable a service of a non-global zone who's state is not 'running'. Is that possible? If so, how? Thanks in advance, Brad Brad Diggs Principal Field Technologist Sun Microsystems, Inc. Phone x52957/+1 972-992-0002 Mail bradley.di...@sun.com Blog http://TheZoneManager.com Blog http://BradDiggs.com -- Trevor Pretty | Technical Account Manager | +64 9 639 0652 | +64 21 666 161 Eagle Technology Group Ltd. Gate D, Alexandra Park, Greenlane West, Epsom Private Bag 93211, Parnell, Auckland www.eagle.co.nz This email is confidential and may be legally privileged. If received in error please destroy and immediately notify us. ___ zones-discuss mailing list zones-discuss@opensolaris.org
Re: [zones-discuss] How to enable a service of a zone that is not running...
On Sun, Sep 27, 2009 at 10:50 AM, Brad Diggs bradley.di...@sun.com wrote: I would like to svcadm enable a service of a non-global zone who's state is not 'running'. Is that possible? If so, how? Thanks in advance, Brad Brad Diggs Principal Field Technologist You can cause it to become enabled on the next boot with: echo svcadm enable $fmri $zonepath/root/var/svc/profile/upgrade This will get processed when manifest-import runs early in the zone boot process. I'm not so sure that this is considered to be an interface, so it may break at any time. It is probably best to ask on smf-discuss if you care about the stability of this mechanism. -- Mike Gerdts http://mgerdts.blogspot.com/ ___ zones-discuss mailing list zones-discuss@opensolaris.org