December 2005 Archives

As a new year present to all developers and users of qemu (and future users perhaps?) I have written how to install x86_64 Debian in qemu. It also includes bootable disk image, so you will be ready to boot your Debian x86_64 under qemu after a (shortish) download of 200+Mb image.

Happy new year!

In process of testing Fuse perl bindings before new release (which will support threading and hopefully FreeBSD) I need FreeBSD machine for testing. I opted to install it using qemu, without any graphic output (so that I can run it using ssh on remote machine).

It's a easy task, once you know how to do it. I used FreeBSD 6.0-RELEASE and installed it to disk image (using normal qemu with graphics). Then, I modified /boot/loader.conf to include:

console="comconsole"
This will redirect output from console to serial port. Nice, we don't need graphic any more!
Well, not so fast. We also need to install ssh server (so that we can actually login after boot).

Now, let's start qemu without graphic support and with redirect from localhost:4222 to ssh on our new FreeBSD machine:

qemu -hda hda -m 128 -net user -net nic -redir tcp:4222:10.0.2.15:22 -nographic -serial stdio -monitor stdio
You will get console output in terminal from which you started qemu (as well as boot messages) and after boot you can ssh -p 4222 localhost to login.

Quick edit of .ssh/config resulted in:

Host freebsd
	Hostname localhost
	HostKeyAlias freebsd.lan
	port 4222
Now, if you use ssh-copy-id logging in becomes simple ssh freebsd.

If you want to have semi-functional serial console, you can also change /etc/ttys line for serial terminal to:

ttyd0   "/usr/libexec/getty std.9600"   dialup  on secure
In line above dialup is terminal type. I tried cons25 and xterm but I still couldn't get vi to work well, so I prefer using ssh to connect to FreeBSD in qemu.

About this Archive

This page is an archive of entries from December 2005 listed from newest to oldest.

November 2005 is the previous archive.

January 2006 is the next archive.

Find recent content on the main index or look in the archives to find all content.

Pages

  • pics
OpenID accepted here Learn more about OpenID
Powered by Movable Type 5.04