qemu на windows host и archlinux+guest
Читать
https://www.mankier.com/1/qemu https://www.mankier.com/1/qemu#-drive
https://www.mankier.com/1/qemu#-machine
ЭТО ЧЕРНОВИК.
С чего всё началось.
RU-RU.UTF8 = Привет. У меня host windows , guest Linux . Как сказать qemu использовать физический жесткий диск целиком ? .
en_EN.UTF8 = Please help. how to setup qemu for windows host to use physical drive for linux guest ?
i use commandline D:\Manager\qemu-system-x86_64.exe -boot с -enable-kvm -device intel-iommu -machine arch -smp 1 ,sockets=1,cores=4,threads=1 -m=2048m -vga qxl -hda=\\.\PhysicalDrive1 -net nic,vlan=0 -net user,vlan=0
But window of qemu silently close self.
i can start linux without windows from this disk. and a can start linux from this disk in virtualbox . windows is host system.
затем было блуждание во тьме ). внизу там лог. короче я всё делал не правильно.
затем начали образовываться пункты чуть ниже.
1. hdd.
qemu-system-x86_64.exe -device help
and
qemu-system-x86_64.exe -device driver help
-hda=\\.\PhysicalDrive1 . поправить на актуальное. во первых у меня не hda . и диск2 .
советовали
qemu..exe -device ahci,id=ahci -drive file=имяустройства,format=raw,if=none,id=sysdrive -device ide-drive,drive=sysdrive,bus=ahci.0
qemu-system-x86_64.exe -device ahci,id=ahci -drive file=\\.\PhysicalDrive2,format=raw,if=none,id=sysdrive -device ide-drive,drive=sysdrive,bus=ahci.0 -m 2G
нужно проверять правильность.
https://www.mankier.com/1/qemu#-drive
если грузится гостевая тогда переходим к следующим пунктам.
2. cpu model
qemu-system-x86_64.exe -cpu help
Select CPU model (-cpu help for list and additional feature selection)
Процессор Sandy Bridge Intel(R) Core(TM) i3-2120 CPU @ 3.30GHz, 3300 МГц, ядер: 2, логических процессоров: 4 - у тебя наверняка другой процессор стоит.
-smp [cpus=]n[,cores=cores][,threads=threads][,dies=dies][,sockets=sockets][,maxcpus=maxcpus]
соответственно
-cpu SandyBridge
qemu-system-x86_64.exe -cpu SandyBridge -smp cpus=4,cores=2,threads=4,dies=1,sockets=1,maxcpus=4
cpu указал, значит всё smp мне не надо.
3 qemu-system-x86_64.exe -machine help
берём q35
qemu-system-x86_64.exe -machine q35
4. сеть.
было -net nic,vlan=0 -net user,vlan=0,model=rtl8139 это править.
5. видео. было -vga qxl . это пока пропущу. gxl по help нету.
>qemu-system-x86_64.exe -vga help
none no graphic card
std standard VGA (default)
cirrus Cirrus VGA
vmware VMWare SVGA
xenfb Xen paravirtualized framebuffer
virtio Virtio VGA
в справке qxl
QXL paravirtual graphic card. It is VGA compatible (including VESA 2.0 VBE support). Works best with qxl guest drivers installed though. Recommended choice when using the spice protocol.
6. аудио
-audiodev id=dsound,driver=dsound
7. получаем
qemu-system-x86_64.exe -cpu SandyBridge -machine q35 -device intel-iommu -m 2G
машина запускается . осталось hdd правильно указать.
see log above. в нем все ошибки которые я понаделал пока пробовал. номер диска не верный и остальных косяков много.
from a quick look "-enable-kvm" isn't going to work on windows, and "-m=2048m" should be "-m 2048m", "-machine arch" is completely wrong qemu-system-x86_64.exe -boot с -enable-kvm -device intel-iommu -machine arch -smp 1 ,sockets=1,cores=4,threads=1 -m 2048m -vga qxl -hda=\\.\PhysicalDrive1 -net nic,vlan=0 -net user,vlan=0 then i was try and get -hda=\\.\PhysicalDrive1 is invalid option qemu-system-x86_64.exe -boot с -enable-kvm -device intel-iommu -machine arch -smp 1 ,sockets=1,cores=4,threads=1 -m 2048m -vga qxl -hda \\.\PhysicalDrive1 -net nic,vlan=0 -net user,vlan=0 qemu-system-x86_64.exe: -enable-kvm: unsupported machine type Use -machine help to list supported machines qemu-system-x86_64.exe -machine help show list of supported hardware emulation . for sample q35 Standard PC (Q35 + ICH9, 2009) (alias of pc-q35-4.1) qemu-system-x86_64.exe -boot с -machine q35 -enable-kvm -device intel-iommu -smp 1 ,sockets=1,cores=4,threads=1 -m 2048m -vga qxl -hda \\.\PhysicalDrive1 -net nic,vlan=0 -net user,vlan=0 qemu-system-x86_64.exe: ,sockets=1,cores=4,threads=1: Could not open ',sockets=1 ,cores=4,threads=1': ╨Э╨╡ ╤Г╨┤╨░╨╡╤В╤Б╤П ╨╜╨░╨╣╤В╨╕ ╤Г╨║╨░╨╖╨░╨╜╨╜╤Л╨╣ ╤Д╨░╨╣╨╗. There is a space between "-smp 1" and ",sockets=1,...". Remove the space and QEMU will start. qemu-system-x86_64.exe -boot с -machine q35 -enable-kvm -device intel-iommu -smp 1,sockets=1,cores=4,threads=1 -m 2048m -vga qxl -hda \\.\PhysicalDrive1 -net nic,vlan=0 -net user,vlan=0 Try -smp 4,sockets=1,cores=4,threads=1 # i have one cpu . smp = amounts of cpu qemu-system-x86_64.exe -boot с -machine q35 -enable-kvm -device intel-iommu -smp 1 ,sockets=1,cores=4,threads=1 -m 2048m -vga qxl -hda \\.\PhysicalDrive1 -net nic,vlan=0 -net user,vlan=0 i have one cpu . smp = amounts of cpu . may be remove "smp" ? qemu-system-x86_64.exe -boot с -machine q35 -enable-kvm -device intel-iommu sockets=1,cores=4,threads=1 -m 2048m -vga qxl -hda \\.\PhysicalDrive1 -net nic,vlan=0 -net user,vlan=0 qemu-system-x86_64.exe: sockets=1,cores=4,threads=1: Could not open 'sockets=1,c ores=4,threads=1': ╨Э╨╡ ╤Г╨┤╨░╨╡╤В╤Б╤П ╨╜╨░╨╣╤В╨╕ ╤Г╨║╨░╨╖╨░╨╜╨╜╤Л╨╣ ╤Д╨░╨╣╨╗. sockets=1,... is part of the -smp option. # бля ! qemu-system-x86_64.exe -boot с -machine q35 -enable-kvm -device intel-iommu -smp,sockets=1,cores=4,threads=1 -m 2048m -vga qxl -hda \\.\PhysicalDrive1 -net nic,vlan=0 -net user,vlan=0 qemu-system-x86_64.exe -boot с -machine q35 -enable-kvm -device intel -iommu -smp ,sockets=1,cores=4,threads=1 -m 2048m -vga qxl -hda \\.\PhysicalDrive1 -net nic,vlan=0 -net user,vlan=0 qemu-system-x86_64.exe: -smp ,sockets=1,cores=4,threads=1: Parameter 'cpus' expects a number qemu-system-x86_64.exe -boot с -machine q35 -enable-kvm -device intel -iommu -smp ,sockets=1,cores=4,threads=1,cpus=1 -m 2048m -vga qxl -hda \\.\PhysicalDrive1 -net nic,vlan=0 -net user,vlan=0 qemu-system-x86_64.exe: -iommu: invalid option -device intel-iommu If you only want 1 CPU you can remove the entire "-smp ,sockets=1,cores=4,threads=1" option. qemu-system-x86_64.exe -boot с -machine q35 -enable-kvm -device intel-iommu -smp ,sockets=1,cores=4,threads=1,cpus=1 -m 2048m -vga qxl -hda \\.\PhysicalDrive1 -net nic,vlan=0 -net user,vlan=0 qemu-system-x86_64.exe: -smp ,sockets=1,cores=4,threads=1,cpus=1: Parameter 'cpu s' expects a number remove the entire "-smp ,sockets=1,cores=4,threads=1" option. qemu-system-x86_64.exe -boot с -machine q35 -enable-kvm -device intel-iommu -m 2048m -vga qxl -hda \\.\PhysicalDrive1 -net nic,vlan=0 -net user,vlan=0 qemu-system-x86_64.exe: -hda \\.\PhysicalDrive1: Could not open device: Permission denied sorry. now this drive mapped by Windows as drive 2. this drive without drive letters with ext4 filesystem. ok change 1 to 2. qemu-system-x86_64.exe -boot с -machine q35 -enable-kvm -device intel-iommu -m 2048m -vga qxl -hda \\.\PhysicalDrive2 -net nic,vlan=0 -net user,vlan=0 WARNING: Image format was not specified for '\\.\PhysicalDrive2' and probing guessed raw. Automatically detecting the format is dangerous for raw images, write o perations on block 0 will be restricted. Specify the 'raw' format explicitly to remove the restrictions. qemu-system-x86_64.exe: -machine accel=kvm: No accelerator found i can start linux without windows from this disk. and a can start linux from this disk in virtualbox . windows is host system.
qemu-system-x86_64.exe -hda \\.\PhysicalDrive2 ---> pic002
initramfs загрузился.
you understand the basic principles - even the 3 options I gave above should be sufficient to understand the basic idea.
<mjt> next you see examples on the 'net and the manpage
устал. может потом дожму.
Отредактировано КланЛидер (Ср, 20 Ноя 2019 20:06:02)