Feb 16
Internal error: Failure(“Error from xenguesthelper: caught exception: Failure(\\\”Subprocess failure: Failure(\\\\\\\”xc_dom_linux_build: [4] xc_dom_boot_mem_init: can’t allocate low memory for dom\\\\\\\”)\\\”)”)
Can be fixed in XenServer with command:
# xe vm-param-remove param-name=other-config param-key=machine-address-size uuid=UID_OF_VM
Feb 07
Nice new command in Solaris 11 express and Solaris 11 is ipadm. The command is soon to replace good old ifconfig. Here is little cheat sheet for basic operations.
Use dladm to list info about physical interfaces:
# dladm show-phys
LINK MEDIA STATE SPEED DUPLEX DEVICE
net0 Ethernet up 100 full bnx0
net4 Ethernet down 0 unknown ixgbe0
Notice that Oracle has changed link names to be netX by default and not after link name.
This is not the case if you upgraded from express to 11. You can rename the link name with dladm rename-link old-linkname new-linkname
To configure address to interface we first need to bring the interface up (plumb)
# ipadm create-ip net4
# dladm show-phys net4
LINK MEDIA STATE SPEED DUPLEX DEVICE
net4 Ethernet up 10000 full ixgbe0
Configure address to newly created interface.
Static IP:
# ipadm create-addr -T static -a 10.0.0.1/24 net4/lan
DHCP:
# ipadm create-addr -T dhcp net4/lan
Change netmask:
# ipadm set-addrprop -p prefixlen=8 net4/lan
List active interfaces:
# ipadm show-if
IFNAME CLASS STATE ACTIVE OVER
lo0 loopback ok yes --
net0 ip ok yes --
net4 ip ok yes --
Show current addresses:
# ipadm show-addr
ADDROBJ TYPE STATE ADDR
lo0/v4 static ok 127.0.0.1/8
net0/v4 static ok 1.1.1.1/24
net4/lan static ok 10.0.0.1/24
Add default gateway, -p for persistance so it will be activated on reboot:
# route -p add default 1.1.1.254
Delete address:
# ipadm delete-addr net4/lan
Delete interface:
# ipadm delete-ip net4
Feb 05
Here is script howto mount guest VM to control domain VM. If you want to make file backups from snapshot or like in my case, configure new vm ( ip address etc ) one can easily modify it.
#!/bin/bash
# contact@mceith.com 2011
if [ ! -n "$1" -o ! -n "$2" -o ! -n "$3" ]; then
echo "Usage: $0 <target vm uuid> <control domain uuid> mount|umount"
exit 1
fi
case "$3" in
mount)
if [ -f /tmp/tmpvbd ]; then
echo "VBD allready exists!"
exit 1
fi
# Get uuid of vm you want to configure
VMUUID=`xe vbd-list vm-uuid=$1 params=vdi-uuid empty=false --minimal`
# Create VBD link to VM VDI on dom0
NEWVM=`xe vbd-create vm-uuid=$2 vdi-uuid=$VMUUID device=1`
# Plug it to dom0
xe vbd-plug uuid=$NEWVM
VM_VDEV=`xe vbd-list uuid=$NEWVM params=device --minimal`1
# Lag
sleep 1
# Mount it
mount /dev/$VM_VDEV /mnt/newvm
echo $NEWVM > /tmp/tmpvbd
# Do what ever you like
# ....
;;
umount)
if [ ! -f /tmp/tmpvbd ]; then
echo "No VBDs mounted?"
exit 1
fi
umount /mnt/newvm
NEWVM=`cat /tmp/tmpvbd`
# Unplug
xe vbd-unplug uuid=$NEWVM
xe vbd-destroy uuid=$NEWVM
rm -f /tmp/tmpvbd
;;
esac
exit $?