Few fixes to the libvirt.xml:
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.
This looks better than my PR #52 :tada: hope it gets in! :heart_eyes_cat:
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 /dev/vda and not /dev/sda ?
At least that is what I got, when I did the same thing (virtio) with qemu-kvm...
There was also an interesting side effect, in that their order got reversed.
That is: without virtio I get /dev/sda1 (A) and with I get dev/vdb1 (B) :
-cdrom boot2docker.iso disk.qcow2
Disk /dev/sda: 20 GB, 20971524608 bytes, 40960009 sectors
2549 cylinders, 255 heads, 63 sectors/track
Units: cylinders of 16065 * 512 = 8225280 bytes
Device Boot StartCHS EndCHS StartLBA EndLBA Sectors Size Id Type
/dev/sda1 123,0,1 1023,254,63 1975995 40949684 38973690 18.5G 83 Linux
/dev/sda2 0,1,1 122,254,63 63 1975994 1975932 964M 82 Linux swap
Partition table entries are not in disk order
Note: sector size is 2048 (not 512)
Disk /dev/sr0: 45 MB, 47185920 bytes, 92160 sectors
11 cylinders, 64 heads, 32 sectors/track
Units: cylinders of 2048 * 2048 = 4194304 bytes
Device Boot StartCHS EndCHS StartLBA EndLBA Sectors Size Id Type
/dev/sr0p1 * 0,0,1 44,63,32 0 92159 92160 180M 17 Hidden HPFS/NTFS
-drive file=boot2docker.iso,index=2,media=cdrom,if=virtio -drive file=disk.qcow2,index=0,media=disk,if=virtio
Disk /dev/vda: 45 MB, 47185920 bytes, 92160 sectors
45 cylinders, 64 heads, 32 sectors/track
Units: cylinders of 2048 * 512 = 1048576 bytes
Device Boot StartCHS EndCHS StartLBA EndLBA Sectors Size Id Type
/dev/vda1 * 0,0,1 44,63,32 0 92159 92160 45.0M 17 Hidden HPFS/NTFS
Disk /dev/vdb: 20 GB, 20971524608 bytes, 40960009 sectors
40634 cylinders, 16 heads, 63 sectors/track
Units: cylinders of 1008 * 512 = 516096 bytes
Device Boot StartCHS EndCHS StartLBA EndLBA Sectors Size Id Type
/dev/vdb1 1023,15,63 1023,15,63 1954512 40959071 39004560 18.5G 83 Linux
/dev/vdb2 0,1,1 1023,15,63 63 1954511 1954449 954M 82 Linux swap
Partition table entries are not in disk order
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 sda vs. vdb, both seemed to be "fast enough"...
Made my own driver instead, since this doesn't work without libvirt access.