Hello All!
I have a lot of virtual machines with KVM hypervizor. For VM's disks I use LVM Volumes. It's more suitable to install virtual machines direct to the LV-volumes without making partition tables inside the LV. In this case it is very simple to perform online-resizing and mount snapshots in host system to perform backups.
So, my question is:
Is it possible to install CentOS 6 without disk partitioning?
P.S. At this time my host OS and virtual machines (guests) are ubuntu 12.04. Also I want to have some virtual machines running CentOS 6
On 25.11.2013 20:28, Халезов Иван wrote:
Hello All!
I have a lot of virtual machines with KVM hypervizor. For VM's disks I use LVM Volumes. It's more suitable to install virtual machines direct to the LV-volumes without making partition tables inside the LV. In this case it is very simple to perform online-resizing and mount snapshots in host system to perform backups.
So, my question is:
Is it possible to install CentOS 6 without disk partitioning?
On Mon, Nov 25, 2013 at 11:34 AM, Халезов Иван i.khalezov@rts.ru wrote:
P.S. At this time my host OS and virtual machines (guests) are ubuntu 12.04. Also I want to have some virtual machines running CentOS 6
On 25.11.2013 20:28, Халезов Иван wrote:
Hello All!
I have a lot of virtual machines with KVM hypervizor. For VM's disks I use LVM Volumes. It's more suitable to install virtual machines direct to the LV-volumes without making partition tables inside the LV. In this case it is very simple to perform online-resizing and mount snapshots in host system to perform backups.
So, my question is:
Is it possible to install CentOS 6 without disk partitioning?
Not possible with grub1 (legacy grub). Grub1 doesn't support booting off LVM, so you'll have to have a separate /boot partition.
If grub2 were available in CentOS 6 (and it isn't - rumors are maybe in EL7) then it would be possible to have /boot reside on LVM. Some time ago I set up a system without a separate /boot partition on LVM with grub2 using Debian (I did the same with a Fedora system since).
I don't see an issue with having a separate statically sized /boot partition. 100MB for CentOS 5 and 512MB or so for CentOS 6. Besides, what is on /boot that really needs to be backed up? Probably not much of anything that's different from any other system.
-- С уважением, Халезов Иван Системный администратор, отдел разработки ПО НП РТС
CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
I think you are asking if it is possible to install centos virtual machines without partitioning its LVM block device. I think you do not want to use any partitioning or LVM within your virtual machine?
Yes, this is possible however it is annoying to make work as, iirc, the anaconda installer requires partitions. It will not install on a raw block device.
People have made this work however but I am unsure how.
What will you do about a swap partition?
On 25 November 2013 16:28, Халезов Иван i.khalezov@rts.ru wrote:
Hello All!
I have a lot of virtual machines with KVM hypervizor. For VM's disks I use LVM Volumes. It's more suitable to install virtual machines direct to the LV-volumes without making partition tables inside the LV. In this case it is very simple to perform online-resizing and mount snapshots in host system to perform backups.
So, my question is:
Is it possible to install CentOS 6 without disk partitioning?
-- With best regards, Khalezov Ivan
CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
On 11/26/2013 05:28 AM, Халезов Иван wrote:
Is it possible to install CentOS 6 without disk partitioning?
Yes, it is, but there are a couple of caveats:
1. You can't use anaconda to do so directly.
2. You can't boot through grub (as someone else pointed out). You can boot the kernel directly or boot through something similar to grub, such as pvgrub (for Xen, which I know from experience works with this type of setup).
I know of two different ways to do it. The first way is to just do a regular install to a partitioned image with anaconda, then you can copy the whole thing over to a non-partitioned filesystem.
The second way is to use yum. You would have to find a yum package that runs in ubuntu, then use yum with the --config (for a custom config file to point to the CentOS repos) and --installroot (to point to your mounted filesystem, instead of the root of the current host system), and do something like this:
yum --config=centos6.conf --installroot=/path/to/mountpoint groupinstall core
Then you can chroot into the new fs (after bind mounting /proc /sys and /dev) and set your root password, edit your network config (/etc/sysconfig/network-scripts files) yum install any other packages you want, and so on.
I recommend that for either method you choose, when yo've tweaked it how you like for a basic VM, you tarball all the files up and use it as a template for future installs.
For swap you can either pass in a second block device or use a swap file (I use a swap file and it works just fine).
Peter
On 25.11.2013 23:56, Peter wrote:
On 11/26/2013 05:28 AM, Халезов Иван wrote:
Is it possible to install CentOS 6 without disk partitioning?
Yes, it is, but there are a couple of caveats:
You can't use anaconda to do so directly.
You can't boot through grub (as someone else pointed out). You can
boot the kernel directly or boot through something similar to grub, such as pvgrub (for Xen, which I know from experience works with this type of setup).
I know of two different ways to do it. The first way is to just do a regular install to a partitioned image with anaconda, then you can copy the whole thing over to a non-partitioned filesystem.
The second way is to use yum. You would have to find a yum package that runs in ubuntu, then use yum with the --config (for a custom config file to point to the CentOS repos) and --installroot (to point to your mounted filesystem, instead of the root of the current host system), and do something like this:
yum --config=centos6.conf --installroot=/path/to/mountpoint groupinstall core
Then you can chroot into the new fs (after bind mounting /proc /sys and /dev) and set your root password, edit your network config (/etc/sysconfig/network-scripts files) yum install any other packages you want, and so on.
I recommend that for either method you choose, when yo've tweaked it how you like for a basic VM, you tarball all the files up and use it as a template for future installs.
For swap you can either pass in a second block device or use a swap file (I use a swap file and it works just fine).
Peter _______________________________________________ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
Thank you for your comprehensive answer. From it I figured out all what I need!