blob: e239f65992f34a396a22fc100c873cdc3becf7fc (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
|
device: 0.852
performance: 0.808
architecture: 0.782
graphic: 0.781
files: 0.712
mistranslation: 0.667
register: 0.490
PID: 0.489
boot: 0.483
hypervisor: 0.482
kernel: 0.481
semantic: 0.470
x86: 0.464
i386: 0.460
permissions: 0.452
vnc: 0.424
peripherals: 0.395
assembly: 0.372
debug: 0.371
ppc: 0.367
socket: 0.339
user-level: 0.304
network: 0.289
arm: 0.277
VMM: 0.274
risc-v: 0.261
KVM: 0.260
TCG: 0.207
virtual: 0.105
QEMU wrongly requires SD card sizes to be a power of two
Description of problem:
QEMU arbitrarily requires SD card sizes to be a power of 2. However, this behavior does not match the real world, and I am unable to pass a *physical* SD card into the guest operating system.
```
$ sudo qemu-system-aarch64 -M raspi2b -drive file=/dev/mmcblk0,if=sd,format=raw
qemu-system-aarch64: Invalid SD card size: 29.7 GiB
SD card size has to be a power of 2, e.g. 32 GiB.
You can resize disk images with 'qemu-img resize <imagefile> <new-size>'
(note that this will lose data if you make the image smaller than it currently is).
```
Steps to reproduce:
1. Insert a physical SD card into your host system and make a note of its device name. It will be something like `/dev/mmcblk0`
2. Attempt to start a guest OS with the SD card attached. See the command above.
3. You will get an error saying that the card size is not a power of two.
Additional information:
|