docker-machine-kvm icon indicating copy to clipboard operation
docker-machine-kvm copied to clipboard

Few fixes to the libvirt.xml:

Open mykaul opened this issue 8 years ago • 9 comments

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.

mykaul avatar Aug 09 '17 21:08 mykaul

This looks better than my PR #52 :tada: hope it gets in! :heart_eyes_cat:

zakame avatar Aug 10 '17 02:08 zakame

This however would also need to be tested with other guest OS, besides Fedora and CentOS/RHEL. HOW about minikube, or boot2docker ISOs?

gbraad avatar Aug 28 '17 12:08 gbraad

@gbraad it should work on minikube/boot2docker based machines as I'm using this PR myself, on a Slackware host

zakame avatar Aug 28 '17 12:08 zakame

@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.

mykaul avatar Aug 28 '17 12:08 mykaul

ping?

mykaul avatar Sep 18 '17 07:09 mykaul

Anything I can help with to push this?

mykaul avatar Nov 30 '17 14:11 mykaul

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

afbjorklund avatar Jan 13 '18 09:01 afbjorklund

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.

mykaul avatar Jan 14 '18 08:01 mykaul

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.

afbjorklund avatar Jan 14 '18 08:01 afbjorklund