|
QemuSetup
QEMU host setup for testing LACK
Back to the MainPage... QEMU Linux Host SetupNotes on things you can set up in QEMU Linux hosts in order to help with development/testing of LACK. Booting the installerInstall the OS. If you're using Debian, you can boot into serial console mode with console=ttyS0,9600n8. If you do install via serial console, the installed system will be set up to run via serial console only, you'll have to turn on normal consoles yourself after the install is completed. InstallingYou can also check the lack build in the Mercurial source, as there's a bunch of QEMU-specific files saved in there.
serial --unit=0 --speed=9600 --word=8 -parity=no --stop=1 terminal serial console splashimage=(hd0,0)/grub/splash.xpm.gz Using vmbuilder to create an imagesudo vmbuilder kvm ubuntu --user=lack --pass=kcal --suite=lucid \ --arch=i386 --libvirt qemu:///system --mem=1024 --rootsize=20000 --swapsize=2048 --addpkg=openssh-server --addpkg=wget \ --dest=/local/kvm/kernel-builder --hostname=kernel-builder \ --cpus 6 --tmpfs=- Mounting qcow2 disk images to the hostFrom http://wiki.debian.org/QEMU#qcow2 and http://tjworld.net/wiki/Linux/MountQemuQcowImages sudo modprobe nbd sudo qemu-nbd -c /dev/nbd0 disk1.qcow2 sudo fdisk -l /dev/nbd0 sudo mount -t ext2 /dev/nbd0p1 /mnt/nbd/ Creating a virtual block device with the FAT filesystem-hdb fat:/path/to/your/content There's some notes on the QEMU docs page about not changing the contents of the directory shared while it's being shared. You can also add that there's a size limit to the directory, it must be smaller than 650 megs or so. Running QEMU using the Graphical interfaceTo switch to the different QEMU screens, use Ctrl-Alt-[1-3] 1 is the virtual console on the machine 2 is the QEMU monitor 3 is a serial port, /dev/ttyS0 QEMU commandsRun a CD-ROM ISO image, GUS and SB16 soundcards, pcnet32 network card driver, with the filename of the ISO set in $1 /usr/local/bin/qemu \
-m 256 \
-name cdrom-demo \
-pidfile qemu.pid \
-serial telnet::4444,server,nowait \
-monitor stdio \
-boot d \
-localtime \
-soundhw sb16,gus \
-redir tcp:28022::22 \
-redir tcp:28000::8000 \
-redir tcp:28200::4200 \
-parallel none \
-net nic,model=pcnet \
-cdrom $1 \
-usbRun a disk image with VNC set as the viewer: /usr/local/bin/qemu \
-m 256 \
-name lenny-base \
-localtime \
-monitor stdio \
-vga std \
-boot d \
-pidfile $PIDFILE \
-redir tcp:12022::22 \
-vnc :1 \
-usbdevice tablet \
-cdrom \
/local/mnt/sourcecode/ISOs/debian-505-i386-netinst.iso \
-hda disk1.qcow2
|