Translate

Archives

UCSM Emulator Updated

Cisco UCS Platform Emulator, Release 2.2 (2cPE1), a minor point release, was announced June 4th 2014. The emulator, by the way, is based on CentOS. It adds support for the following new hardware: B260-M4 and B460-M4 blade servers C460-M4 rack server UCSB-F-LSI-400S, UCSB-F-LSI-800M, UCSB-F-FIO-785M, UCSB-F-FIO-365M storage accelerators The default configuration is changed from Mark 2 to Mark 3 blade and rack-mounted servers. All in all a solid point release which installs without a problem in VMware Workstation or Oracle Virtual Box.

List All Network Interfaces on Red Hat

The following script will list all non-loopback networking interfaces on a Fedora, Red Hat or downstream distribution. #!/bin/bash interfaces=$(ls /etc/sysconfig/network-scripts/ifcfg-* | LC_ALL=C sed -e “$__sed_discard_ignored_files” -e ‘/(ifcfg-lo$|:|ifcfg-.*-range)/d’ -e ‘{ s/^ifcfg-//g;s/[0-9]/ &/}’ | LC_ALL=C sort -k 1,1 -k 2n | LC_ALL=C sed ‘s/ //’) echo $interfaces | tr ” ” “n” It ignores any aliases and outputs the interfaces one per line.

Fedora SPICE: Cut and Paste between Guest and Host

If you’re already using SPICE with your Fedora or RHEL guests and you are not using the SPICE guest agent, you should seriously consider installing the spice-vdaguest guest agent. What functionality does spice-vdagent provide? Amongst other things, the following: Move mouse continuously within guest and client without pressing Shift-F12 Copy and Paste between guest and client Automatic guest resolution adjustment while entering fullscreen mode To install spice-vdagent on Fedora 15/16 or RHEL/CentOS 6/6.1: # yum -y install spice-vdagent # chkconfig spice-vdagentd on # reboot A reboot is necessary. See here if you want to information on the SPICE agent protocol.

List packages in RPM Database using C

Here is one way of listing installed RPM packages. It works with all versions of CentOS 5, RHEL5 and up to Fedora 14. #include <stdio.h> #include <stdlib.h> #include <string.h> #include <fcntl.h> #include <unistd.h> #include <rpm/rpmlib.h> #include <rpm/header.h> #include <rpm/rpmdb.h> int main(int argc, char *argv[]) { rpmdbMatchIterator mi; int type, count; char *name; rpmdb db; Header h; rpmReadConfigFiles( NULL, NULL ); if (rpmdbOpen( "", &db, O_RDONLY, 0644 ) != 0) { fprintf( stderr, "ERROR: Cannot open RPM databasen"); exit(1); } mi = rpmdbInitIterator(db, RPMDBI_PACKAGES, NULL, 0); while ((h = rpmdbNextIterator(mi))) { headerGetEntry(h, RPMTAG_NAME, &type, (void **) &name, &count); printf("%sn", name);

Fedora: Specify Repo when Booting Installer

To specify an installation source for Fedora, CentOS, Red Hat or Scientific Linux, use the linux repo= option at the boot prompt: For example: linux repo=cdrom:device linux repo=ftp://username:password@URL linux repo=http://URL linux repo=hd:device linux repo=nfs:options:server:/path linux repo=nfsiso:options:server:/path In these examples, cdrom refers to a CD or DVD drive, ftp refers to a location accessible by FTP, http refers to a URL accessible by HTTP, hd refers to an ISO image file accessible on a hard drive partition, nfs refers to an expanded tree of installation files accessible by NFS, and nfsiso refers to an ISO image file accessible by NFS. See