From mboxrd@z Thu Jan 1 00:00:00 1970 From: Assaf Gordon Subject: GUIX 0.7 under QEMU/KVM with virtio Date: Sat, 04 Oct 2014 00:59:54 -0400 Message-ID: <542F7ECA.1030709@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:47975) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XaHRl-0002gT-Uc for guix-devel@gnu.org; Sat, 04 Oct 2014 01:00:03 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XaHRe-0000pK-RV for guix-devel@gnu.org; Sat, 04 Oct 2014 00:59:57 -0400 Received: from mail-qa0-x236.google.com ([2607:f8b0:400d:c00::236]:42130) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XaHRe-0000pF-Nc for guix-devel@gnu.org; Sat, 04 Oct 2014 00:59:50 -0400 Received: by mail-qa0-f54.google.com with SMTP id i13so1723688qae.27 for ; Fri, 03 Oct 2014 21:59:50 -0700 (PDT) Received: from disco.wi.mit.edu ([18.4.1.144]) by mx.google.com with ESMTPSA id w8sm6524806qap.32.2014.10.03.21.59.49 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 03 Oct 2014 21:59:49 -0700 (PDT) List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: guix-devel@gnu.org Hello Guix Developers, I'm experimenting in using Guix under QEMU/KVM. I've read these: https://lists.gnu.org/archive/html/guix-devel/2014-09/msg00326.html http://lists.gnu.org/archive/html/guix-devel/2014-09/msg00149.html First, I can provide another recipe: ## On Host $ wget ftp://alpha.gnu.org/gnu/guix/gnu-usb-install-0.7.x86_64.xz $ unxz gnu-usb-install-0.7.x86_64.xz $ qemu-img create -q -f qcow2 guix.qcow2 5G $ qemu-system-x86_64 --enable-kvm \ -m 1024 \ -net nic,model=virtio -net user \ -boot menu=on \ -hda gnu-usb-install-0.7.x86_64 \ -drive file=guix.qcow2,if=virtio,media=disk,index=0 \ -serial mon:stdio \ -vga std ## Inside guest: 1. Press F12 (quickly) for QEMU Boot menu 2. Choose "1" for QEMU ATA DISK 750MB SIZE (which is the USB image) 3. GRUB Loads, boots into Guix shell 4. The USB drive is "/dev/sda1" 5. The Disk image is "/dev/vda" (unpartitioned) 6. Parition with fdisk: # fdisk /dev/vda press n (new partition) press p (primary partition) (use defaults for all values) a (activate parition) 1 (parition number) w (write changes) 7. Create File system # mkfs.ext4 -L guix /dev/vda1 8. Follow instructions at http://www.gnu.org/software/guix/manual/html_node/System-Installation.html # dhclient eth0 # mount /dev/vda1 /mnt # deco start cow-store /mnt # guix system init /mnt/etc/config.scm /mnt (my 'config.scm' attached below) Second, I can confirm Nate's observation that using QEMU's "-usbdrive" option for the USB image causes everything to be VERY slow. not sure why. Using "-hda" for the USB image is much better. Third, After boot (before setup), I'm trying to get a login prompt on the serial port (which QEMU's redirect to the terminal). I can do the following: echo "hello" > /dev/ttyS0 => appears on the terminal I can also boot with "console=ttyS0,9600n8" (in the GRUB command line), and the kernel messages appear on the console. However, I can't get a login prompt on the serial console. I tried variations of: agetty -L 9600 ttyS0 linux But they all exit after a timeout of few seconds, and no prompt appears on the serial console. Any ideas ? Fourth, Sadly, after installation is complete, and after rebooting, the system fails to load from "/dev/vda1" (drops to "early boot guile"). Based on the kernel messages, it seems the "virtio_blk" driver is not loaded, and so "/dev/vda" is not available. If I then switch QEMU parameters from "-drive if=virtio" to "-drive if=ide" the system loads fine (also requires changing grub's "--root" parameter). Is there a way to fix this? force the kernel to load virto driver? Regards, - Assaf === config.scm, adapted for "/dev/vda" ==== (use-modules (gnu)) (operating-system (host-name "guix07") (timezone "Europe/Paris") (locale "en_US.UTF-8") (bootloader (grub-configuration (device "/dev/vda"))) (file-systems (cons (file-system (device "/dev/vda1") (mount-point "/") (type "ext4")) %base-file-systems)) (users (list (user-account (name "miles") (group "users") (supplementary-groups '("wheel")) (home-directory "/home/miles"))))) =================