I have been playing with the serial console capabilities that are part of qemu, and noticed the following error when I ran qemu-kvm with the “-curses” option on a Fedora 10 host:
$ qemu-kvm -curses
qemu-kvm: invalid option – ‘-curses’
The manual page indicates this should be a valid option:
-curses Normally, QEMU uses SDL to display the VGA output. With this option, QEMU can display the VGA output when in text mode using a curses/ncurses interface. Nothing is displayed in graphical mode.
But closer inspection of the qemu-kvm binary proves otherwise:
$ qemu-kvm -help | grep curses
$ ldd /usr/bin/qemu-kvm | grep curses
I filed Fedora bug 504226 to get this option added.
I created a new KVM host last night, and was greeted with the error “Too many option ROMS” during initialization:
$ /usr/bin/qemu-kvm -S -M pc -m 512 -smp 1 -name kvmnode1 -boot n -drive file=/bits/vms/kvmnode1,if=ide,index=0,boot=on -net nic,macaddr=54:52:00:53:20:00 -net tap,script=/bits/bin/qemu-ifup -serial pty -monitor pty
Setting the tunnel interface to up
Adding the tunnel interface to br0
char device redirected to /dev/pts/1
Too many option ROMS
It turns out this is Redhat bug 473137, which is fixed in the latest etherboot package. If you are running Fedora, you can install this from the testing repository.
I have been playing around with puppet, which is an awesome configuration management tool. Puppet allows you to apply configurations to nodes based on one or more facts (a fact is a specific piece of information, such as a list of network interfaces), which includes everything from operating system information to the network configuration. To gather this information, puppet uses facter, which provides a consistent way to locate information about a machine in a machine independent way. To install facter, you can use your favorite package manager, or run the following to install from source:
$ tar xfvz facter-1.5.tgz
$ cd facter-1.5
$ ruby install.rb
Once facter is installed, you can use the facter program to list all of the available facts on your system:
$ facter | head -5
architecture => x86_64
domain => prefetch.net
facterversion => 1.5.4
fqdn => disarm.prefetch.net
hardwareisa => x86_64
To retrieve the value of a fact, you can run facter with the name of the facts you want to display:
$ facter hostname interfaces macaddress
hostname => kvmnode1
interfaces =>
macaddress => 54:52:00:53:20:00
I’m hoping to start writing about puppet, and my experiences using it to manage my lab. It’s an addictive piece of software, and can save admins lots and lots of time!
Picked up this nifty trick from command-line-fu
$ net rpc shutdown -I ipAddressOfWindowsPC -U username%password
This will issue a shutdown command to the Windows machine. username must be an administrator on the Windows machine. Requires samba-common package installed. Other relevant commands are:
net rpc shutdown -r : reboot the Windows machine
net rpc abortshutdown : abort shutdown of the Windows machine
Type:
net rpc
to show all relevant commands
The “net rpc service” command looks spiffy.
Michael-Svobodas-MacBook-Pro:~ (michael)> net rpc
Usage:
net rpc info show basic info about a domain
net rpc join to join a domain
net rpc oldjoin to join a domain created in server manager
net rpc testjoin tests that a join is valid
net rpc user to add, delete and list users
net rpc password <username> [<password>]
-Uadmin_username%admin_pass
net rpc group to list groups
net rpc share to add, delete, list and migrate shares
net rpc printer to list and migrate printers
net rpc file to list open files
net rpc changetrustpw to change the trust account password
net rpc getsid fetch the domain sid into the local secrets.tdb
net rpc vampire syncronise an NT PDC's users and groups into
the local passdb
net rpc samdump diplay an NT PDC's users, groups and other
data
net rpc trustdom to create trusting domain's account or
establish trust
net rpc abortshutdown to abort the shutdown of a remote server
net rpc shutdown to shutdown a remote server
net rpc rights to manage privileges assigned to SIDs
net rpc registry to manage registry hives
net rpc service to start, stop and query services
net rpc audit to modify global auditing settings
net rpc shell to open an interactive shell for remote
server/account management
'net rpc shutdown' also accepts the following miscellaneous options:
-r or --reboot request remote server reboot on shutdown
-f or --force request the remote server force its shutdown
-t or --timeout=<timeout> number of seconds before shutdown
-C or --comment=<message> text message to display on impending
shutdown
I previously talked about creating aliases on Brocade switches, and am going to use this post to discuss zone creation. Zones allow you to control initiators and targets can see each other, which enhances security by limiting access to devices connected to the SAN fabric. As previously discussed, we can assign an alias to each initiator and target. Once an alias is assigned, we can create a zone and add these aliases to it. Brocade managed zones with the zone* commands, which are listed below for reference:
zoneadd - Add a member to an existing zone
zoneCopy - Copy an existing zone
zonecreate - Create a new zone
zoneDelete - Delete a zone
zoneRemove - Remove a one from the configuration
zoneRename - Rename a zone
zoneShow - Show the list of zones
To create a new zone, we can run the zonecreate command with the name of the zone to create, and the list of aliases to add to the zone:
Fabric1Switch1:admin> **zonecreate "CentOSNode2Zone1", "NevadaPort1;
CentosNode2Port1"**
Once the zone is created, we can view it with the zoneshow command:
Fabric1Switch1:admin> **zoneshow "CentOSNode2Zone1"**
zone: CentOSNode2Zone1
NevadaPort1; CentosNode2Port1
Now that we have a zone, we need to add it to the switch configuration and then enable that configuration. I will discuss that in more detail when I discuss managing Brocade configurations.