Skip to contentSkip to conversation

time synchronization with qemu

Qemu-devel giovanni bracco 5 participants 6 messages Aug 31, 2004 – Sep 15, 2004

lore
Share & tools
lore
#0 lore raw

I have tried to use qemu to emulate a cluster of 3 linux boxes used as AFS cell server system (RH 8.0 in my case) on a SUSE 9.1 host system. More o less it works but I have a problem with the time synchronization of the 3 boxes.
AFS deamons require that the 3 servers have the same time but I have not found a reasonable strategy to obtain that reliably.
Any suggestion?

Is there a way in which the emulated system inside qemu can keep the time of the host system?

Thank you

Giovanni

Signature · 9 lines
Giovanni Bracco
ENEA INFO 
(Servizio Informatica e Reti)
Via E. Fermi 45
I-00044 Frascati (Roma) Italy
phone 00-39-06-9400-5597
FAX   00-39-06-9400-5735
E-mail  [email protected]
WWW http://fusfis.frascati.enea.it/~bracco
#1 lore raw

[Qemu-devel] QEMU Linux x86 user space emulator invocation under osx

Dear all

I use Mac OS X 10.3, and want to run a linux x86 binary without the need of a hard drive image file.

I look at QEMU documentation, chapter 5, and I believe it describe what I want, before previously on the docs I understood that this is only possible with a linux host (and not a osx host like me).

Am I right ? And if yes, is any alpha-beta-trick stage project which allow it under osx ? Or any clue ?

Best regards

Bernard Sauterel

#2 lore raw

Re: [Qemu-devel] QEMU Linux x86 user space emulator invocation under osx

You are right. The linux-user mode is only available on a Linux host for the moment.

Quoted 21 lines · Bernard Sauterel

Dear all

I use Mac OS X 10.3, and want to run a linux x86 binary without the need of a hard drive image file.

I look at QEMU documentation, chapter 5, and I believe it describe what I want, before previously on the docs I understood that this is only possible with a linux host (and not a osx host like me).

Am I right ? And if yes, is any alpha-beta-trick stage project which allow it under osx ? Or any clue ?

Best regards

Bernard Sauterel

_______________________________________________
Qemu-devel mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/qemu-devel

#3 lore raw
In reply to giovanni bracco
Quoted 10 lines · giovanni bracco

I have tried to use qemu to emulate a cluster of 3 linux boxes used as AFS cell server system (RH 8.0 in my case) on a SUSE 9.1 host system. More o less it works but I have a problem with the time synchronization of the 3 boxes.
AFS deamons require that the 3 servers have the same time but I have not found a reasonable strategy to obtain that reliably.
Any suggestion?

Is there a way in which the emulated system inside qemu can keep the time of the host system?

The same way you do it with real computers....

Usually that means NTP or something.

Signature · 3 lines
// Gianni Tedesco (gianni at scaramanga dot co dot uk)
lynx --source www.scaramanga.co.uk/scaramanga.asc | gpg --import
8646BE7D: 6D9F 2287 870E A2C9 8F60 3A3C 91B5 7669 8646 BE7D
#4 lore raw
Quoted 9 lines · Gianni Tedesco
Quoted 8 lines · giovanni bracco

I have tried to use qemu to emulate a cluster of 3 linux boxes used as AFS cell server system (RH 8.0 in my case) on a SUSE 9.1 host system. More o less it works but I have a problem with the time synchronization of the 3 boxes.
AFS deamons require that the 3 servers have the same time but I have not found a reasonable strategy to obtain that reliably.
Any suggestion?

Quoted 6 lines
Quoted 2 lines

Is there a way in which the emulated system inside qemu can keep the time of the host system?

The same way you do it with real computers....

Usually that means NTP or something.

I have tried but it does not works well and I think that the reason is that inside a qemu system the clock is not stable and depends on the load of the host machine (which depends, in my case of the 3 qemu running together, also on the load on the other qemu systems). I suppose that ntp does not work well with very unstable clocks!

Up to now the best solution I have found is to run a cron job on the host which sets every minute the clock of the 3 qemu systems using "rsh rdate -s host.ip" but still the time difference between qemu systems is til between 3 and 10 seconds (even if there is a reset about every minute!)

Any suggestion is welll accepted!

Giovanni

ps:
on the host machine, kernel 2.6.5, I set at the boot the option clock=pit becouse otherwise the first qemu that I start runs a clock faster that the real clock of the host while the other two run slower.
With clock=pit option all the three qemu run slower than the host and so the intrinsic time diffrence between them is lower.

Signature · 9 lines
Giovanni Bracco
ENEA INFO 
(Servizio Informatica e Reti)
Via E. Fermi 45
I-00044 Frascati (Roma) Italy
phone 00-39-06-9400-5597
FAX   00-39-06-9400-5735
E-mail  [email protected]
WWW http://fusfis.frascati.enea.it/~bracco
#5 lore raw

Hi!

When qemu is waiting to read data from your host disk, the clock may slow down. For start try to work on small images that fit in ram.

My guess is that your guest uses timer interrupt as time source and when there should be two or more interrupts while qemu is waiting for disk read to complete, only first interrupt will be delivered. The solution is to modify qemu source code to use asynchronous disk IO. A patch was send on this list a few months ago (search the list archive for AIO), but I didn't try (or even analyze it), so I cannot tell if it can help.

Regards,

Piotrek

Quoted 15 lines · --- giovanni bracco

I have tried but it does not works well and I think that the reason is that inside a qemu system the clock is not stable and depends on the load of the ost machine (which depends, in my case of the 3 qemu running together, also on the load on the other qemu systems). I suppose that ntp does not work well with very unstable clocks!

Up to now the best solution I have found is to run a cron job on the host which sets every minute the clock of the 3 qemu systems using "rsh rdate -s host.ip" but still the time difference between qemu systems is til between 3 and 10 seconds (even if there is a reset about every minute!)

Quoted 3 lines

Any suggestion is welll accepted!

Giovanni

_______________________________
Do you Yahoo!?
Declare Yourself - Register online to vote today!
http://vote.yahoo.com