User Tools

Site Tools


cloud:kvm:qemu

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
cloud:kvm:qemu [2017/09/14 14:55]
frank created
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
  
Line 8: Line 55:
 <​code>​ <​code>​
 qemu-img resize ubuntu.qcow2 + 200G qemu-img resize ubuntu.qcow2 + 200G
 +</​code>​
 +
 +qmp monitor
 +<​code>​
 +-chardev socket,​id=monitor0,​server,​path=write-qemu/​monitor-debug.sock,​nowait \
 +-mon monitor0,​mode=control \
 +</​code>​
 +
 +serial console
 +<​code>​
 +-chardev ringbuf,​id=ringBufSerial0,​size=8388608 \
 +-device isa-serial,​chardev=ringBufSerial0 \
 +
 +read serial console
 </​code>​ </​code>​
cloud/kvm/qemu.1505426131.txt.gz ยท Last modified: 2017/09/14 14:55 by frank