tux3 setup introduction
OGAWA Hirofumi
hirofumi at mail.parknet.co.jp
Sat Jul 7 19:47:50 PDT 2012
OGAWA Hirofumi <hirofumi at mail.parknet.co.jp> writes:
> [KVM setup]
> 1) Get distribution installer
> Here is debian installer from http://www.debian.org/devel/debian-installer/
>
> E.g. wget
> http://cdimage.debian.org/cdimage/wheezy_di_alpha1/amd64/iso-cd/debian-wheezy-DI-a1-amd64-netinst.iso
>
> 2) Create the disk image
> $ qemu-img create -f qcow2 hdd.img 4G
>
> kvm has the command to create the disk image. This example creates 4GB
> disk image with qcow2 format. (qcow2 is supporting snapshot and copy-on-write)
>
> 3) Install distribution
> $ kvm -boot d -cdrom debian-wheezy-DI-a1-amd64-netinst.iso -hda hdd.img
>
> Use dhcp to get IP in guest OS. By default (-net user) configuration,
> it provides dhcp server and firewall like NAT server by parsing packet
> and redirect to socket in userland. So, you can just use dhcp on
> installation process, and you don't need additional network
> configuration on host side.
>
> 4) Create the disk image for tux3
> $ qemu-img create -f raw tux3.img 4G
> $ ../tux3/usr/tux3 mkfs -b 512 tux3.img
>
> This creates tux3 disk image with raw format. The raw format is simply
> regular file, so it would be easy to use/debug from host side.
>
> 5) Boot tux3 kernel
> $ kvm -kernel linux/arch/x86/boot/bzImage -append "root=/dev/sda1 ro"
> -hda hdd.img -hdb tux3.img
>
> kvm can boot "bzImage" directly by "-kernel", and can pass boot
> parameter by "-append".
And some useful kvm tips,
-snapshot use temporary file, instead of modifying the original
disk image
-serial dev create serial device (file:<filename> is to write output
to file)
With -serial and serial console, you can log the kernel output to host
side file.
--
OGAWA Hirofumi <hirofumi at mail.parknet.co.jp>
More information about the Tux3
mailing list