Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

shared.cfg.guest-os: Add RHEL.8 variant config files #1942

Closed
wants to merge 1 commit into from

Conversation

rdkdd
Copy link
Contributor

@rdkdd rdkdd commented Jan 25, 2019

This patch adds RHEL.8 variant which takes whatever
isos/linux/RHEL8-{subverion}-{x86_64,ppc64,aarch64}.iso image exists and
uses it to install RHEL8-like OS.

Signed-off-by: Radek Duda [email protected]

@PaulYuuu
Copy link
Contributor

@yanan-fu Request your help to review it. I'm not sure how we did it before.

@yanan-fu
Copy link
Contributor

Usually, we add related guest-os configuration here after it was released. For RHEL8, obviously not now.
So, i do not think it is a good timing to add it now.

@rdkdd
Copy link
Contributor Author

rdkdd commented Jan 28, 2019

@yanan-fu RHEL8 beta was already released to public (https://developers.redhat.com/rhel8/getrhel8/). But now I am not sure if we should include 8.0.cfg file. What is your opinion @ldoktor ?

@ldoktor
Copy link
Contributor

ldoktor commented Jan 28, 2019

As for the "RHEL.8.devel" that is already out there and would be useful to have. As for the "RHEL.8.0" that should not be here as it does not exists yet (fixed versions have to have hashes set).

no guest_s3, guest_s4
mem_chk_cmd = numactl --hardware | awk -F: '/size/ {print $2}'
netdev_peer_re = "(.*?): .*?\\\s(.*?):"
unattended_install..floppy_ks:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The "unattended_install..floppy_ks" is filtered-out in RHEL.7 on ppc64/ppc64le. I'm not 100% certain on that but isn't floppy supported only on x86 in qemu? Also note that on Fedora we have the floppy_ks disabled on all archs as floppy ks is not really supported, maybe it's time to do the same here...

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note if that wasn't clear, I meant to ask you to filter-out floppy at least for ppc64/ppc64le and remove those custom settings. But ideally filter-out floppy everywhere. Should someone need it, they can enable it again...

Copy link
Contributor

@ldoktor ldoktor Jan 28, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

... I mean, have you tested that variant? Does it work? (even just on x86)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@luckyh thanks for info

@@ -0,0 +1,9 @@
- 0:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

as mentioned in the main chat, this should not be here as 8.0 is not yet released and then it'll require the DVD/kernel/initrd hashes specified.

# and adding per-arch image shas.
image_name = images/${os_variant}devel-${vm_arch_name}
unattended_install.cdrom:
cdrom_cd1 = isos/linux/RHEL8-devel-${vm_arch_name}.iso
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It used to be called RHEL-7-devel-$arch.iso, would you mind adjusting this to RHEL-8-devel-${vm_arch_name}.iso to comply?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have probably copied this from

cdrom_cd1 = isos/linux/RHEL7-devel-x86_64.iso

It should be corrected on both locations then.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, please

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I made a PR #1950 , which corrects cdrom_cd1 filenames.

os_variant = rhel8
unattended_install.url:
#Running from http server, RHEL requires more memory
mem = 4096
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this really required? I'm using 1.5G for standard and 2G for url installation in my CI and it works well... (or is it mentioned somewhere as a minimum? Do you have a link to documentation?)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do not know. I have copied this bit from 7.devel.cfg file. If 2G works for you, we can set this to be 2G. It was commited here d95909d with commit message snippet: ..installing RHEL over http fails with memory set to 1024.. I do not know why increase memory to 2048 was not enough.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, please. 2G should suffice... (I have one machine with only 4G which might be problematic. I know, I can override the default, but...)

floppies = "fl"
floppy_name = images/${os_variant}-${vm_arch_name}/ks.vfd
ppc64le:
no guest_s3, guest_s4
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would be good to double-check whether suspend/hibernate is supported in RHEL.8 (it was not in RHEL.7, which is the reason for those...)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can suspend/hibernate VM according to https://www.linux-kvm.org/page/PowerManagement. I tested this, but I was not able to wake up VM afterwards (maybe to send some key is not enough - do not know). There is also possibility to suspend and resume VM using virsh. I tested this and for RHEL.8 x86_64 it works. I did not find any official documentation regarding (un)support of suspend/hibernate. So I am not sure about that.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The virsh suspend should be a different feature. Anyway see the email from David, it is not supported so please keep it here until someone asks it to enable this.

@rdkdd
Copy link
Contributor Author

rdkdd commented Feb 1, 2019

I have incorporated your suggestions. Please review again @ldoktor @luckyh @yanan-fu @PaulYuuu

@rdkdd rdkdd changed the title shared.cfg.guest_os: Add RHEL.8 variant config files shared.cfg.guest-os: Add RHEL.8 variant config files Feb 1, 2019
aarch64:
grub_file = /boot/grub/grub.conf
install_timeout = 7200
ppc64:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@PaulYuuu corrected, thanks.

Copy link
Contributor

@ldoktor ldoktor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, looks good, tried booting x86_64 and reviewed the changes...

@rdkdd
Copy link
Contributor Author

rdkdd commented Feb 12, 2019

@PaulYuuu @luckyh could you review/merge please? Thank you.

@luckyh
Copy link
Contributor

luckyh commented Feb 13, 2019

@rdkdd ok, I'll take a look at this patch soon, thanks.

unattended_install, svirt_install:
kernel = images/${os_variant}-${vm_arch_name}/vmlinuz
initrd = images/${os_variant}-${vm_arch_name}/initrd.img
unattended_install, check_block_size.4096_512, check_block_size.512_512, svirt_install:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Incorrect indentation at here, looks like requiring an one-level left shifting for the rest part.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@luckyh corrected thanks

This patch adds RHEL.8 variant which takes whatever
isos/linux/RHEL8-{subverion}-{x86_64,ppc64,aarch64}.iso image exists and
uses it to install RHEL8-like OS.

Signed-off-by: Radek Duda <[email protected]>
initrd = images/${os_variant}-${vm_arch_name}/initrd.img
# ARCH dependent things
aarch64:
grub_file = /boot/grub/grub.conf
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For aarch64, no this file, but /boot/efi/EFI/redhat/grub.cfg

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@yanan-fu are you sure? Is there any documentation about it? There is the same path for aarch64 in case of RHEL.7.devel

grub_file = /boot/grub/grub.conf

So this line needs correction as well?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, i checked with a latest rhel8 host for arm:

[root@hp-moonshot-03-c07 ~]# uname -r
4.18.0-67.el8.aarch64
[root@hp-moonshot-03-c07 ~]# ls /boot/grub2/
grubenv
[root@hp-moonshot-03-c07 ~]# ls /boot/efi/EFI/redhat/grub.cfg 
/boot/efi/EFI/redhat/grub.cfg

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rdkdd For aarch64 vm, result is same with above.
From this document: https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8-beta/html-single/8.0_beta_release_notes/index#infrastructure_services_3
it use /etc/grub2.cfg, and it is a soft link:
aarch64:

ll /etc/grub2-efi.cfg 
lrwxrwxrwx. 1 root root 31 Oct 19 17:42 /etc/grub2-efi.cfg -> ../boot/efi/EFI/redhat/grub.cfg

x86:

ll /etc/grub2.cfg 
lrwxrwxrwx. 1 root root 22 Dec 19 13:02 /etc/grub2.cfg -> ../boot/grub2/grub.cfg

For RHEL.7.devel, i am not very sure what it used for since i never use it. What i know is RHEL-ALT, aarch64 use /boot/efi/EFI/redhat/grub.cfg too. @ldoktor do you know it ?

unattended_install.cdrom:
cdrom_cd1 = isos/linux/RHEL-8-devel-${vm_arch_name}.iso
unattended_install, check_block_size.4096_512, check_block_size.512_512, svirt_install:
unattended_file = unattended/RHEL-8-devel.ks
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would you add RHEL-8-devel.ks too ? or a separate commit/patch ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hi @yanan-fu,
we - SPICE-QE use custom kickstart file for RHEL-8.
I would create ks file for RHEL-8 here as well, but Appstream repo is needed to install @Workstation group. I do not know how to include it without explicitly specifying our internal path to the repo. Any hint?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, good point, I forgot about the kickstart file. Would you please add it with commented repo entry with a comment that one should add his own url? Besides, specifying url directly from kickstart does not work: https://bugzilla.redhat.com/show_bug.cgi?id=1649359

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rdkdd AFAIK, currently, RHEL8 iso include both BaseOs and AppStream, no need to add AppStream repo extra if install from iso.
Also, you can refer this commit 81f9de5. We support to add extra repo in ks:

  1. Define kickstart_extra_repos in test.
  2. Add KVM_TEST_REPOS in ks.

@rdkdd
Copy link
Contributor Author

rdkdd commented Feb 15, 2019

Closing this in favor of #1963. @yanan-fu I have incorporated your remarks. Please review this new PR @yanan-fu , @ldoktor , @PaulYuuu , @luckyh and possibly merga. Thank you!

@rdkdd rdkdd closed this Feb 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants