This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
cloud:kvm:qemu [2017/09/20 14:45] frank |
cloud:kvm:qemu [2017/09/26 13:03] (current) frank |
||
---|---|---|---|
Line 1: | Line 1: | ||
+ | |||
+ | |||
+ | <code> | ||
+ | |||
+ | /usr/bin/qemu-system-x86_64 \ | ||
+ | -no-user-config \ | ||
+ | -nodefaults \ | ||
+ | -no-shutdown \ | ||
+ | -machine accel=kvm,mem-merge=off \ | ||
+ | -rtc base=utc \ | ||
+ | -m 4096 \ | ||
+ | -cpu host \ | ||
+ | -smp cpus=16,cores=8,threads=2,sockets=1 \ | ||
+ | -display vnc=:0 \ | ||
+ | -vga std \ | ||
+ | -chardev ringbuf,id=ringBufSerial0,size=8388608 \ | ||
+ | -device isa-serial,chardev=ringBufSerial0 \ | ||
+ | -chardev socket,id=monitor0,server,path=write-qemu/monitor-debug.sock,nowait \ | ||
+ | -mon monitor0,mode=control \ | ||
+ | -chardev socket,id=monitor1,server,path=write-qemu/monitor.sock,nowait \ | ||
+ | -mon monitor1,mode=control \ | ||
+ | -boot order=d \ | ||
+ | -net none -device vfio-pci,host=0000:3b:11.7,romfile=qemu-img-binaries/snp.efirom \ | ||
+ | -net none -device vfio-pci,host=0000:3b:11.6 \ | ||
+ | -net none -device vfio-pci,host=0000:3b:09.7 \ | ||
+ | -drive file=/usr/share/edk2/ovmf/OVMF_CODE.fd,index=0,if=pflash,format=raw,readonly \ | ||
+ | -drive file=qemu-img-binaries/OVMF_VARS.fd,index=1,if=pflash,format=raw \ | ||
+ | -drive file=ubuntu.qcow2,format=qcow2,if=virtio,id=drive-virtio-disk0 \ | ||
+ | # display to vnc socket | ||
+ | -display vnc=unix:/write-qemu/vnc.sock | ||
+ | |||
+ | # serial console in ringbuf | ||
+ | -chardev ringbuf,id=ringBufSerial0,size=8388608 \ | ||
+ | -device isa-serial,chardev=ringBufSerial0 \ | ||
+ | # serial console to socket | ||
+ | -chardev socket,id=serial0,server,path=/write-qemu/serial.sock,nowait | ||
+ | -device isa-serial,chardev=serial0 \ | ||
+ | |||
+ | # vfio device | ||
+ | -device vfio-pci,host=0000:13:10.0,romfile=/usr/share/ipxe/808610ed.efirom | ||
+ | |||
+ | # boot order | ||
+ | -boot order=n # n - network, d - cdrom | ||
+ | |||
+ | |||
+ | </code> | ||
+ | |||
qemu-img | qemu-img | ||