Virtualized SCO OpenServer 5.0.6, and time reset on shutdown - SCO

This is a discussion on Virtualized SCO OpenServer 5.0.6, and time reset on shutdown - SCO ; I'm using NTP on an RHEL 5.x box serving VMware Workstation 6, and running an SCO OpenServer 5.0.6 environment in it. It seems to work reasonably (by using IDE emulation instead of the SCSI setup complexities described for VMware's ESX ...

+ Reply to Thread
Results 1 to 8 of 8

Thread: Virtualized SCO OpenServer 5.0.6, and time reset on shutdown

  1. Virtualized SCO OpenServer 5.0.6, and time reset on shutdown

    I'm using NTP on an RHEL 5.x box serving VMware Workstation 6, and
    running an SCO OpenServer 5.0.6 environment in it. It seems to work
    reasonably (by using IDE emulation instead of the SCSI setup
    complexities described for VMware's ESX product), but whenever I shut
    down the server and VMware instance, the OpenServer 5.0.6 OS comes up
    with its clock drifted backward by however long the server was down.

    I'm sure this is an unfortunate interaction with VMware and failing to
    have a 'VMware Tools' available for OpenServer, but it's awkward. I
    *think* that the sending of shutdown signales is failing to shut down
    the OpenServer environment fully: are there usable settings for
    OpenServer to get ACPI to work? Or is there a setting so that when you
    say 'shutdown' from the command line, it actually powers off instead
    of leaving that 'if you touch me, I will reboot' screen on the console?

  2. Re: Virtualized SCO OpenServer 5.0.6, and time reset on shutdown

    On Tue, Jun 03, 2008, Nico Kadel-Garcia wrote:
    >I'm using NTP on an RHEL 5.x box serving VMware Workstation 6, and
    >running an SCO OpenServer 5.0.6 environment in it. It seems to work
    >reasonably (by using IDE emulation instead of the SCSI setup
    >complexities described for VMware's ESX product), but whenever I shut
    >down the server and VMware instance, the OpenServer 5.0.6 OS comes up
    >with its clock drifted backward by however long the server was down.


    Are you running ntp on the SCO box? I have been known to add a
    call to ``ntpdate'' during booting to set the date before
    starting ntp as ntpdate seems able to make larger adjustments in
    time than straight ntp. Instead of running ntp as a daemon, one
    can also run ntpdate every 15 minutes or so from cron.

    There's also a bit of magic in the /etc/vmware/config file that
    may help synchronize time. This is from a CentOS 5.1 system
    where /proc/cpuinfo shows ``cpu MHz : 1999.940''

    host.cpukHz = 1999940
    host.noTSC = TRUE
    ptsc.noTSC = TRUE

    I'm not sure exactly what that does, but it minimizes a bunch of
    ``clock rate change request'' entries in dmesg output.


    >I'm sure this is an unfortunate interaction with VMware and failing to
    >have a 'VMware Tools' available for OpenServer, but it's awkward. I
    >*think* that the sending of shutdown signales is failing to shut down
    >the OpenServer environment fully: are there usable settings for
    >OpenServer to get ACPI to work? Or is there a setting so that when you
    >say 'shutdown' from the command line, it actually powers off instead
    >of leaving that 'if you touch me, I will reboot' screen on the console?


    I can't answer that.

    Bill
    --
    INTERNET: bill@celestial.com Bill Campbell; Celestial Software LLC
    URL: http://www.celestial.com/ PO Box 820; 6641 E. Mercer Way
    Voice: (206) 236-1676 Mercer Island, WA 98040-0820
    Fax: (206) 232-9186

    UNIX was not designed to stop you from doing stupid things, because that
    would also stop you from doing clever things. -- Doug Gwyn

  3. Re: Virtualized SCO OpenServer 5.0.6, and time reset on shutdown

    Nico Kadel-Garcia wrote:
    > I'm using NTP on an RHEL 5.x box serving VMware Workstation 6, and
    > running an SCO OpenServer 5.0.6 environment in it. It seems to work
    > reasonably (by using IDE emulation instead of the SCSI setup
    > complexities described for VMware's ESX product), but whenever I shut
    > down the server and VMware instance, the OpenServer 5.0.6 OS comes up
    > with its clock drifted backward by however long the server was down.


    So, if you shutdown the VM and then the host, and after, say, 12 hours,
    you power on again the host, and the host shows correct time, and you
    then start the VM with OS-5.0.6, if you go right into the VM's BIOS
    before OpenServer boots, what time is there in the VM BIOS?

    If the time in the VM BIOS is correct, then it seems OpenServer is
    somehow saving the time of shutdown on some file, and picking up from
    there on power on... I have had to deal with the shutdown scripts on
    OpenServer 5.0.7, and they are an ugly and hairy mess.

  4. Re: Virtualized SCO OpenServer 5.0.6, and time reset on shutdown

    Pepe wrote:
    > Nico Kadel-Garcia wrote:
    >> I'm using NTP on an RHEL 5.x box serving VMware Workstation 6, and
    >> running an SCO OpenServer 5.0.6 environment in it. It seems to work
    >> reasonably (by using IDE emulation instead of the SCSI setup
    >> complexities described for VMware's ESX product), but whenever I shut
    >> down the server and VMware instance, the OpenServer 5.0.6 OS comes up
    >> with its clock drifted backward by however long the server was down.

    >
    > So, if you shutdown the VM and then the host, and after, say, 12 hours,
    > you power on again the host, and the host shows correct time, and you
    > then start the VM with OS-5.0.6, if you go right into the VM's BIOS
    > before OpenServer boots, what time is there in the VM BIOS?


    One has to define "shutting down the VM". I've not explored all the options in
    the world, but it seems to be associated with "use the shutdown command in the
    VM", and then "shut down the VMware server", then later "restart the VMware
    server", and "restart the VM". I think that the "shutdown" command is not
    effecting a complete power-off of the VM, which is confirmed by checking the
    VMware instance and seeing a console that displays the SCO Openserver "if you
    touch me, I will reboot: you need to lay hands on my power switch to actually
    shut me down" signal.

    Getting into the BIOS is awkward: the amount of time available to access the
    VMware BIOS screen is only a few seconds, and I need to edit the VMware
    configuration to extend that time. (Virtualized BIOS's are usually very, very
    fast to reach the booting stage.)

    > If the time in the VM BIOS is correct, then it seems OpenServer is
    > somehow saving the time of shutdown on some file, and picking up from
    > there on power on... I have had to deal with the shutdown scripts on
    > OpenServer 5.0.7, and they are an ugly and hairy mess.


    I think it's the VMware OS image saving it in the BIOS information. I think
    VMware is snapshotting the not-quite-powered-off VM state at OS shutdown time,
    so the BIOS has its time frozen from that. Then it restores the state when
    the VM gets started back up. That's why I want to get the shutdown command to
    complete the power off.

    Note that OpenServer is not well supported by any virtualization scheme, and
    this is the sort of thing that makes people spend time and thought on how
    shutdown needs to work. VMWare is the only one I've found that actually works
    for SCO OpenServer 5.0.x so far.

  5. Re: Virtualized SCO OpenServer 5.0.6, and time reset on shutdown


    "Nico Kadel-Garcia" wrote in message news:4846242B.5050306@gmail.com...
    > Pepe wrote:
    >> Nico Kadel-Garcia wrote:
    >>> I'm using NTP on an RHEL 5.x box serving VMware Workstation 6, and
    >>> running an SCO OpenServer 5.0.6 environment in it. It seems to work
    >>> reasonably (by using IDE emulation instead of the SCSI setup
    >>> complexities described for VMware's ESX product), but whenever I shut
    >>> down the server and VMware instance, the OpenServer 5.0.6 OS comes up
    >>> with its clock drifted backward by however long the server was down.

    >>
    >> So, if you shutdown the VM and then the host, and after, say, 12 hours, you power on
    >> again the host, and the host shows correct time, and you then start the VM with
    >> OS-5.0.6, if you go right into the VM's BIOS before OpenServer boots, what time is
    >> there in the VM BIOS?

    >
    > One has to define "shutting down the VM". I've not explored all the options in the
    > world, but it seems to be associated with "use the shutdown command in the VM", and then
    > "shut down the VMware server", then later "restart the VMware server", and "restart the
    > VM". I think that the "shutdown" command is not effecting a complete power-off of the
    > VM, which is confirmed by checking the VMware instance and seeing a console that
    > displays the SCO Openserver "if you touch me, I will reboot: you need to lay hands on my
    > power switch to actually shut me down" signal.
    >
    > Getting into the BIOS is awkward: the amount of time available to access the VMware BIOS
    > screen is only a few seconds, and I need to edit the VMware configuration to extend that
    > time. (Virtualized BIOS's are usually very, very fast to reach the booting stage.)
    >
    >> If the time in the VM BIOS is correct, then it seems OpenServer is somehow saving the
    >> time of shutdown on some file, and picking up from there on power on... I have had to
    >> deal with the shutdown scripts on OpenServer 5.0.7, and they are an ugly and hairy
    >> mess.

    >
    > I think it's the VMware OS image saving it in the BIOS information. I think VMware is
    > snapshotting the not-quite-powered-off VM state at OS shutdown time, so the BIOS has its
    > time frozen from that. Then it restores the state when the VM gets started back up.
    > That's why I want to get the shutdown command to complete the power off.
    >
    > Note that OpenServer is not well supported by any virtualization scheme, and this is the
    > sort of thing that makes people spend time and thought on how shutdown needs to work.
    > VMWare is the only one I've found that actually works for SCO OpenServer 5.0.x so far.


    In order to force a power-down during shutdown, you can edit the following lines in
    /etc/conf/pack.d/uapm/space.c and relink the kernel:

    ulong_t uapm_offstates[] = {
    APMPWR_OFF, /* 0 AD_HALT No auto reboot */
    APMPWR_READY, /* 1 AD_BOOT Auto reboot */
    APMPWR_READY, /* 2 AD_IBOOT (same as AD_BOOT) */
    APMPWR_OFF, /* 3 AD_PWRDOWN Turn off power */
    APMPWR_STANDBY, /* 4 AD_PWRNAP Turn off if no A/C */
    APMPWR_SUSPEND, /* (anything else) (essentially AD_HALT) */
    };

    The default values for AD_HALT and AD_POWERDOWN are normally APMPWR_READY
    as noted in the comments preceeding this code.
    This works on some BIOSes with APM but not others, depending on whether boot
    recognizes its presence.

    Bob



  6. Re: Virtualized SCO OpenServer 5.0.6, and time reset on shutdown

    Nico Kadel-Garcia wrote:
    > Pepe wrote:
    >
    >> Nico Kadel-Garcia wrote:
    >>
    >>> I'm using NTP on an RHEL 5.x box serving VMware Workstation 6, and
    >>> running an SCO OpenServer 5.0.6 environment in it. It seems to work
    >>> reasonably (by using IDE emulation instead of the SCSI setup
    >>> complexities described for VMware's ESX product), but whenever I shut
    >>> down the server and VMware instance, the OpenServer 5.0.6 OS comes up
    >>> with its clock drifted backward by however long the server was down.

    >>
    >>
    >> So, if you shutdown the VM and then the host, and after, say, 12
    >> hours, you power on again the host, and the host shows correct time,
    >> and you then start the VM with OS-5.0.6, if you go right into the VM's
    >> BIOS before OpenServer boots, what time is there in the VM BIOS?

    >
    >
    > One has to define "shutting down the VM".


    Well, for the test I suggested, in order to check whether the time
    discrepancy against "reality" in the virtualized OpenServer arises from
    a VMware quirk, or from a OpenServer quirk, the phrase "shutdown the VM"
    means to shutdown the phisycally virtualized PC, therefore your should
    shutdown the guest (OpenServer), and, if the guest shutdown is not
    capable of shuting down properly the "power" of the virtualized PC, you
    should then manually shut down the virtualized hardware of the VM (the
    red square "stop" button, usually).

    > I've not explored all the
    > options in the world, but it seems to be associated with "use the
    > shutdown command in the VM", and then "shut down the VMware server",
    > then later "restart the VMware server", and "restart the VM". I think
    > that the "shutdown" command is not effecting a complete power-off of the
    > VM, which is confirmed by checking the VMware instance and seeing a
    > console that displays the SCO Openserver "if you touch me, I will
    > reboot: you need to lay hands on my power switch to actually shut me
    > down" signal.


    It seems the OpenServer guest is not issuing the necessary ATX real-mode
    BIOS command to shutdown the power in the VM. If that is the case, you
    should stop it (the VM) manually, and then shutdown the host, and then
    restart the host, and then boot the VM, and when booting the VM you
    should enter into the VM BIOS and check what time and date is it in the
    VM BIOS. Is that date and time correct or not?

  7. Re: Virtualized SCO OpenServer 5.0.6, and time reset on shutdown

    On 3 Jun, 13:46, Nico Kadel-Garcia wrote:
    > I'm using NTP on an RHEL 5.x box serving VMware Workstation 6, and
    > running an SCO OpenServer 5.0.6 environment in it. It seems to work
    > reasonably (by using IDE emulation instead of the SCSI setup
    > complexities described for VMware's ESX product), but whenever I shut
    > down the server and VMware instance, the OpenServer 5.0.6 OS comes up
    > with its clock drifted backward by however long the server was down.
    >
    > I'm sure this is an unfortunate interaction with VMware and failing to
    > have a 'VMware Tools' available for OpenServer, but it's awkward. I
    > *think* that the sending of shutdown signales is failing to shut down
    > the OpenServer environment fully: are there usable settings for
    > OpenServer to get ACPI to work? Or is there a setting so that when you
    > say 'shutdown' from the command line, it actually powers off instead
    > of leaving that 'if you touch me, I will reboot' screen on the console?


    Nico,

    I am not sure how things work on the VMware side of the fence but at
    boot time OpenServer 5.0.6 will attempt to read the RTC, convert it
    to localtime and store it in the Unix system clock.

    So when you run setclk(ADM) it grabs what it thinks is UTC and
    converts it, based on the TZ value to localtime. What setclk is
    getting
    from VMware and how VMware is providing it is something that
    I cannot answer at the moment.

    JOhn

  8. Re: Virtualized SCO OpenServer 5.0.6, and time reset on shutdown

    Pepe wrote:
    > Nico Kadel-Garcia wrote:
    >> Pepe wrote:
    >>
    >>> Nico Kadel-Garcia wrote:
    >>>
    >>>> I'm using NTP on an RHEL 5.x box serving VMware Workstation 6, and
    >>>> running an SCO OpenServer 5.0.6 environment in it. It seems to work
    >>>> reasonably (by using IDE emulation instead of the SCSI setup
    >>>> complexities described for VMware's ESX product), but whenever I shut
    >>>> down the server and VMware instance, the OpenServer 5.0.6 OS comes up
    >>>> with its clock drifted backward by however long the server was down.
    >>>
    >>>
    >>> So, if you shutdown the VM and then the host, and after, say, 12
    >>> hours, you power on again the host, and the host shows correct time,
    >>> and you then start the VM with OS-5.0.6, if you go right into the
    >>> VM's BIOS before OpenServer boots, what time is there in the VM BIOS?

    >>
    >>
    >> One has to define "shutting down the VM".

    >
    > Well, for the test I suggested, in order to check whether the time
    > discrepancy against "reality" in the virtualized OpenServer arises from
    > a VMware quirk, or from a OpenServer quirk, the phrase "shutdown the VM"
    > means to shutdown the phisycally virtualized PC, therefore your should
    > shutdown the guest (OpenServer), and, if the guest shutdown is not
    > capable of shuting down properly the "power" of the virtualized PC, you
    > should then manually shut down the virtualized hardware of the VM (the
    > red square "stop" button, usually).


    I'm a bit short on time for this, the server is fairly busy. What I've wound
    up doing is setting up a little init script to slap down ntpd, run
    'ntptimeset', and restart ntpd.

    There are caveats of this approach. ntptimeset requires at least *three* NTP
    servers, which is completely reasonable, to allow a confused server to be
    outvoted. But from ntpd's behavior, it looks like SCO's version of ntpd has
    localhost hard-coded into its NTP service, and with no way to turn it off in
    ntp.conf: it's not listed there. This is because ntptrace and the Nagios
    check_ntp plugin report it as being quite happy, even when it's only using
    other sources aren't available. This is *bad* behavior when your hardware
    clock cannot be trusted for whatever reason. And it may interact unfortunately
    with the 'ntpd -g' option: since I don't have source code to their ntp daemon,
    it's difficult to tell what vagaries they did to it.

    >> I've not explored all the options in the world, but it seems to be
    >> associated with "use the shutdown command in the VM", and then "shut
    >> down the VMware server", then later "restart the VMware server", and
    >> "restart the VM". I think that the "shutdown" command is not effecting
    >> a complete power-off of the VM, which is confirmed by checking the
    >> VMware instance and seeing a console that displays the SCO Openserver
    >> "if you touch me, I will reboot: you need to lay hands on my power
    >> switch to actually shut me down" signal.

    >
    > It seems the OpenServer guest is not issuing the necessary ATX real-mode
    > BIOS command to shutdown the power in the VM. If that is the case, you
    > should stop it (the VM) manually, and then shutdown the host, and then
    > restart the host, and then boot the VM, and when booting the VM you
    > should enter into the VM BIOS and check what time and date is it in the
    > VM BIOS. Is that date and time correct or not?


    Programming in the ntptimeset gets me around it. I'm amazed at SCO's tendency
    to slap all their init scripts in /etc/tcp, though: services like ntpd should
    have their *own* init scripts, so that they can be activated or not as needed
    and not be automatically turned on simply because you have an ntp.conf.

+ Reply to Thread