Search This Blog

28 November 2008

Auto-starting domUs

Assuming domU is named... ummm... 'domU'
# vi `virsh dumpxml eoti | grep -i uuid | sed 's/\s*<uuid>/\/var\/lib\/xend\/domains\//g;' | sed 's/\s*<\/uuid>/\/config.sxp/g'`

change: (on_xend_start ignore)
to: (on_xend_start start)

27 November 2008

Webmin

After installing Webmin via the package manager, I ran 'webminsetup' and tried to access the new http://serveris:10000/ but it kept saying my password was wrong.

I found Jignesh's tip and got it working.

Specifically, I reran webminsetup and chose all the defaults
# su - root
# cd /etc/webmin
# vi miniserv.users
vi -- copied the first bit from the password file (ie: 'malachi:x:101') to the end of the file
# vi webmin.acl
vi> yyp
vi -- change the second 'root' to 'malachi'
# exit
# svcadm restart webmin

http://serveris:10000/ now works :)

Routing not working on boot

I have commented on this issue before....

not sure of a long term solution yet, but this appears to make it start working again...
# pfexec svcadm restart network/routing-setup

19 November 2008

SMB/CIFS

I had installed the packages but could not get a ZFS folder to share via SMB. The service was in maintenance mode, and it kept complaining about it not being loaded into the kernel. I tried add_drv, but that complained that it was already added.

Rebooting managed to enable the service.  Next, when I ran the cifs-chkcfg script, it said I need to run this (as root):
echo other password required pam_smb_passwd.so.1 nowarn >> /etc/pam.conf

Running it again, it said:
/var/smb/smbpasswd does not exist or it is empty
passwd must be used to create CIFS-style password for local users

Hmm, but I don't really want to be in workgroup mode anyways. Let's follow these instructions and change that and join the domain....

hmmmm
'failed to find any domain controllers for __insert_anything_I_tried_here__'

hmmm, will have to come back to this

17 November 2008

Setting up xVM....

It was a long and tedious process, but I got it working (on my work machine)... well, actually, it wasn't so bad once this was resolved [which took about 2-3 days to figure out]. While working on that, I also installed SUNWxvmhvm as it appeared to be the only xVM one not installed according to the Package Manager.
Link

The first step was to download the ISOs. I ended up downloading both sol-10-u6-companion-ga.iso and sol-10-u6-ga1-x86-dvd.iso, though I haven't gotten around to using (or even looking at) the companion cd.

I played around a few times until I figured out how I wanted this done. I decided the original domain was going to be used as a starting point to clone from, and not as a domain to run; so some of the names seem a little overboard early on. I used this page for a lot of the details of what to do.

The next step was to create a volume.
root@eris:/rpool/vm/iso# zfs create -V 16G rpool/vm/sol-10-u6-ga1-x86.zvol
This creates /dev/zvol/dsk/rpool/vm/sol-10-u6-ga1-x86.zvol.

Using virt-manager to create the domain:
name: sol_10_u6_ga1_x86
virtualization: full
iso: /rpool/vm/iso/sol-10-u6-ga1-x86-dvd.iso
os type: Solaris
os variant: Sun OpenSolaris
disk: /dev/zvol/dsk/rpool/vm/sol-10-u6-ga1-x86.zvol
nic: shared eg1000g0
mem (min): 1024
mem (max): 1024
VCPUs: 1

During the installation, Solaris and Option 4 (to allow for a ZFS root).
Once it was installed, I rebooted and verified that it worked. I shut it down.
root@eris# zfs snapshot rpool/vm/sol-10-u6-ga1-x86.zvol@FreshInstall
root@eris# zfs list -t snapshot -r rpool/vm/sol-10-u6-ga1-x86.zvol | grep -v auto-snap
(the second step was to verify that it worked)

Logged into the domain (using virt-manager)
root@sol_10_u6_ga1_x86# sys-unconfig
This halts it, but through trial and error I found that I need to hit a key to get it to start restarting THEN hit the shutdown button on xVM so that it is NOT running.
root@eris# zfs snapshot rpool/vm/sol-10-u6-ga1-x86.zvol@Unconfigured
root@eris# zfs clone rpool/vm/sol-10-u6-ga1-x86.zvol@Unconfigured rpool/vm/eris-vm1.zvol
root@eris#
zfs snapshot rpool/vm/eris-vm1.zvol@Unconfigured

root@eris# zfs list -t all -r rpool/vm/sol-10-u6-ga1-x86.zvol | grep -v auto-snap
NAME USED AVAIL REFER MOUNTPOINT
rpool/vm/sol-10-u6-ga1-x86.zvol 22.1G 51.1G 5.93G -
rpool/vm/sol-10-u6-ga1-x86.zvol@FreshInstall 0 - 5.89G -
rpool/vm/sol-10-u6-ga1-x86.zvol@Unconfigured 0 - 5.93G -
root@eris# zfs list
NAME USED AVAIL REFER MOUNTPOINT
rpool 37.7G 35.1G 50K /rpool
rpool/ROOT 7.64G 35.1G 18K legacy
rpool/ROOT/opensolaris 5.85G 35.1G 5.52G /BE/opensolaris
rpool/ROOT/opensolaris-1 776M 35.1G 5.52G /BE/opensolaris-1
rpool/ROOT/opensolaris-2 1.03G 35.1G 5.77G /tmp/tmpFWvL5Q
rpool/dump 1.93G 35.1G 1.93G -
rpool/export 1.35G 35.1G 19K /export
rpool/export/home 1.35G 35.1G 19K /export/home
rpool/export/home/malachi 1.35G 35.1G 423M /export/home/malachi
rpool/swap 1.93G 37.0G 16K -
rpool/vm 24.9G 35.1G 2.78G /rpool/vm
rpool/vm/eris-vm1.zvol 0 35.1G 5.93G -
rpool/vm/sol-10-u6-ga1-x86.zvol 22.1G 51.1G 5.93G -

Then to create the domain configuration:
root@eris:/rpool/vm# virsh dumpxml sol_10_u6_ga1_x86 > sol_10_u6_ga1_x86.xml
root@eris:/rpool/vm# cp sol_10_u6_ga1_x86.xml eris_vm1.xml

Edit the new eris_vm1.xml:
1. replace the domain name
2. remove the UUID line
3. replace the zvol location (from sol_10_u6_ga1_x86.zvol to eris_vm1.zvol)
root@eris:/rpool/vm# virsh define eris_vm1.xml

Boot into the new domain and configure it. Reboot and make sure the internet works. Shut it down.

root@eris# zfs snapshot rpool/vm/eris-vm1.zvol@Configured

That's it. It's now bootable and the original one is still available to clone another from.

14 November 2008

hvm not available

The work machine is a Dell OptiPlex 755 with an E8400 cpu and BIOS A11. I couldn't figure out why both 'xm info' and 'virt-install' both showed as it not having virtualization support. I tried turning it off and back on (in the bios), etc.

Turns out (thx to this thread) it just required turning OFF 'Trusted Execution' in the BIOS.

13 November 2008

Printers won't Print

Doing 'svcs -xv' I saw that svc:/network/device-discovery/printers:snmp was in maintenance mode. I tried clearing/enabling it, but it just wasn't cooperating. Something about:

[ Nov 13 13:13:10 Executing start method ("/lib/svc/method/svc-network-discovery start snmp"). ]
/usr/bin/dbus-send --system --print-reply --dest=org.freedesktop.Hal --type=method_call /org/freedesktop/Hal/devices/network_attached org.freedesktop.Hal.Device.NetworkDiscovery.EnablePrinterScanningViaSNMP int32:60 string:public string:0.0.0.0
Error org.freedesktop.DBus.Error.NoReply: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.

After searching around for awhile, I found that this bug had already been reported.

So first I installed 'SUNWsmmgr' via the package manager
root@eris:~# svcadm restart svc:/system/hal:default
root@eris:~# svcadm clear svc:/network/device-discovery/printers:snmp
root@eris:~# svcadm enable svc:/network/device-discovery/printers:snmp


That seemed to fix it.

As far as setting the printers up, it seemed to work much quicker setting it up using socket, the IP, default port (as opposed to my last attempt using samba and the name)....

zfs auto snapshot (and thus time-slider) going offline after upgrade

The error will look something like this:

Checking for non-recursive missed // snapshots
Checking for recursive missed // snapshots rpool
Last snapshot for svc:/system/filesystem/zfs/auto-snapshot:frequent taken on Thu Nov 13 11:30 2008
which was greater than the 15 minutes schedule. Taking snapshot now. cannot create snapshot 'rpool/ROOT/opensolaris@zfs-auto-snap:frequent-2008-11-13-12:51': dataset is busy
no snapshots were created

Error: Unable to take recursive snapshots of rpool@zfs-auto-snap:frequent-2008-11-13-12:51.

Moving service svc:/system/filesystem/zfs/auto-snapshot:frequent to maintenance mode.


This problem is being caused by the old (IE: read non-active) boot environments not being mounted and it is trying to snapshot them. You can't 'svcadm clear' or 'svcadm enable' them because they will still fail.

Based on suggestions I find everywhere (most recently this one), I did this:
# mkdir /BE
# zfs list
(shows rpool/ROOT/opensolaris, rpool/ROOT/opensolaris-1 and the current rpool/ROOT/opensolaris-2)
# zfs set mountpoint=/BE/opensolaris rpool/ROOT/opensolaris
# zfs mount rpool/ROOT/opensolaris
# zfs unmount rpool/ROOT/opensolaris
(repeat the 3 steps for opensolaris-1)

Now you can run 'svcs -xv' to get the list of services and restart them... In my case:
# svcadm clear svc:/system/filesystem/zfs/auto-snapshot:frequent
# svcadm enable svc:/system/filesystem/zfs/auto-snapshot:frequent
# svcadm clear svc:/system/filesystem/zfs/auto-snapshot:hourly
# svcadm enable svc:/system/filesystem/zfs/auto-snapshot:hourly

Still have to test whether it works post-reboot without doing this every time.

11 November 2008

Flash and Firefox

Let's say you go to Pandora and it says you have to install the Flash plugin. You click on install, and it says it wasn't found and tells you to install it manually.

You go to the website and download flash_player_9_solaris_x86.tar.bz2. Then what?

As root, extract libflashplayer.so from the archive and drop it into /usr/lib/firefox/plugins. Restart Firefox and you're done =)

04 November 2008

Increasing swap size

At work today, my OpenSolaris b101 in Virtual Box on a Windows machine ran out of swap space. It had 512 assigned, which was the default, so I thought it would be enough... oh well, what to do?

# df -h
this will show how much space it has versus how much is in use...
# zfs list
this will show where the swap space comes from (probably rpool/swap)
# zfs set volsize=2G rpool/swap
set the swap filesystem to 2G
# reboot now
I am not sure if I *had* to reboot for it to take effect, but it worked well

I was going to try it at home (since I doubled the physical memory in that box) but only 1% of the swap space was in use, so I left it.