find/xargs/grep tricks
Posted by Uncategorized on February 3, 2011
inBecause xargs will die if you have an unescaped quote, but using -0 screws everything up if you’re reading a list of files: sed s/\’/\\\\\’/|cut -d \: -f 1|xargs -i rm “{}” The sed pattern will put the escape character in front of any single quotes so that xargs doesn’t screw up. Using md5sum to […]
Allowing password-less SSH logins
Posted by Uncategorized on February 3, 2011
inBecause I don’t care too much about what happens to my test servers, I’ve been setting up password-less SSH logins. Using a Linux system to login is trivial, because it’s a simple matter of doing ssh-keygen on the system that will be connecting to the remote server, and just hitting enter until the key is […]
Provisioning & management
Posted by Uncategorized on November 27, 2010
inWhen I first found Kickstart, I had great joy in customizing my install files. I now have a set of PHP scripts that will create a customized Kickstart file for any install based on parameters passed in the URL. Now, looking into management of VMs (in terms of software), I’ve found that there are actually […]
Mirroring Fedora 14 repos
Posted by Uncategorized on November 27, 2010
inSince I’m a Fedora/RH guy, I’ve been using Fedora 13 for most of my VMs. (The main exception is OpenIndiana, which I have for the ZFS support – It’s sharing my crucial stuff over the network.) Since Fedora 14’s been released, I’m going to move to that to play around with my VM infrastructure. But, […]
Virsh/Xend management
Posted by Xen on November 17, 2010
inSince I can’t really make head or tails of the xend/xenstore and the virsh way of configuring domains to autostart, I’ve just settled with exporting the config files from virsh and converting them to the native xen format. Like so: virsh dumpxml hydrogen > /etc/xen/hydrogen.xml && virsh domxml-to-native /etc/xen/hydrogen.xml > /etc/xen/hydrogen && ln -s /etc/xen/hydrogen […]
Recovering VMs when they fail with disk errors
Posted by Uncategorized on November 13, 2010
inMy setup is carving out a logical volume on my domU physical volume, and handing that to virt-install to use as the root disk. Now, it also partitions the LV, then installs LVM on top of it. BUT, that change isn’t passed back to the VM host, so the what’s inside the disk image is […]
Xen 64 bit HVM strangeness
Posted by Uncategorized on October 23, 2010
inDon’t know if I mis-installed something, but trying to create a 64 bit HVM causes a libvirt error when using Virtual Manager to create a new VM. Namely that the device module “/usr/lib64/xen/bin/qemu-dm” isn’t found. But, qemu-dm exists in “/usr/lib/xen/bin”. So a cp /usr/lib/xen/bin/* /usr/lib64/xen/bin/ later, my OpenIndiana system boots, albeit running as 32bit, not […]
Content of Kickstart install file
Posted by Uncategorized on October 9, 2010
ininstall lang en_US.UTF-8 keyboard us network –device eth0 –bootproto dhcp –hostname helium rootpw –iscrypted longstringofcharacters firewall –service=ssh authconfig –enableshadow –passalgo=sha512 –enablefingerprint selinux –permissive timezone –utc Asia/Singapore bootloader –location=mbr –driveorder=xvda –append=” LANG=en_US.UTF-8 SYSFONT=latarcyrheb-sun16 KEYTABLE=us console=hvc0″ # The following is the partition information you requested # Note that any partitions you deleted are not expressed # here […]
virt-install command for fedora
Posted by Uncategorized on September 12, 2010
invirt-install -p -r 1024 -n fedora14 -f /dev/domU/fedora14 –location ftp.jaist.ac.jp/pub/Linux/Fedora/development/14/x86_64/os/ -x ks=”chaotic/~kyl191/ks.php?hostname=helium” -p => paravirtualized -r => 1024MB of RAM -n => Name of the new VM -f => file/location to install to (I believe it’s supposed to be an image file, but an LVM partition works just as well) –location => Straightforward, location to […]
MAC Address changes when using virt-install
Posted by Uncategorized on September 11, 2010
inThe MAC address seems to change after you use virt-install, which leads to the ifup script complaining that the hardware address doesn’t match what’s in the ifcfg-eth0 file. However, after the domain is defined, the MAC address seems to stick, so the fix is to change the ifcfg-eth0 to reflect the new MAC address.