Few fixes to the libvirt.xml:#53
Few fixes to the libvirt.xml:#53mykaul wants to merge 2 commits intodhiltgen:masterfrom mykaul:master
Conversation
Move to virtio (hard disk, NICs), SCSI (cd-rom) Removed USB controller (not needed), Balloon driver. Added virtio-rng controller. I did not remove the graphics and replaced with a console, though it can be done as well.
|
This looks better than my PR #52 🎉 hope it gets in! 😻 |
kvm.go
Outdated
| Name: "kvm-io-mode", | ||
| Usage: "Disk IO mode: threads, native", | ||
| Value: "threads", | ||
| Value: "native", |
There was a problem hiding this comment.
Seems to break on my system:
θ61° [zakame:~] % docker-machine create --driver=kvm --engine-registry-mirror=http://192.168.122.1:50000 --swarm-master swarm-manager-1
Running pre-create checks...
Creating machine...
(swarm-manager-1) Copying /home/zakame/.docker/machine/cache/boot2docker.iso to /home/zakame/.docker/machine/machines/swarm-manager-1/boot2docker.iso...
(swarm-manager-1) Creating SSH key...
(swarm-manager-1) Failed to start: virError(Code=1, Domain=10, Message='internal error: process exited while connecting to monitor: 2017-08-10T03:23:14.589561Z qemu-kvm: -drive file=/home/zakame/.docker/machine/machines/swarm-manager-1/swarm-manager-1.img,format=raw,if=none,id=drive-virtio-disk0,aio=native: aio=native was specified, but it requires cache.direct=on, which was not specified.')
Error creating machine: Error in driver during machine creation: virError(Code=1, Domain=10, Message='internal error: process exited while connecting to monitor: 2017-08-10T03:23:14.589561Z qemu-kvm: -drive file=/home/zakame/.docker/machine/machines/swarm-manager-1/swarm-manager-1.img,format=raw,if=none,id=drive-virtio-disk0,aio=native: aio=native was specified, but it requires cache.direct=on, which was not specified.')
Setting kvm-cache-mode set to none or directsync, or any other mode with explicit cache.direct=on got it to work again.
See also https://bugzilla.redhat.com/show_bug.cgi?id=1086704
There was a problem hiding this comment.
OK, reverted the change to switch the default IO mode from threads to native and kept it on threads.
|
This however would also need to be tested with other guest OS, besides Fedora and CentOS/RHEL. HOW about minikube, or boot2docker ISOs? |
|
@gbraad it should work on minikube/boot2docker based machines as I'm using this PR myself, on a Slackware host |
|
@gbraad - this PR came from me trying to use minikube with bookt2docker ISO and being a bit concerned about the old (vintage?) devices that were used. It works OK with minikube 0.21.0, and on top of it I've ran K8S 1.7.0, 1.7.2, 1.7.3. |
|
ping? |
|
Anything I can help with to push this? |
|
I thought virtio devices were normally called There was also an interesting side effect, in that their order got reversed. -cdrom boot2docker.iso disk.qcow2 -drive file=boot2docker.iso,index=2,media=cdrom,if=virtio -drive file=disk.qcow2,index=0,media=disk,if=virtio |
|
I've changed (in my patch) the CDROM device to use SCSI, which is therefore using /dev/sdX. If that's an issue, we can revert it back to IDE (or SATA). I wanted it to be quick as we read from it (and IDE is somewhat slow). But I really have not touched this patch for months as it did not get any attention whatsoever. |
|
I haven't benchmarked |
Move to virtio (hard disk, NICs), SCSI (cd-rom)
Removed USB controller (not needed), Balloon driver.
Added virtio-rng controller.
I did not remove the graphics and replaced with a console, though
it can be done as well.
Changed default iothreads from threads to native.
Tested on Fedora 26, but should work on EL7 hosts as well.