Re: [CentOS-virt] Preferred method of provisioning VM images

2014-06-17 Thread lee
Karanbir Singh mail-li...@karan.org writes:

 On 06/10/2014 05:21 PM, Lars Kurth wrote:
 == #4 Cloud Image from Cloud Image SIG ==
 We could rely on pre-built cloud images from the Cloud Images SIG. 
 People could just download the cloud image once it's done and customize 
 it, rather than installing / building their own.
 
 Advantages: seems easy
 
 Disadvantages: coordination with Cloud Images SIG. May not be flexible 
 enough

 We ship a test/devel grade CentOS-6-x86_64-pv image ( well, its a qcow2
 image, should work for pvhvm as well, the fstab is label driven ).[1]

 The biggest problem in doing pre-baked images is the instance metadata.
 We need to find an easy way to get network settings into the instance
 and the root password ( or key ), and finally - in some cases, console
 redirection/setup, but i dont think the console is a deal breaker or a
 big deal. The network and access credentials however are.

 In a typical cloud environ this info would come from the cloud
 controller's metadata service; on a typical virtualised setup though
 this becomes an issue ( and isnt really Xen specific ).

 We could work around this by making some assumptions, we could 'own'
 dnsmasq and ensure that either libvirt is running and doing dhcp,
 otherwise we do the dhcp with some sane defaults, or we setup a script
 to 'instantiate image', which asks how the user wants to setup the
 instance ( pvhvm, hvm, pv ), the root password or key to use, and the
 network settings ( and if this is run on the dom0, we could even ask
 what bridge or device to connect with as well as the settings ).[2]

 Ofcourse, having these images pushed from here mean that clouds or
 virtualised environs that have metadata services are able to just-use
 the image as is, not needing any more tooling etc. And we can easily
 push monthly image updates and when things like heartbleed come around,
 there is a single place we need to update.

Wouldn't you still need to configure the services running in each VM?


-- 
Knowledge is volatile and fluid.  Software is power.
___
CentOS-virt mailing list
CentOS-virt@centos.org
http://lists.centos.org/mailman/listinfo/centos-virt


Re: [CentOS-virt] Preferred method of provisioning VM images

2014-06-17 Thread George Dunlap
On Mon, Jun 16, 2014 at 11:54 AM, Karanbir Singh mail-li...@karan.org wrote:
 On 06/10/2014 05:21 PM, Lars Kurth wrote:
 == #4 Cloud Image from Cloud Image SIG ==
 We could rely on pre-built cloud images from the Cloud Images SIG.
 People could just download the cloud image once it's done and customize
 it, rather than installing / building their own.

 Advantages: seems easy

 Disadvantages: coordination with Cloud Images SIG. May not be flexible
 enough

 We ship a test/devel grade CentOS-6-x86_64-pv image ( well, its a qcow2
 image, should work for pvhvm as well, the fstab is label driven ).[1]

 The biggest problem in doing pre-baked images is the instance metadata.
 We need to find an easy way to get network settings into the instance
 and the root password ( or key ), and finally - in some cases, console
 redirection/setup, but i dont think the console is a deal breaker or a
 big deal. The network and access credentials however are.

 In a typical cloud environ this info would come from the cloud
 controller's metadata service; on a typical virtualised setup though
 this becomes an issue ( and isnt really Xen specific ).

 We could work around this by making some assumptions, we could 'own'
 dnsmasq and ensure that either libvirt is running and doing dhcp,
 otherwise we do the dhcp with some sane defaults, or we setup a script
 to 'instantiate image', which asks how the user wants to setup the
 instance ( pvhvm, hvm, pv ), the root password or key to use, and the
 network settings ( and if this is run on the dom0, we could even ask
 what bridge or device to connect with as well as the settings ).[2]

 Ofcourse, having these images pushed from here mean that clouds or
 virtualised environs that have metadata services are able to just-use
 the image as is, not needing any more tooling etc. And we can easily
 push monthly image updates and when things like heartbleed come around,
 there is a single place we need to update.

 - KB
 [1]: http://cloud.centos.org/centos/6/devel/

 [2] might need to pull in all of libguestfs to make the changes, which
 in turn has its own challenges if run inside a virtualised environ.

I didn't follow this -- virt-builder seems to run fine in dom0 with
qemu, albeit a bit slow.  Upstream is open to having patches for Xen
bindings for the utility VM.

Or is there something else I'm missing?

 -George
___
CentOS-virt mailing list
CentOS-virt@centos.org
http://lists.centos.org/mailman/listinfo/centos-virt


Re: [CentOS-virt] [Xen-users] Can't get vnc connections to bind to 0.0.0.0

2014-06-17 Thread Periko Support
On Tue, Jun 17, 2014 at 7:47 AM, Ian Campbell ian.campb...@citrix.com wrote:
 On Tue, 2014-06-17 at 10:41 -0400, Phillip Susi wrote:
 On 6/17/2014 10:10 AM, Ian Campbell wrote:
  Which toolstack.

 xl

  This is a PVFB, not sure if they work for HVM or not.

 Seems to work just fine other than refusing to bind to 0.0.0.0 so I
 can access it from another machine on the network without setting up
 an ssh tunnel.

  You probably want a toplevel vnclisten=0.0.0.0:0 to cause the
  VNC associated with the emulated VGA to be bound to the address
  which you want.

 toplevel?

 I mean literally write:
 vnclisten=0.0.0.0:0
 in your configuration file, not wrapped in a vfg = [].

 Ian


 ___
 Xen-users mailing list
 xen-us...@lists.xen.org
 http://lists.xen.org/xen-users

This is my settings:

vfb = [ 
type=vnc,vnclisten=192.168.2.27,vncpasswd=XX,vncdisplay=1,keymap=en-us
]

Hope this helps.
___
CentOS-virt mailing list
CentOS-virt@centos.org
http://lists.centos.org/mailman/listinfo/centos-virt


Re: [CentOS-virt] Centos 6.5 Xen Stock cannot run dom-u PCI: Fatal: - ipmi_si

2014-06-17 Thread Konrad Rzeszutek Wilk
On Mon, Jun 16, 2014 at 09:09:04PM -0700, Periko Support wrote:
 On Mon, Jun 16, 2014 at 11:34 AM, Periko Support
 pheriko.supp...@gmail.com wrote:
  On Mon, Jun 16, 2014 at 11:10 AM, Periko Support
  pheriko.supp...@gmail.com wrote:
  On Mon, Jun 16, 2014 at 10:55 AM, Konrad Rzeszutek Wilk
  konrad.w...@oracle.com wrote:
  On Mon, Jun 16, 2014 at 10:51:54AM -0700, Periko Support wrote:
  On Mon, Jun 16, 2014 at 10:46 AM, Periko Support
  pheriko.supp...@gmail.com wrote:
   On Mon, Jun 16, 2014 at 10:37 AM, Konrad Rzeszutek Wilk
   konrad.w...@oracle.com wrote:
   On Mon, Jun 16, 2014 at 10:21:45AM -0700, Periko Support wrote:
   ---
   So if I understand you correct - in 5.9 you did not see this, but
   in 6.5 you do?
   --
  
   Yes, just with centos 6.5 dom-u.
  
   But none of both vm's run.
  
   Please do not top post.
   .. snip..
   .. snip..
Loading xenblk.ko module
XENBUS: Waiting for devices to initialise:
295s...290s...285s...280s...275s...270s...265s...260s...255s...250s...245s...240s...235s...230s...225s...220s...215s...210s...205s...200s...195s...190s...185s...180s...175s...170s...165s...160s...155s...150s...145s...140s...135s...130s...125s...120s...115s...110s...105s...100s...95s...90s...85s...80s...75s...70s...65s...60s...55s...50s...45s...40s...35s...30s...25s...20s...15s...10s...5s...0s...
XENBUS: Timeout connecting to device: device/vbd/51712 (local 
state 3,
remote state 1)
Loading dm-mod.ko module
device-mapper: uevent: version 1.0.3
device-mapper: ioctl: 4.11.6-ioctl (2011-02-18) initialised: 
dm-de...@redhat.com
Loading dm-log.ko module
Loading dm-mirror.ko module
Loading dm-zero.ko module
Loading dm-snapshot.ko module
Loading dm-mem-cache.ko module
Loading dm-region_hash.ko module
Loading dm-message.ko module
Loading dm-raid45.ko module
device-mapper: dm-raid45: initialized v0.2594l
Scanning and configuring dmraid supported devices
Scanning logical volumes
  Reading all physical volumes.  This may take a while...
  No volume groups found
Activating logical volumes
  Volume group VolGroup00 not found
Creating root device.
Mounting root filesystem.
mount: could not find filesystem '/dev/root'
Setting up other filesystems.
Setting up new root fs
setuproot: moving /dev failed: No such file or directory
no fstab.sys, mounting internal defaults
setuproot: error mounting /proc: No such file or directory
setuproot: error mounting /sys: No such file or directory
Switching to new root and running init.
unmounting old /dev
unmounting old /proc
unmounting old /sys
switchroot: mount failed: No such file or directory
Kernel panic - not syncing: Attempted to kill init!
  
  
  
   Ah, that is because you do not have xen-blkfront  loaded in your 
   initrd.
   Somehow it thinks it is called 'xenblk'. If you recreate your initrd
   (either dracut or mkinitrd) make sure you specify that you want to
   have the 'xen-blkfront' driver as part of it. The usual parameter
   is '--add' or such.
  
   How did you generate your initrd?
   ___
   CentOS-virt mailing list
   CentOS-virt@centos.org
   http://lists.centos.org/mailman/listinfo/centos-virt
  
   No, I'm using the instructions from xen4centos project. Nothing 
   manually.
  
   U mention 2 things:
  
   For centos6 is normal the error, I have to connect to my console using
   other methods and see if centos6 dom-u is running, I will let u know.
   2nd u mention that we need a module xen-blkfront for centos5 dom-u,
   hope the developers read this and fix this asap.
  
   Thanks.
 
  If u need info from me, let me know, because this happen in both
  servers with different year of manufacturing.
  and different centos version 5.9/6.0.
 
  Huh?
 
  You do not need any developers. You just need to regenerate your
  initrd to have extra drivers. That is it.
 
 
 
  Thanks for your time!!!
  ___
  CentOS-virt mailing list
  CentOS-virt@centos.org
  http://lists.centos.org/mailman/listinfo/centos-virt
  ___
  CentOS-virt mailing list
  CentOS-virt@centos.org
  http://lists.centos.org/mailman/listinfo/centos-virt
 
  Understand that, but if exist something to be done to have the fix for
  the whole community will be better, don't u think?
 
  Latest news, I connect to dom-u centos 6.5 x64 over vnc and is booting
  and got this after waiting:
 
  xl console oerp-server
  PCI: Fatal: No config space access function found
  ipmi_si: Could not set up I/O space
  ipmi_si: Could not set up I/O space
  ipmi_si: Could not set up I/O space
  Kernel panic - not syncing: Attempted to kill init!
  Pid: 1, comm: init Not tainted 2.6.32-431.el6.x86_64 #1
  Call Trace:
   [815271fa] ? panic+0xa7/0x16f
  

Re: [CentOS-virt] Centos 6.5 Xen Stock cannot run dom-u PCI: Fatal: - ipmi_si

2014-06-17 Thread Periko Support
On Tue, Jun 17, 2014 at 8:19 AM, Konrad Rzeszutek Wilk
konrad.w...@oracle.com wrote:
 On Mon, Jun 16, 2014 at 09:09:04PM -0700, Periko Support wrote:
 On Mon, Jun 16, 2014 at 11:34 AM, Periko Support
 pheriko.supp...@gmail.com wrote:
  On Mon, Jun 16, 2014 at 11:10 AM, Periko Support
  pheriko.supp...@gmail.com wrote:
  On Mon, Jun 16, 2014 at 10:55 AM, Konrad Rzeszutek Wilk
  konrad.w...@oracle.com wrote:
  On Mon, Jun 16, 2014 at 10:51:54AM -0700, Periko Support wrote:
  On Mon, Jun 16, 2014 at 10:46 AM, Periko Support
  pheriko.supp...@gmail.com wrote:
   On Mon, Jun 16, 2014 at 10:37 AM, Konrad Rzeszutek Wilk
   konrad.w...@oracle.com wrote:
   On Mon, Jun 16, 2014 at 10:21:45AM -0700, Periko Support wrote:
   ---
   So if I understand you correct - in 5.9 you did not see this, but
   in 6.5 you do?
   --
  
   Yes, just with centos 6.5 dom-u.
  
   But none of both vm's run.
  
   Please do not top post.
   .. snip..
   .. snip..
Loading xenblk.ko module
XENBUS: Waiting for devices to initialise:
295s...290s...285s...280s...275s...270s...265s...260s...255s...250s...245s...240s...235s...230s...225s...220s...215s...210s...205s...200s...195s...190s...185s...180s...175s...170s...165s...160s...155s...150s...145s...140s...135s...130s...125s...120s...115s...110s...105s...100s...95s...90s...85s...80s...75s...70s...65s...60s...55s...50s...45s...40s...35s...30s...25s...20s...15s...10s...5s...0s...
XENBUS: Timeout connecting to device: device/vbd/51712 (local 
state 3,
remote state 1)
Loading dm-mod.ko module
device-mapper: uevent: version 1.0.3
device-mapper: ioctl: 4.11.6-ioctl (2011-02-18) initialised: 
dm-de...@redhat.com
Loading dm-log.ko module
Loading dm-mirror.ko module
Loading dm-zero.ko module
Loading dm-snapshot.ko module
Loading dm-mem-cache.ko module
Loading dm-region_hash.ko module
Loading dm-message.ko module
Loading dm-raid45.ko module
device-mapper: dm-raid45: initialized v0.2594l
Scanning and configuring dmraid supported devices
Scanning logical volumes
  Reading all physical volumes.  This may take a while...
  No volume groups found
Activating logical volumes
  Volume group VolGroup00 not found
Creating root device.
Mounting root filesystem.
mount: could not find filesystem '/dev/root'
Setting up other filesystems.
Setting up new root fs
setuproot: moving /dev failed: No such file or directory
no fstab.sys, mounting internal defaults
setuproot: error mounting /proc: No such file or directory
setuproot: error mounting /sys: No such file or directory
Switching to new root and running init.
unmounting old /dev
unmounting old /proc
unmounting old /sys
switchroot: mount failed: No such file or directory
Kernel panic - not syncing: Attempted to kill init!
  
  
  
   Ah, that is because you do not have xen-blkfront  loaded in your 
   initrd.
   Somehow it thinks it is called 'xenblk'. If you recreate your initrd
   (either dracut or mkinitrd) make sure you specify that you want to
   have the 'xen-blkfront' driver as part of it. The usual parameter
   is '--add' or such.
  
   How did you generate your initrd?
   ___
   CentOS-virt mailing list
   CentOS-virt@centos.org
   http://lists.centos.org/mailman/listinfo/centos-virt
  
   No, I'm using the instructions from xen4centos project. Nothing 
   manually.
  
   U mention 2 things:
  
   For centos6 is normal the error, I have to connect to my console using
   other methods and see if centos6 dom-u is running, I will let u know.
   2nd u mention that we need a module xen-blkfront for centos5 dom-u,
   hope the developers read this and fix this asap.
  
   Thanks.
 
  If u need info from me, let me know, because this happen in both
  servers with different year of manufacturing.
  and different centos version 5.9/6.0.
 
  Huh?
 
  You do not need any developers. You just need to regenerate your
  initrd to have extra drivers. That is it.
 
 
 
  Thanks for your time!!!
  ___
  CentOS-virt mailing list
  CentOS-virt@centos.org
  http://lists.centos.org/mailman/listinfo/centos-virt
  ___
  CentOS-virt mailing list
  CentOS-virt@centos.org
  http://lists.centos.org/mailman/listinfo/centos-virt
 
  Understand that, but if exist something to be done to have the fix for
  the whole community will be better, don't u think?
 
  Latest news, I connect to dom-u centos 6.5 x64 over vnc and is booting
  and got this after waiting:
 
  xl console oerp-server
  PCI: Fatal: No config space access function found
  ipmi_si: Could not set up I/O space
  ipmi_si: Could not set up I/O space
  ipmi_si: Could not set up I/O space
  Kernel panic - not syncing: Attempted to kill init!
  Pid: 1, comm: init Not 

Re: [CentOS-virt] Centos 6.5 Xen Stock cannot run dom-u PCI: Fatal: - ipmi_si

2014-06-17 Thread Konrad Rzeszutek Wilk
.snip..
 
  I add the module to initrd, didn't fix the issue.
 
  Can you post the full dmesg output please? Do you see 'xen-blkfront'
  being loaded on it?

 The issue is that I cannot connect to the dom-u to get the output,
 exist a way for this?

You did it before didn't you?
___
CentOS-virt mailing list
CentOS-virt@centos.org
http://lists.centos.org/mailman/listinfo/centos-virt


Re: [CentOS-virt] Centos 6.5 Xen Stock cannot run dom-u PCI: Fatal: - ipmi_si

2014-06-17 Thread Periko Support
On Tue, Jun 17, 2014 at 8:45 AM, Konrad Rzeszutek Wilk
konrad.w...@oracle.com wrote:
 .snip..
 
  I add the module to initrd, didn't fix the issue.
 
  Can you post the full dmesg output please? Do you see 'xen-blkfront'
  being loaded on it?

 The issue is that I cannot connect to the dom-u to get the output,
 exist a way for this?

 You did it before didn't you?
 ___
 CentOS-virt mailing list
 CentOS-virt@centos.org
 http://lists.centos.org/mailman/listinfo/centos-virt

The output u see was from dom-u Centos5, that one show us a different message:

(SMP-)alternatives turned off
Brought up 1 CPUs
checking if image is initramfs... it is
Grant table initialized
NET: Registered protocol family 16
Brought up 1 CPUs
PCI: setting up Xen PCI frontend stub
ACPI: Interpreter disabled.
Linux Plug and Play Support v0.97 (c) Adam Belay
pnp: PnP ACPI: disabled
xen_mem: Initialising balloon driver.
usbcore: registered new driver usbfs
usbcore: registered new driver hub
PCI: System does not support PCI
PCI: System does not support PCI
NetLabel: Initializing
NetLabel:  domain hash size = 128
NetLabel:  protocols = UNLABELED CIPSOv4
NetLabel:  unlabeled traffic allowed by default
NET: Registered protocol family 2
IP route cache hash table entries: 65536 (order: 7, 524288 bytes)
TCP established hash table entries: 262144 (order: 10, 4194304 bytes)
TCP bind hash table entries: 65536 (order: 8, 1048576 bytes)
TCP: Hash tables configured (established 262144 bind 65536)
TCP reno registered
audit: initializing netlink socket (disabled)
type=2000 audit(1403020147.615:1): initialized
VFS: Disk quotas dquot_6.5.1
Dquot-cache hash table entries: 512 (order 0, 4096 bytes)
Initializing Cryptographic API
alg: No test for crc32c (crc32c-generic)
ksign: Installing public key data
Loading keyring
- Added public key 691B840A64868995
- User ID: CentOS (Kernel Module GPG key)
io scheduler noop registered
io scheduler anticipatory registered
io scheduler deadline registered
io scheduler cfq registered (default)
pci_hotplug: PCI Hot Plug PCI Core version: 0.5
rtc: IRQ 8 is not free.
Non-volatile memory driver v1.2
Linux agpgart interface v0.101 (c) Dave Jones
brd: module loaded
Xen virtual console successfully installed as xvc0
Event-channel device installed.
Uniform Multi-Platform E-IDE driver Revision: 7.00alpha2
ide: Assuming 50MHz system bus speed for PIO modes; override with idebus=xx
ide-floppy driver 0.99.newide
usbcore: registered new driver hiddev
usbcore: registered new driver usbhid
drivers/usb/input/hid-core.c: v2.6:USB HID core driver
PNP: No PS/2 controller found. Probing ports directly.
i8042.c: No controller found.
mice: PS/2 mouse device common for all mice
md: md driver 0.90.3 MAX_MD_DEVS=256, MD_SB_DISKS=27
md: bitmap version 4.39
TCP bic registered
Initializing IPsec netlink socket
NET: Registered protocol family 1
NET: Registered protocol family 17
XENBUS: Device with no driver: device/vbd/51712
XENBUS: Device with no driver: device/vif/0
XENBUS: Device with no driver: device/console/0
Initalizing network drop monitor service
Write protecting the kernel read-only data: 506k
Red Hat nash version 5.1.19.6 starting
Mounting proc filesystem
Mounting sysfs filesystem
Creating /dev
Creating initial device nodes
Setting up hotplug.
Creating block device nodes.
Loading ehci-hcd.ko module
Loading ohci-hcd.ko module
Loading uhci-hcd.ko module
USB Universal Host Controller Interface driver v3.0
Loading jbd.ko module
Loading ext3.ko module
Loading xenblk.ko module
XENBUS: Waiting for devices to initialise:
295s...290s...285s...280s...275s...270s...265s..
240s...235s...230s...225s...220s...215s...210s...205s...200s...195s...190s...185s...180s...175s...170s...165s...160s...155s...150s...145s...140s...135s...130s...125s...120s...115s...110s...105s...100s...95s...90s...85s...80s...75s...70s...65s...60s...55s...50s...45s...40s...35s...30s...25s...20s...15s...10s...5s...0s...
XENBUS: Timeout connecting to device: device/vbd/51712 (local state 3,
remote state 1)
Loading dm-mod.ko module
device-mapper: uevent: version 1.0.3
device-mapper: ioctl: 4.11.6-ioctl (2011-02-18) initialised: dm-de...@redhat.com
Loading dm-log.ko module
Loading dm-mirror.ko module
Loading dm-zero.ko module
Loading dm-snapshot.ko module
Loading dm-mem-cache.ko module
Loading dm-region_hash.ko module
Loading dm-message.ko module
Loading dm-raid45.ko module
device-mapper: dm-raid45: initialized v0.2594l
Scanning and configuring dmraid supported devices
Scanning logical volumes
  Reading all physical volumes.  This may take a while...
  No volume groups found
Activating logical volumes
  Volume group VolGroup00 not found
Creating root device.
Mounting root filesystem.
mount: could not find filesystem '/dev/root'
Setting up other filesystems.
Setting up new root fs
setuproot: moving /dev failed: No such file or directory
no fstab.sys, mounting internal defaults
setuproot: error mounting /proc: No such file or directory

Re: [CentOS-virt] Are xen and centos incompatible?

2014-06-17 Thread lee
Konrad Rzeszutek Wilk konrad.w...@oracle.com writes:

 On Sat, Jun 14, 2014 at 09:07:51AM +0200, lee wrote:
 Konrad Rzeszutek Wilk konrad.w...@oracle.com writes:
 
  I am wondering if you are using an older kernel. The xen-acpi-processor
  driver should be loaded which would give the C and P states to the
  hypervisor. Which in turn would result in those above commands
  providing the right data.
 
 Linux heimdall 3.2.0-4-amd64 #1 SMP Debian 3.2.57-3+deb7u2 x86_64 GNU/Linux
 
 This is what comes in Debian.  Unfortunately, this kernel crashes when
 I'm copying data to a domU NFS server over the network :((  I need to
 find out how to get some useful information out of it to make a bug
 report.
 
 How do I know whether the xen-acpi-processor driver is loaded or not?

 lsmod

Well, yes, I didn't know what the name of this module exactly is.
There's also the processor module.

 But it looks like v3.4 and later were the kernels that started having
 this driver. That would explain why it does not exist as you are using
 3.2.

Because of the crashes, I've upgraded to a 3.14.5-1~bpo70+1 kernel from
Debian backports.  That one does have the xen-acpi-processor module,
and it's working.  I don't know yet if it'll crash, though.


-- 
Knowledge is volatile and fluid.  Software is power.
___
CentOS-virt mailing list
CentOS-virt@centos.org
http://lists.centos.org/mailman/listinfo/centos-virt


Re: [CentOS-virt] Preferred method of provisioning VM images

2014-06-17 Thread lee
SilverTip257 silvertip...@gmail.com writes:

 On Tue, Jun 17, 2014 at 6:11 AM, lee l...@yun.yagibdah.de wrote:

 Karanbir Singh mail-li...@karan.org writes:

  Ofcourse, having these images pushed from here mean that clouds or
  virtualised environs that have metadata services are able to just-use
  the image as is, not needing any more tooling etc. And we can easily
  push monthly image updates and when things like heartbleed come around,
  there is a single place we need to update.

 Wouldn't you still need to configure the services running in each VM?


 Yes.

 I believe the idea here is to pre-configure as much as possible and
 complete the remaining configuration via network connectivity (ie: SSH).

How about some sort of package management that lets you define and
configure the VM?

This is currently done from the inside, i. e. when the VM is running,
with whatever installer and package manager a distribution comes
with.

Why not do it from the outside, i. e. before the VM even exists,
creating it in the process?  Define some sort of API so that the same
VM creator tool could be used with different distributions.


-- 
Knowledge is volatile and fluid.  Software is power.
___
CentOS-virt mailing list
CentOS-virt@centos.org
http://lists.centos.org/mailman/listinfo/centos-virt


[CentOS-virt] How to create an OpenVZ OS Template for CentOS 7 Public QA

2014-06-17 Thread Scott Dowdle
Greetings,

First start of by working on a physical system, virtual machine, or container 
that matches the OS Template you are wanting to build.  I used my CentOS 7 
Public QA OS OpenVZ container to build it.

You must of course have a working yum.  Once we are beyond Public QA and there 
is stuff in /etc/yum.repos.d/ this won't be a problem.  One thing to note is 
that the --enablerepo= must refer to a repo your build host has and viewable 
via yum repolist.  That repo should point to the desired CentOS 7 build tree 
directory.

A note about the package list.  Yes, listed out every individual packcage is 
tedious.  Perhaps some package groups could be used but they typically drag in 
a lot of unwanted additional packages.  Suggestions welcome.

Here is a simple script and please don't nag at me because I'm a scripting 
novice. I hope email client word wrapping and screen sizes don't butcher it too 
bad:

- - - - -

# To get a package list without version numbers from a target system
# rpm -qa --qf %{n}   packages.txt
# Put contents of packages.txt after -y install \ line below

mkdir /ostemplate

yum \
--installroot /ostemplate \
--nogpg \
--releasever=7 \
--enablerepo=centos7pubqa \
-y install \
centos-release filesystem ncurses-base mailcap tzdata glibc-common xz-libs \
ncurses-libs pcre libselinux info libdb popt sed libcom_err libuuid expat \
libacl libgpg-error dbus-libs gawk lua libxml2 glib2 shared-mime-info apr cpio \
gmp p11-kit tcp_wrappers-libs perl-parent perl-podlators perl-Text-ParseWords \
perl-Pod-Escapes perl-libs perl-threads perl-constant perl-Filter \
perl-Time-Local perl-threads-shared perl-File-Path perl-Scalar-List-Utils \
perl-Getopt-Long libcap-ng nss-softokn libassuan libunistring diffutils 
gpm-libs \
libnfnetlink keyutils-libs gettext-libs p11-kit-trust nettle \
gobject-introspection vim-minimal pinentry make libselinux-utils ncurses \
libverto libsemanage krb5-libs openldap cracklib libmount systemd-libs libuser \
pam libblkid util-linux python-libs dhcp-libs libcurl python-urlgrabber 
rpm-libs \
dhcp-common libselinux-python python-iniparse python-chardet 
yum-metadata-parser \
python-backports-ssl_match_hostname newt-python pyxattr binutils logrotate \
procps-ng mariadb-libs fipscheck-lib openssh libmnl iptables json-c \
device-mapper cryptsetup-libs dbus iputils cronie-anacron crontabs libestr \
gnupg2 rpm-python pygpgme libnl3 yum-utils man-db dhclient audit openssh-server 
\
libgudev1 net-tools elinks python-pyudev policycoreutils python-configobj \
pygobject3-base sudo wget file tar which psmisc libpcap libsysfs libdaemon lzo \
libgcc setup basesystem kbd-misc bind-license nss-softokn-freebl glibc 
libstdc++ \
bash libsepol zlib audit-libs nspr chkconfig bzip2-libs nss-util grep libattr \
libcap elfutils-libelf libgcrypt readline libidn libffi pkgconfig sqlite \
groff-base file-libs libtasn1 slang gdbm perl-HTTP-Tiny perl-Pod-Perldoc \
perl-Encode perl-Pod-Usage perl-macros perl-Storable perl-Carp perl-Exporter \
perl-Socket perl-File-Temp perl-PathTools perl-Pod-Simple perl apr-util 
libcroco \
cyrus-sasl-lib libgomp kmod-libs libedit hostname js newt ca-certificates less \
dbus-glib acl libdb-utils findutils xz sysvinit-tools ustr nss-tools \
openssl-libs gzip cracklib-dicts nss libpwquality coreutils shadow-utils \
libutempter nss-sysinit python libssh2 python-pycurl curl rpm python-decorator \
python-slip dbus-python python-kitchen python-backports python-setuptools \
pyliblzma centos-logos kmod openssl nss_compat_ossl bind-libs-lite fipscheck \
httpd-tools libnetfilter_conntrack iproute qrencode-libs device-mapper-libs \
systemd systemd-sysv initscripts cronie libpipeline pth rpm-build-libs gpgme 
yum \
libnl3-cli rsyslog mlocate kbd postfix httpd ebtables openssh-clients 
authconfig \
python-slip-dbus mc gettext screen passwd gnutls elfutils-libs libss nano 
snappy \
libndp ethtool hardlink rootfiles 

ln -sf /proc/mounts /ostemplate/etc/mtab

# I want Mountain time to be the default
ln -sf /usr/share/zoneinfo/America/Denver /ostemplate/etc/localtime

# Now compress that sucker
cd /ostemplate ; tar -cvJf /root/centos-7-x86_64-viayum.tar.xz . ; cd
ls -lh /root/centos-7-x86_64-viayum.tar.xz
echo Done building OS Template.  Now test it.

- - - - - 

TYL,
-- 
Scott Dowdle
704 Church Street
Belgrade, MT 59714
(406)388-0827 [home]
(406)994-3931 [work]
___
CentOS-virt mailing list
CentOS-virt@centos.org
http://lists.centos.org/mailman/listinfo/centos-virt