[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#30604] [PATCH v10 4/6] vm: Make the virtio-blk uniquely identifiabl
From: |
Ludovic Courtès |
Subject: |
[bug#30604] [PATCH v10 4/6] vm: Make the virtio-blk uniquely identifiable in /sys. |
Date: |
Mon, 12 Mar 2018 13:39:16 +0100 |
From: Danny Milosavljevic <address@hidden>
* 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.
Signed-off-by: Ludovic Courtès <address@hidden>
---
gnu/build/vm.scm | 6 +++++-
gnu/system/vm.scm | 7 ++++++-
2 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/gnu/build/vm.scm b/gnu/build/vm.scm
index fe003ea45..773b738ae 100644
--- a/gnu/build/vm.scm
+++ b/gnu/build/vm.scm
@@ -154,7 +154,11 @@ the #:references-graphs parameter of 'derivation'."
builder)
(append
(if make-disk-image?
- `("-device" "virtio-blk,drive=myhd"
+
+ ;; QEMU seems to have a bug that it doesn't assign PCI
+ ;; IDs properly, so force the address of our virtio-blk
+ ;; device.
+ `("-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 91ff32ce9..4360adf15 100644
--- a/gnu/system/vm.scm
+++ b/gnu/system/vm.scm
@@ -677,7 +677,12 @@ 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"
+
+ ;; QEMU seems to have a bug that it doesn't assign PCI IDs properly, so
+ ;; force the address of our virtio-blk device.
+ "-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
--
2.16.2
- [bug#30604] Keyboard detection before ‘cryptsetup’ runs, (continued)
- [bug#30604] Keyboard detection before ‘cryptsetup’ runs, Ludovic Courtès, 2018/03/24
- [bug#30604] [PATCH v11 1/6] linux-modules: Add "modules.alias" writer., Danny Milosavljevic, 2018/03/12
- [bug#30604] [PATCH v10 5/6] linux-initrd: Provide our own 'modprobe' program., Danny Milosavljevic, 2018/03/13
- [bug#30604] [PATCH v10 5/6] linux-initrd: Provide our own 'modprobe' program., Ludovic Courtès, 2018/03/13
- [bug#30604] [PATCH v10 5/6] linux-initrd: Provide our own 'modprobe' program., Danny Milosavljevic, 2018/03/13
- [bug#30604] [PATCH v10 5/6] linux-initrd: Provide our own 'modprobe' program., Danny Milosavljevic, 2018/03/13
- [bug#30604] [PATCH v10 4/6] vm: Make the virtio-blk uniquely identifiable in /sys.,
Ludovic Courtès <=
- [bug#30604] [PATCH v10 2/6] linux-modules: Add 'load-linux-modules-from-directory'., Ludovic Courtès, 2018/03/12
- [bug#30604] [PATCH v10 2/6] linux-modules: Add 'load-linux-modules-from-directory'., Danny Milosavljevic, 2018/03/12
- [bug#30604] [PATCH v10 3/6] linux-modules: Add 'load-needed-linux-modules'., Ludovic Courtès, 2018/03/12
- [bug#30604] [PATCH v10 3/6] linux-modules: Add 'load-needed-linux-modules'., Danny Milosavljevic, 2018/03/12
- [bug#30604] [PATCH v10 3/6] linux-modules: Add 'load-needed-linux-modules'., Ludovic Courtès, 2018/03/12
- [bug#30604] [PATCH v10 6/6] linux-modules: Add "modules.devname" writer., Ludovic Courtès, 2018/03/12
- [bug#30604] [PATCH v10 1/6] linux-modules: Add "modules.alias" writer., Danny Milosavljevic, 2018/03/12
- [bug#30604] [PATCH v10 1/6] linux-modules: Add "modules.alias" writer., Ludovic Courtès, 2018/03/12
- [bug#30604] [PATCH v8 3/7] linux-boot: Load kernel modules only when the hardware is present., Danny Milosavljevic, 2018/03/09
- [bug#30604] [PATCH v9 0/7] Load Linux module only when supported hardware is present., Danny Milosavljevic, 2018/03/03