Archive for September, 2010
virt-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=”http://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 install from.
-x => extra arguments to pass to installer (In this case, ks refers to kickstart, the Redhat installation scripter. The file it’s referring to is my modified installation file.)
The 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.
Should be simple, the number of times I’ve done it, but I’ve ended up searching google for how to do so. Again.
vim /etc/sysconfig/network, add “HOSTNAME=newhost” or change it.
Also, vi /etc/sysconfig/network-scripts/ifcfg-eth0, add “DHCP_HOSTNAME=newhost” for the hostname to be sent with DHCP requests. Have to find out if setting up the hostname with the kickstart file works or not. (ie. network –device eth0 –bootproto dhcp –hostname %name%)
Disable the hardware clock
The Xen domU will use the host’s clock, so we replace hwclock with an empty shell script
echo exit 0 > /sbin/hwclock
Has been nothing but a pain. Seriously.
Tried justindthomas.wordpress.com/2009/04/03/installing-nexentacp-2-rc1-on-xenserver-5/ . Close, but no cigar. Installing goes fine, but switching from HVM to PV kills it.
bderzhavets.wordpress.com/2009/03/20/pygrub-install-opensolaris-200811-at-xen-unstable-dom0-with-2629-rc7-pvops-enabled-kernel/ looks good, but I have no idea where he’s getting the kernel and ramdisk from.
I’ll be trying wiki.tardis.ed.ac.uk/index.php/OpenSolaris_Xen_domU, blogs.sun.com/levon/entry/opensolaris_2008_11_guest_domain and blogs.sun.com/levon/entry/opensolaris_2009_06_guest_domain over the weekend from a clean slate, so hopefully I can get something up and running properly.
(At least I got all the network bugs solved – xen’s network bridge kept on fouling on *something*. Manually typing in some of the ip commands and swapping to network instead of NetworkManager worked. Still not sure which fixed the problem, but I’m being it’s the change in network setup. network came up fine except that dhclient didn’t run, so I’ll be adding networking=dhcp to the ifcfg-eth0 script if it doesn’t come up when booting again.)
Using the Nexenta 3 release to get a better userland system than opensolaris. It’s based off OpenSolaris build 134, and still comes with ZFS, so it fits my needs perfectly. Since some customization has to be done first, it has to be installed in HVM mode. Which… has a few gotchas.
1. Only 4 devices are supported. I’m planning to use it a NAS, so I have the root drive (LVM-based) +3 2TB drives. Adding them + the install file gets a “cannot boot error”, which I found out was because qemu seems to only support 4 devices – I’m guessing in part because it has 2 IDE channels, and each channel can only take 2 devices.
2. Devices have to be named hd[a-d]. I tried leaving the file mentioned above as hde:cdrom. Got “No bootable devices found.” Changed it to read hdb:cdrom, and it’s fixed.
Have decided to go with Fedora 13 for my Xen install. Reaons being:
VMWare and XenServer don’t support USB Passthrough, which I want to run one of the VMs as a home server, and will pass 2 printers through to it.
CentOS is running off an old kernel and Xen version. If I want the latest and greatest, I’ll have to hack something together, so might as well use Fedora.
In Fedora 13 (and likely others), use cp /usr/share/zoneinfo/$TIMEZONE /etc/localtime && ntpd -q, where $timezone is your timezone. (The ntpd -q is likely unnecessary, but, eh. It’ll force an update to the system time.)
Trying a new VM host that uses an ASUS motherboard. Unfortunately, old version of kernel in CentOS 5.5 means that no networking ever comes up. Specifically, the Atheros L1 Gigabit Ethernet driver isn’t in such an old version of the kernel. (Only came in in 2.6.21, centOS 5.5 is 2.6.18)
Fix: Going by the page here: atl1.sourceforge.net/ , grab ftp.hogchain.net/pub/linux/attansic/atl1/centos5.2/kmod-atl1-xen-2.1.3-1.x86_64.rpm and rpm -ivh it after somehow getting it to the new system – I just used a thumbdrive.