I'm looking at a CentOS 5 Xen server that I'd really like to put some more recent VM's. There are reasons not to touch it at the moment, so I can't upgrade it in place today.
Has anyone successfully installed a CentOS 6 VM, paravirtualized, on a CentOS 5 Xen server , without significant Xen upgrades? If so, can I get a copy from a reputable source, or one that I can review before using? I'm having a bit of difficulty arranging a PXE enironment to do a paraviirtualized installation with, and there are apparently difficulties doing a paravirtualzed system with CD or DVD installation with Xen.
Nico Kadel-Garcia nkadel@gmail.com
On Thu, Mar 12, 2015 at 10:34:39PM -0400, Nico Kadel-Garcia wrote:
I'm looking at a CentOS 5 Xen server that I'd really like to put some more recent VM's. There are reasons not to touch it at the moment, so I can't upgrade it in place today.
Has anyone successfully installed a CentOS 6 VM, paravirtualized, on a CentOS 5 Xen server , without significant Xen upgrades? If so, can I get a copy from a reputable source, or one that I can review before using? I'm having a bit of difficulty arranging a PXE enironment to do a paraviirtualized installation with, and there are apparently difficulties doing a paravirtualzed system with CD or DVD installation with Xen.
Nico Kadel-Garcia <nkadel@gmail.com>
Yep, CentOS 6 VMs run just fine on CentOS 5 Xen host.
-- Pasi
On Sun, Mar 15, 2015 at 3:17 PM, Pasi Kärkkäinen pasik@iki.fi wrote:
On Thu, Mar 12, 2015 at 10:34:39PM -0400, Nico Kadel-Garcia wrote:
I'm looking at a CentOS 5 Xen server that I'd really like to put some more recent VM's. There are reasons not to touch it at the moment, so I can't upgrade it in place today.
Has anyone successfully installed a CentOS 6 VM, paravirtualized, on a CentOS 5 Xen server , without significant Xen upgrades? If so, can I get a copy from a reputable source, or one that I can review before using? I'm having a bit of difficulty arranging a PXE enironment to do a paraviirtualized installation with, and there are apparently difficulties doing a paravirtualzed system with CD or DVD installation with Xen.
Nico Kadel-Garcia <nkadel@gmail.com>
Yep, CentOS 6 VMs run just fine on CentOS 5 Xen host.
I've got CentOS VM's running fine, and have done them before. But previously, I deployed the same base OS on the VM as on the Xen server, so paravirtualization posed few risks. And I had control of the DHCP setup. so I could trivially set up a tftp server to do a non-CD installation, because Xen, at last look, doesn't support installing a paravirtualized host from a CD image.
So I'm right back to my effectively unanswered original questions. So please: I asked a very specific pair of questions, and they remain unanswered. CentOS 5 Xen server (hypervisor, or Dom0, whatever we want to call it this week): Does CentOS 6 work, paravirtualized, on such a server? And given my deployment issues, does anyone have a base OS image I can get a copy of?
On 03/16/2015 11:25 AM, Nico Kadel-Garcia wrote:
I've got CentOS VM's running fine, and have done them before. But previously, I deployed the same base OS on the VM as on the Xen server, so paravirtualization posed few risks. And I had control of the DHCP setup. so I could trivially set up a tftp server to do a non-CD installation, because Xen, at last look, doesn't support installing a paravirtualized host from a CD image.
It does as long as (1) the kernel has Xen PV support (CentOS 6 standard kernel does) and (2) it has the necessary drivers in the initrd (I think this is where the CD image is lacking), then you should, in theory, be able to pv-grub boot to the CD. Alternatively you can boot to the CD on another box first, copy the kernel off to a USB stick, and generate a new initrd with the xen drivers included, then put those on the Xen host and boot to the VM CD image using those in the kernel= and initrd= lines in the domain.cfg file.
The other way is to boot to the CD as an HVM domain and install, then convert it to a PV domain afterwards, which is not all that difficult to do.
There is a third way which involves using yum to install the @core group plus kernel to an image, then tweak and boot to that as a PV domain. This is how I have done it in the past.
So I'm right back to my effectively unanswered original questions. So please: I asked a very specific pair of questions, and they remain unanswered. CentOS 5 Xen server (hypervisor, or Dom0, whatever we want to call it this week): Does CentOS 6 work, paravirtualized, on such a server?
Yes, I have done that until I upgraded the CentOS 5 host to CentOS 6 a couple years ago.
And given my deployment issues, does anyone have a base OS image I can get a copy of?
Sorry my image templates that I use are highly customized for my own work, but I have told you three different ways to accomplish it above.
Peter
On Sun, Mar 15, 2015 at 8:11 PM, Peter peter@pajamian.dhs.org wrote:
On 03/16/2015 11:25 AM, Nico Kadel-Garcia wrote:
I've got CentOS VM's running fine, and have done them before. But previously, I deployed the same base OS on the VM as on the Xen server, so paravirtualization posed few risks. And I had control of the DHCP setup. so I could trivially set up a tftp server to do a non-CD installation, because Xen, at last look, doesn't support installing a paravirtualized host from a CD image.
It does as long as (1) the kernel has Xen PV support (CentOS 6 standard kernel does) and (2) it has the necessary drivers in the initrd (I think this is where the CD image is lacking), then you should, in theory, be able to pv-grub boot to the CD. Alternatively you can boot to the CD on
Not according to the Xen guidelines I was finding. If they're incorrect, *for a CentOS 5 Xen hypervisor*, I'd love to be able to use that. Unfortunately, one of the banes of my technology existence is when people say "that works great!" and "just look on Google,!", and the answer they vaguely remember does not actually include the situation I desdcribed.
another box first, copy the kernel off to a USB stick, and generate a new initrd with the xen drivers included, then put those on the Xen host and boot to the VM CD image using those in the kernel= and initrd= lines in the domain.cfg file.
Ouch. I've hand-modified CD and DVD images in the past, it's a pain the neck, It's been compunded by the insistece that the compressed "vmlinuz" file is, itself, named "vmlinuz" instead of "vmlinuz.gz", which always struck me as fairly nutty.
The other way is to boot to the CD as an HVM domain and install, then convert it to a PV domain afterwards, which is not all that difficult to do.
This would probably be safest for me right now, since I have a testable HVM instance of CentOS 6 to copy and work with. I'm not finding any good guidelines for migrating from HVM to paravirtualizaton for old Xen environments. Have you seen any, or done this process? The notes I find often include extraneous and hopefully unnecessary steps, such as http://support.citrix.com/article/CTX121875 saying. It's legible, but leaves out the kind of incompatibility issues that I;ve been concerned about hopping from a Xen server on CentOS 5.x to a CentOS 6.x guest.
There is a third way which involves using yum to install the @core group plus kernel to an image, then tweak and boot to that as a PV domain. This is how I have done it in the past.
I'm sorry, but what? Are you building a chroot cage yourself, such as using 'mock', or are you starting with someone else's working para-virtualized image? (See my notes above).
So I'm right back to my effectively unanswered original questions. So please: I asked a very specific pair of questions, and they remain unanswered. CentOS 5 Xen server (hypervisor, or Dom0, whatever we want to call it this week): Does CentOS 6 work, paravirtualized, on such a server?
Yes, I have done that until I upgraded the CentOS 5 host to CentOS 6 a couple years ago.
Thanks! THAT is one of the questions I really wanted an answer for.
And given my deployment issues, does anyone have a base OS image I can get a copy of?
Sorry my image templates that I use are highly customized for my own work, but I have told you three different ways to accomplish it above.
Well, dang!
On 03/15/2015 03:25 PM, Nico Kadel-Garcia wrote:
So I'm right back to my effectively unanswered original questions. So please: I asked a very specific pair of questions, and they remain unanswered. CentOS 5 Xen server (hypervisor, or Dom0, whatever we want to call it this week): Does CentOS 6 work, paravirtualized, on such a server? And given my deployment issues, does anyone have a base OS image I can get a copy of?
I'm not sure why you need tftp to do a net install assuming you control the guest configuration.
How about
kernel = file from https://mirrors.kernel.org/centos/6/os/i386/images/pxeboot/vmlinuz ramdisk = file from https://mirrors.kernel.org/centos/6/os/i386/images/pxeboot/initrd.img extra = "console=hvc0" memory = 512 or larger
--Sarah
On Sun, Mar 15, 2015 at 8:26 PM, Sarah Newman srn@prgmr.com wrote:
On 03/15/2015 03:25 PM, Nico Kadel-Garcia wrote:
So I'm right back to my effectively unanswered original questions. So please: I asked a very specific pair of questions, and they remain unanswered. CentOS 5 Xen server (hypervisor, or Dom0, whatever we want to call it this week): Does CentOS 6 work, paravirtualized, on such a server? And given my deployment issues, does anyone have a base OS image I can get a copy of?
I'm not sure why you need tftp to do a net install assuming you control the guest configuration.
How about
kernel = file from https://mirrors.kernel.org/centos/6/os/i386/images/pxeboot/vmlinuz ramdisk = file from https://mirrors.kernel.org/centos/6/os/i386/images/pxeboot/initrd.img extra = "console=hvc0" memory = 512 or larger
--Sarah
I'll be happy to try this. Thank you for the pointer. Are you confident that 'console=hvc0' is the right installation time message for this? And will I be able to access a CD or DVD image for actual OS installation with these options?
I'd really prefer to work from 'virsh' than from hand-writing xl configuration files.When I last did this sort of thing, I worked from a PXE environment that I controlled and could reserve DHCP settings based on MAC addresses, and tune PXE to boot from disk by default but allow users to select a clean re-install of the operating system they wanted.
On 03/15/2015 07:39 PM, Nico Kadel-Garcia wrote:
On Sun, Mar 15, 2015 at 8:26 PM, Sarah Newman srn@prgmr.com wrote:
On 03/15/2015 03:25 PM, Nico Kadel-Garcia wrote:
So I'm right back to my effectively unanswered original questions. So please: I asked a very specific pair of questions, and they remain unanswered. CentOS 5 Xen server (hypervisor, or Dom0, whatever we want to call it this week): Does CentOS 6 work, paravirtualized, on such a server? And given my deployment issues, does anyone have a base OS image I can get a copy of?
I'm not sure why you need tftp to do a net install assuming you control the guest configuration.
How about
kernel = file from https://mirrors.kernel.org/centos/6/os/i386/images/pxeboot/vmlinuz ramdisk = file from https://mirrors.kernel.org/centos/6/os/i386/images/pxeboot/initrd.img extra = "console=hvc0" memory = 512 or larger
--Sarah
I'll be happy to try this. Thank you for the pointer. Are you confident that 'console=hvc0' is the right installation time message for this? And will I be able to access a CD or DVD image for actual OS installation with these options?
It is net install IE you download packages over the network. No CD/DVD.
console=hvc0 is the xen part, otherwise look at the standard installation instructions for centos 6.
I'd really prefer to work from 'virsh' than from hand-writing xl configuration files.When I last did this sort of thing, I worked from a PXE environment that I controlled and could reserve DHCP settings based on MAC addresses, and tune PXE to boot from disk by default but allow users to select a clean re-install of the operating system they wanted.
virt-install with --location maybe? Never tried it but it looks like what you want.
On Sun, Mar 15, 2015 at 07:52:42PM -0700, Sarah Newman wrote:
I'd really prefer to work from 'virsh' than from hand-writing xl configuration files.When I last did this sort of thing, I worked from a PXE environment that I controlled and could reserve DHCP settings based on MAC addresses, and tune PXE to boot from disk by default but allow users to select a clean re-install of the operating system they wanted.
virt-install with --location maybe? Never tried it but it looks like what you want.
Yeah you can use virt-install on CentOS 5 Xen host to install CentOS 6 PV domUs, I do that often, an example for GUI installation:
virt-install -d -n vmname -r 1024 --vcpus=2 -f /dev/vg01/vmname_disk0 -b virbr0 --vnc -p -l "http://ftp.funet.fi/pub/mirrors/centos.org/6.5/os/x86_64"
(you need to have virt-viewer installed, that'll be used to display the VNC GUI console).
-- Pasi
On 03/16/2015 08:58 AM, Pasi Kärkkäinen wrote:
On Sun, Mar 15, 2015 at 07:52:42PM -0700, Sarah Newman wrote:
I'd really prefer to work from 'virsh' than from hand-writing xl configuration files.When I last did this sort of thing, I worked from a PXE environment that I controlled and could reserve DHCP settings based on MAC addresses, and tune PXE to boot from disk by default but allow users to select a clean re-install of the operating system they wanted.
virt-install with --location maybe? Never tried it but it looks like what you want.
Yeah you can use virt-install on CentOS 5 Xen host to install CentOS 6 PV domUs, I do that often, an example for GUI installation:
virt-install -d -n vmname -r 1024 --vcpus=2 -f /dev/vg01/vmname_disk0 -b virbr0 --vnc -p -l "http://ftp.funet.fi/pub/mirrors/centos.org/6.5/os/x86_64"
(you need to have virt-viewer installed, that'll be used to display the VNC GUI console).
-- Pasi
Quote from an actual installation:
[root@xenh4 ~]# history| grep virt virt-install -n dhcpdns -p -r 1024 --os-type=linux --vnc -f /var/lib/xen/images/dhcpdns -s 2 -l http://192.168.50.40/mrepo/centos6-i386/disc1 -x "ks=ftp://192.168.50.40/linux/ks-minimalC6-xen.cfg"
[root@xenh4 ~]# uname -a Linux xenh4 2.6.18-400.1.1.el5xen #1 SMP Thu Dec 18 02:18:37 EST 2014 i686 i686 i386 GNU/Linux
https://github.com/CentOS/Community-Kickstarts/blob/master/ks-minimalC6.cfg is quite close to the above mentioned ks-minimalC6-xen.cfg ( actually both are descendants of the same template of mine )
On Mon, Mar 16, 2015 at 4:02 AM, Manuel Wolfshant wolfy@nobugconsulting.ro wrote:
Quote from an actual installation:
[root@xenh4 ~]# history| grep virt virt-install -n dhcpdns -p -r 1024 --os-type=linux --vnc -f /var/lib/xen/images/dhcpdns -s 2 -l http://192.168.50.40/mrepo/centos6-i386/disc1 -x "ks=ftp://192.168.50.40/linux/ks-minimalC6-xen.cfg"
[root@xenh4 ~]# uname -a Linux xenh4 2.6.18-400.1.1.el5xen #1 SMP Thu Dec 18 02:18:37 EST 2014 i686 i686 i386 GNU/Linux
https://github.com/CentOS/Community-Kickstarts/blob/master/ks-minimalC6.cfg is quite close to the above mentioned ks-minimalC6-xen.cfg ( actually both are descendants of the same template of mine )
Thanks!!!! The key, hinted at by various notes in this thread, was the use of the "--location" to point to a network accessibleinstallation repository. I'm afraid that the Xen wiki directions about "--location" are a bit unclear about the need for this to be the base of a deployment directory, one that *must* have a working subdirectory called 'imagex/xen' with the relevant files in it. I admint, I have to just love hardcoded, hidden requirements!!!
I'll point out for others who may need to image systems quickly that it's often more effective, especially in terms of speed and external bandwidth, to use an internal mirror as you did. I'll also point out that it can be awfully handy to keep such a mirror up-to-date and use it your local configurations. I publish such scripts at https://github.com/nkadel/nkadel-rsync-scripts, in case anyone else wants them.
I'll also mention my old habit in ks.cfg files of doing this, to hang onto the actual ks.cfg instead of the confused and '%pre' and '%post' stripped, anaconda reverse engineered oddness in /root/anaconda-ks.cfg.
%pre cp -f /tmp/ks.cfg /mnt/sysimage/root/ks.cfg %end
On Mon, Mar 16, 2015 at 10:32 PM, Nico Kadel-Garcia nkadel@gmail.com wrote:
On Mon, Mar 16, 2015 at 4:02 AM, Manuel Wolfshant wolfy@nobugconsulting.ro wrote:
Quote from an actual installation:
[root@xenh4 ~]# history| grep virt virt-install -n dhcpdns -p -r 1024 --os-type=linux --vnc -f /var/lib/xen/images/dhcpdns -s 2 -l http://192.168.50.40/mrepo/centos6-i386/disc1 -x "ks=ftp://192.168.50.40/linux/ks-minimalC6-xen.cfg"
[root@xenh4 ~]# uname -a Linux xenh4 2.6.18-400.1.1.el5xen #1 SMP Thu Dec 18 02:18:37 EST 2014
i686
i686 i386 GNU/Linux
https://github.com/CentOS/Community-Kickstarts/blob/master/ks-minimalC6.cfg
is quite close to the above mentioned ks-minimalC6-xen.cfg ( actually
both
are descendants of the same template of mine )
Thanks!!!! The key, hinted at by various notes in this thread, was the use of the "--location" to point to a network accessibleinstallation repository. I'm afraid that the Xen wiki directions about "--location" are a bit unclear about the need for this to be the base of a deployment directory, one that *must* have a working subdirectory called 'imagex/xen' with the relevant files in it. I admint, I have to just love hardcoded, hidden requirements!!!
I'll point out for others who may need to image systems quickly that it's often more effective, especially in terms of speed and external bandwidth, to use an internal mirror as you did. I'll also point out that it can be awfully handy to keep such a mirror up-to-date and use it your local configurations. I publish such scripts at https://github.com/nkadel/nkadel-rsync-scripts, in case anyone else wants them.
I'll also mention my old habit in ks.cfg files of doing this, to hang onto the actual ks.cfg instead of the confused and '%pre' and '%post' stripped, anaconda reverse engineered oddness in /root/anaconda-ks.cfg.
%pre cp -f /tmp/ks.cfg /mnt/sysimage/root/ks.cfg %end
Nico, I wrote tutorials on how to do this when I was using xen. I haven't used these tutorials in a couple of years but they worked then so they should still work now. This is for an automated CentOS 6 (x86_64).
http://grantmcwilliams.com/item/538-centos-6-virtual-machine-64-bit-installa...
Grant McWilliams http://grantmcwilliams.com/
Some people, when confronted with a problem, think "I know, I'll use Windows." Now they have two problems.
On Wed, Mar 18, 2015 at 9:11 PM, Grant McWilliams grantmasterflash@gmail.com wrote:
Nico, I wrote tutorials on how to do this when I was using xen. I haven't used these tutorials in a couple of years but they worked then so they should still work now. This is for an automated CentOS 6 (x86_64).
http://grantmcwilliams.com/item/538-centos-6-virtual-machine-64-bit-installa...
Grant McWilliams http://grantmcwilliams.com/
I'm reading your notes. They're not bad, but they make me nervous in a number of ways.
* VM's should *always* be assigned stable, but unique MAC's for the network devices. This prevents the udev settings, and tendency of tools like NetworkManager and anaconda from being unable to configure network devices that they've stored hard-coded MAC addresses for. There is *no* GUI or built-in command line tool for clearing these, you have to do it by hand. There are various ways to deal with this, but allowing the virt-install or similar tools to assign a MAC *once* and then locking it down in the config file is quite effective.
Pre-planning your MAC addresses also allows DHCP reservations to be configured, very useful for PXE setups and stabilizing your DNS and firewall configuraitons.
* Don't install rpmforge anymore by default: it's effectively moribund since Dag Weiers moved on to other projects, and isn't getting updates. You can now install EPEL with 'yum install epel-release, and unless you need tools that overlap with CentOS tools it's much safer. (I wrote the last few subversion RPM's for RPMforge, and have been waiting way too long for updates to be accepted.)
* Frankly, the use of 'virt-install' with a "--location" setting to point to the online kernels from a relevant source repository, and some options to select a disk image size, seems to skip gracefully over all the "manually build your disk image" and "manually edit your /etc/xen/[config] file..
Some people, when confronted with a problem, think "I know, I'll use Windows." Now they have two problems.
CentOS-virt mailing list CentOS-virt@centos.org http://lists.centos.org/mailman/listinfo/centos-virt