Small Qemu tips


It’s official: Ubuntu has the best documentation out there. There is almost no problem for it you can’t fix by typing "Ubuntu [description of the problem]" or "Ubuntu [error message]" in your favorite search engine.

For example, here you can find a very exhaustive documentation on installing Qemu and Kqemu (the Kqemu part is the really interesting one).

One interesting part it doesn’t explain is the "-localtime" switch (although it is correctly used in the examples). This switch tells Qemu to set the clock of the virtual machine to the local time rather than the UTC (also known as GMT) time. This is important because Windows and Linux have two different philosophies regarding the meaning of the BIOS (battery powered) clock: Linux thinks that it represents the UTC/GMT time and uses the specified time-zone to calculate the local time from it whenever needed, while Windows (and DOS) thinks that it should represent the local time and uses the time-zone to calculate the GMT time whenever needed (this is why dual-booting is problematic unless both OS’s use a network service to synchronize their time and/or you tweak Linux to set the BIOS clock to the local time). In conclusion: if you are running a Windows/DOS guest with Qemu from Linux, don’t forget to specify the "-localtime" switch.

And the last tip: Qemu recently moved from CVS to SVN. The new checkout command to obtain the source code is:

svn checkout http://svn.savannah.gnu.org/svn/qemu/

or if you are interested just in the trunk (not the branches and tags:

svn checkout http://svn.savannah.gnu.org/svn/qemu/trunk/

In case you don’t have Subversion installed (which is the case by default on Ubuntu) and you are running a Debian based system, it can be resolved with:

sudo apt-get install subversion

Update: changed sv to savannah to be correct (sv seems to deliver a 301 which svn doesn’t seem to handle)

, ,

Leave a Reply

Your email address will not be published. Required fields are marked *