CentOS 7 and PV HVM

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

CentOS 7 and PV HVM

Steffan A. Cline
With the changes in CentOS 7 not allowing for PV anymore, unless they fix it as the Red Hat log indicates they may, in reading I’m hearing that PVHVM is the way to go offering more advantages.

I tried using the configuration file shown on https://wiki.xen.org/wiki/Xen_Linux_PV_on_HVM_drivers but the errors returned are not very clear.

Currently I am using the kernel Linux h1.hldns.com 4.9.75-29.el7.x86_64 #1 SMP Fri Jan 5 19:42:28 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux and the Xen 4.6.6-10.el7 packages

Does anyone have a working config file for CentOS 7 I can try?


Steffan A. Cline
[hidden email]
602-793-0014





_______________________________________________
Xen-users mailing list
[hidden email]
https://lists.xenproject.org/mailman/listinfo/xen-users
Reply | Threaded
Open this post in threaded view
|

Re: CentOS 7 and PV HVM

Mark Pryor


hello,

when C7.4 was released in early August 2017. The above bug report was
where I learned about the pv domU kernel limitation.

The CentosPlus kernel was patched soon after and that gave us a workaround. Most frustrating to me was the flaw in 7.4 bootable media and also the pxeboot images. This meant we couldn't boot into a xen pv install using the `official` media ISO's.

I went ahead to build a new pxeboot pair based on the CentosPlus repaired kernel and then I remastered the minimal ISO using those tools. Below I show my fixed pxeboot pair.

results]$ ls -al images/pxeboot/
total 110972
drwxr-xr-x 2 root root     4096 Sep 21 19:12 .
drwxr-xr-x 3 root root     4096 Sep 21 19:12 ..
-rw-r--r-- 2 root root 50955588 Sep 21 19:10 initrd.img
-rw-r--r-- 2 root root 56606612 Sep 21 19:12 upgrade.img
-rwxr-xr-x 2 root root  5928336 Sep 12  2017 vmlinuz
[mockbuild@c7min:~/results]$ file images/pxeboot/vmlinuz
images/pxeboot/vmlinuz: Linux kernel x86 boot executable bzImage, version 3.10.0-693.2.2.el7.centos.plus.x86_64 ([hidden email], RO-rootFS, swap_dev 0x5, Normal VGA

Good news for us/you is this pv kernel limitation is a singular problem limited to the default C7.4 kernel and you have many options to workaround. Not only the CentosPlus kernel works to boot your domU, but also the elrepo kernel-LT and kernel-ML.

PryMar56
##xen-packaging on Freenode



On Sunday, March 18, 2018 11:48 PM, Steffan A. Cline <[hidden email]> wrote:


With the changes in CentOS 7 not allowing for PV anymore, unless they fix it as the Red Hat log indicates they may, in reading I’m hearing that PVHVM is the way to go offering more advantages.

I tried using the configuration file shown on https://wiki.xen.org/wiki/Xen_Linux_PV_on_HVM_drivers but the errors returned are not very clear.

Currently I am using the kernel Linux h1.hldns.com 4.9.75-29.el7.x86_64 #1 SMP Fri Jan 5 19:42:28 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux and the Xen 4.6.6-10.el7 packages

Does anyone have a working config file for CentOS 7 I can try?


Steffan A. Cline
602-793-0014





_______________________________________________
Xen-users mailing list



_______________________________________________
Xen-users mailing list
[hidden email]
https://lists.xenproject.org/mailman/listinfo/xen-users
Reply | Threaded
Open this post in threaded view
|

Re: CentOS 7 and PV HVM

Wiebe Cazemier
In reply to this post by Steffan A. Cline
----- Original Message -----
> From: "Steffan A. Cline" <[hidden email]>
> To: [hidden email]
> Sent: Monday, 19 March, 2018 07:30:21
> Subject: [Xen-users] CentOS 7 and PV HVM

> With the changes in CentOS 7 not allowing for PV anymore, unless they fix it as
> the Red Hat log indicates they may, in reading I’m hearing that PVHVM is the
> way to go offering more advantages.
>
> I tried using the configuration file shown on
> https://wiki.xen.org/wiki/Xen_Linux_PV_on_HVM_drivers but the errors returned
> are not very clear.
>
> Currently I am using the kernel Linux h1.hldns.com 4.9.75-29.el7.x86_64 #1 SMP
> Fri Jan 5 19:42:28 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux and the Xen
> 4.6.6-10.el7 packages
>
> Does anyone have a working config file for CentOS 7 I can try?
>
>

Can you post your current configs? I need to see what needs to happen to your disk volumes.

I'm currently in the process of converting all of our PV to HVM machines (which becomes PVHVM because of guest support). It involves creating new disk volumes with a grub stage1 and partition table, and then dd'ing the root volume into the partition.

I'm not sure if it's the only way in PV, but our PV machines don't have disks, only volumes; the PV guest doesn't have a disk with boot sector. That's why that's necessary.

We had to do the following on our Ubuntu PV DomUs (note, these are only for illustration, your situation will be different):

- which upstart-local-bridge && apt-get -o Dpkg::Options::="--force-confmiss" install --reinstall upstart # make VGA agetty work on upstart machines
- apt-get install grub2 (but say no to installing on /dev/xvdaX)
- update-grub2
- cp -a /usr/lib/grub/i386-pc/ /boot/grub/
- fstab -> change root partition (in my case /dev/xvda2) to UUID notation (found in /dev/disk/by-uuid)
- fstab -> comment and swap and fix later.
- update-initramfs -u

The config file needs minimal changes: set builder="hvm", change the disk volumes to a full disk, remove some superfluous statements (root directive, pygrub boot loader, etc).

Once booted in VM:
- update-grub2
- grub-install /dev/xvda
- fix swap (mkswap /dev/xvda2 and correct fstab in my case)
- reboot




_______________________________________________
Xen-users mailing list
[hidden email]
https://lists.xenproject.org/mailman/listinfo/xen-users
Reply | Threaded
Open this post in threaded view
|

Re: CentOS 7 and PV HVM

Steffan A. Cline
In reply to this post by Mark Pryor
Until Red Hat officially fixes it, the easiest fix is to just revert to a kernel that will boot then

# yum -y install kernel-plus --enablerepo=centosplus
# reboot

Works great with no issues that I can see.


Steffan A. Cline
602-793-0014




On Mar 20, 2018, at 12:36 PM, Mark Pryor <[hidden email]> wrote:



hello,

when C7.4 was released in early August 2017. The above bug report was
where I learned about the pv domU kernel limitation.

The CentosPlus kernel was patched soon after and that gave us a workaround. Most frustrating to me was the flaw in 7.4 bootable media and also the pxeboot images. This meant we couldn't boot into a xen pv install using the `official` media ISO's.

I went ahead to build a new pxeboot pair based on the CentosPlus repaired kernel and then I remastered the minimal ISO using those tools. Below I show my fixed pxeboot pair.

results]$ ls -al images/pxeboot/
total 110972
drwxr-xr-x 2 root root     4096 Sep 21 19:12 .
drwxr-xr-x 3 root root     4096 Sep 21 19:12 ..
-rw-r--r-- 2 root root 50955588 Sep 21 19:10 initrd.img
-rw-r--r-- 2 root root 56606612 Sep 21 19:12 upgrade.img
-rwxr-xr-x 2 root root  5928336 Sep 12  2017 vmlinuz
[mockbuild@c7min:~/results]$ file images/pxeboot/vmlinuz
images/pxeboot/vmlinuz: Linux kernel x86 boot executable bzImage, version 3.10.0-693.2.2.el7.centos.plus.x86_64 ([hidden email], RO-rootFS, swap_dev 0x5, Normal VGA

Good news for us/you is this pv kernel limitation is a singular problem limited to the default C7.4 kernel and you have many options to workaround. Not only the CentosPlus kernel works to boot your domU, but also the elrepo kernel-LT and kernel-ML.

PryMar56
##xen-packaging on Freenode



On Sunday, March 18, 2018 11:48 PM, Steffan A. Cline <[hidden email]> wrote:


With the changes in CentOS 7 not allowing for PV anymore, unless they fix it as the Red Hat log indicates they may, in reading I’m hearing that PVHVM is the way to go offering more advantages.

I tried using the configuration file shown on https://wiki.xen.org/wiki/Xen_Linux_PV_on_HVM_drivers but the errors returned are not very clear.

Currently I am using the kernel Linux h1.hldns.com 4.9.75-29.el7.x86_64 #1 SMP Fri Jan 5 19:42:28 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux and the Xen 4.6.6-10.el7 packages

Does anyone have a working config file for CentOS 7 I can try?


Steffan A. Cline
602-793-0014





_______________________________________________
Xen-users mailing list


_______________________________________________
Xen-users mailing list
[hidden email]
https://lists.xenproject.org/mailman/listinfo/xen-users


_______________________________________________
Xen-users mailing list
[hidden email]
https://lists.xenproject.org/mailman/listinfo/xen-users