New KVM Host - Kernel and Storage

Issues related to applications and software problems
Post Reply
jackadmin
Posts: 3
Joined: 2018/10/06 06:48:26

New KVM Host - Kernel and Storage

Post by jackadmin » 2018/10/06 07:21:02

Hi,

I wasn't sure where to place this, so I'll try here.

I have setup a new server which i will migrate to from an old Hyper-V Server which has been mostly hosting Linux machines. My initial testing has gone well. But I have a few questions

1. My understanding is that KVM is a part of the kernel. So all development is tied to kernel releases. Is there any point to upgrade to, for example, the latest stable kernel?

2. Storage: Options, Options, Options :). It's hard to really find a best practice. I'm using local storage which I've setup as XFS volumes during install. My initial testing has been done by pre-creating QCOW2 volumes which reside on the XFS volumes. Is this a sustainable way to use my storage (SSD and HDD)?

I guess if you have any other tips it would be greatly appreciated.

High level server specs:
Intel Xeon 10c/20t
RAM: 2133Mhz 128GB
Disk: 2x 1TB SSD, 2x 2TB HDD
NIC: 1x 4 Intel Server NIC with SR-IOV og VMq

hunter86_bg
Posts: 2019
Joined: 2015/02/17 15:14:33
Location: Bulgaria
Contact:

Re: New KVM Host - Kernel and Storage

Post by hunter86_bg » 2018/10/06 23:00:24

1. My understanding is that KVM is a part of the kernel. So all development is tied to kernel releases. Is there any point to upgrade to, for example, the latest stable kernel?
KVM is a "mix" . It shares the same space like the kernel and thus you can call it a type 1 Hypervisiour , while at the same time it is installed just like a type2 Hypervisiour .Yet, the kernel is created from the sources of RHEL , and Red Hat are backporting any security Vulnerabilities from the upstream.
2. Storage: Options, Options, Options :). It's hard to really find a best practice. I'm using local storage which I've setup as XFS volumes during install. My initial testing has been done by pre-creating QCOW2 volumes which reside on the XFS volumes. Is this a sustainable way to use my storage (SSD and HDD)?
You have multitude of options. I have used the following without any issues:
1. XFS/ext4 FS with qcow2 images. You can use internal and external snapshots. (the second one is useful for backups).
2. Pure LVM. You can provide a LV to the guest as a simple raw device. Performance is better, but backup is more complicated. It's like a DB physical based backup.You create an LVM snapshot, mount that and then copy everything to external media and last -destroy the snapshot.

Note: If you use XFS with sparse qcow2 disks , you might hit a high ratio of fragmentation. It is best to preallocate the disk , if it's possible.
Using base disks can save you alot of disk space - if that is an issue.

User avatar
TrevorH
Site Admin
Posts: 33202
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: New KVM Host - Kernel and Storage

Post by TrevorH » 2018/10/07 00:25:58

Also worth noting that Redhat bought the people that wrote KVM so it's now their code.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

jackadmin
Posts: 3
Joined: 2018/10/06 06:48:26

Re: New KVM Host - Kernel and Storage

Post by jackadmin » 2018/10/08 14:05:56

hunter86_bg wrote:
2018/10/06 23:00:24
1. My understanding is that KVM is a part of the kernel. So all development is tied to kernel releases. Is there any point to upgrade to, for example, the latest stable kernel?
KVM is a "mix" . It shares the same space like the kernel and thus you can call it a type 1 Hypervisiour , while at the same time it is installed just like a type2 Hypervisiour .Yet, the kernel is created from the sources of RHEL , and Red Hat are backporting any security Vulnerabilities from the upstream.

Ok, then i don't see any major reason to move to a newer Kernel at this time.
2. Storage: Options, Options, Options :). It's hard to really find a best practice. I'm using local storage which I've setup as XFS volumes during install. My initial testing has been done by pre-creating QCOW2 volumes which reside on the XFS volumes. Is this a sustainable way to use my storage (SSD and HDD)?
You have multitude of options. I have used the following without any issues:
1. XFS/ext4 FS with qcow2 images. You can use internal and external snapshots. (the second one is useful for backups).
2. Pure LVM. You can provide a LV to the guest as a simple raw device. Performance is better, but backup is more complicated. It's like a DB physical based backup.You create an LVM snapshot, mount that and then copy everything to external media and last -destroy the snapshot.

Note: If you use XFS with sparse qcow2 disks , you might hit a high ratio of fragmentation. It is best to preallocate the disk , if it's possible.
Using base disks can save you alot of disk space - if that is an issue.
Ok perfect. I think I'll continue using XFS volumes with qcow2 images. I have already made them preallocated disks as i had problem with fragmentation when i was using Hyper-V and sparse vhdx files. I also presume these images can just directly copied (if the machine is off) and movd to another machine or archived?
TrevorH wrote:
2018/10/07 00:25:58
Also worth noting that Redhat bought the people that wrote KVM so it's now their code.
Interesting. I thought Red Hat developer KVM. Good to know.

hunter86_bg
Posts: 2019
Joined: 2015/02/17 15:14:33
Location: Bulgaria
Contact:

Re: New KVM Host - Kernel and Storage

Post by hunter86_bg » 2018/10/09 17:45:29

jackadmin wrote:
2018/10/08 14:05:56
Ok perfect. I think I'll continue using XFS volumes with qcow2 images. I have already made them preallocated disks as i had problem with fragmentation when i was using Hyper-V and sparse vhdx files. I also presume these images can just directly copied (if the machine is off) and movd to another machine or archived?
If you move from Hyper-V to KVM you can try 'qemu-img' to convert the disk from vhdx to qcow2.

jackadmin
Posts: 3
Joined: 2018/10/06 06:48:26

Re: New KVM Host - Kernel and Storage

Post by jackadmin » 2018/10/12 07:12:17

hunter86_bg wrote:
2018/10/09 17:45:29
jackadmin wrote:
2018/10/08 14:05:56
Ok perfect. I think I'll continue using XFS volumes with qcow2 images. I have already made them preallocated disks as i had problem with fragmentation when i was using Hyper-V and sparse vhdx files. I also presume these images can just directly copied (if the machine is off) and movd to another machine or archived?
If you move from Hyper-V to KVM you can try 'qemu-img' to convert the disk from vhdx to qcow2.
Good tip. I'll try that out first. Will save me some time.

Post Reply