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




"Nico Kadel-Garcia" <nkadel@xxxxxxxxx> wrote in message news:4846242B.5050306@xxxxxxxxxxxx
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


.



Relevant Pages

  • Re: Virtualized SCO OpenServer 5.0.6, and time reset on shutdown
    ... running an SCO OpenServer 5.0.6 environment in it. ... 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? ... 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". ...
    (comp.unix.sco.misc)
  • Re: Virtualized SCO OpenServer 5.0.6, and time reset on shutdown
    ... running an SCO OpenServer 5.0.6 environment in it. ... 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? ... 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, 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. ...
    (comp.unix.sco.misc)
  • Re: Virtualized SCO OpenServer 5.0.6, and time reset on shutdown
    ... running an SCO OpenServer 5.0.6 environment in it. ... 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... ...
    (comp.unix.sco.misc)
  • Re: Virtualized SCO OpenServer 5.0.6, and time reset on shutdown
    ... running an SCO OpenServer 5.0.6 environment in it. ... with its clock drifted backward by however long the server was down. ... 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, 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. ... What I've wound up doing is setting up a little init script to slap down ntpd, run 'ntptimeset', and restart ntpd. ...
    (comp.unix.sco.misc)
  • Virtualized SCO OpenServer 5.0.6, and time reset on shutdown
    ... running an SCO OpenServer 5.0.6 environment in it. ... down the server and VMware instance, the OpenServer 5.0.6 OS comes up ... are there usable settings for ...
    (comp.unix.sco.misc)