From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51070) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1esIAC-0005yj-1U for guix-patches@gnu.org; Sat, 03 Mar 2018 20:10:08 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1esIAA-0003sL-5m for guix-patches@gnu.org; Sat, 03 Mar 2018 20:10:07 -0500 Received: from debbugs.gnu.org ([208.118.235.43]:35474) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1esIAA-0003sH-1Y for guix-patches@gnu.org; Sat, 03 Mar 2018 20:10:06 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1esIA9-0002dU-RG for guix-patches@gnu.org; Sat, 03 Mar 2018 20:10:05 -0500 Subject: [bug#30604] [PATCH v9 6/7] vm: Make the virtio-blk uniquely identifiable in /sys. Resent-Message-ID: From: Danny Milosavljevic Date: Sun, 4 Mar 2018 02:09:13 +0100 Message-Id: <20180304010914.1322-7-dannym@scratchpost.org> In-Reply-To: <20180304010914.1322-1-dannym@scratchpost.org> References: <20180303135533.6112-1-dannym@scratchpost.org> <20180304010914.1322-1-dannym@scratchpost.org> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: 30604@debbugs.gnu.org * gnu/build/vm.scm (load-in-linux-vm): Set virtio-blk pci addr to 0x10. * gnu/system/vm.scm (common-qemu-options): Set virtio-blk pci addr to 0x10. --- gnu/build/vm.scm | 2 +- gnu/system/vm.scm | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/gnu/build/vm.scm b/gnu/build/vm.scm index fe003ea45..ebf9e9f6e 100644 --- a/gnu/build/vm.scm +++ b/gnu/build/vm.scm @@ -154,7 +154,7 @@ the #:references-graphs parameter of 'derivation'." builder) (append (if make-disk-image? - `("-device" "virtio-blk,drive=myhd" + `("-device" "virtio-blk-pci,addr=0x10,drive=myhd" "-drive" ,(string-append "if=none,file=" output ",format=" disk-image-format ",id=myhd")) diff --git a/gnu/system/vm.scm b/gnu/system/vm.scm index cf1ec651a..78cc8cad1 100644 --- a/gnu/system/vm.scm +++ b/gnu/system/vm.scm @@ -700,7 +700,8 @@ with '-virtfs' options for the host file systems listed in SHARED-FS." #$@(map virtfs-option shared-fs) "-vga std" - (format #f "-drive file=~a,if=virtio,cache=writeback,werror=report,readonly" + "-device" "virtio-blk-pci,addr=0x10,drive=myhd" + (format #f "-drive id=myhd,file=~a,if=none,cache=writeback,werror=report,readonly" #$image))) (define* (system-qemu-image/shared-store-script os