[one-users] onevm create fail
sufian.abu-rab at freenet.de
sufian.abu-rab at freenet.de
Sat Dec 4 09:09:37 PST 2010
hi, who can help me?
Running OpenNebula (Frontend-Host):
Start opennebula as oneadmin user:
one start
onehost create node1 im_xen vmm_xen tm_nfs
onevnet create vm_lan.template
onevnet show "VM LAN"
# do this just once a time
cd /srv/cloud/images
dd if=/dev/zero of=debian_disk.img bs=1024k seek=20480 count=0
onevm create vm_instance.template
onevm show debian
# here is the problem
Log-Datei 1: …/var/12/vm.log:Sat Dec 4 15:40:47 2010 [DiM][I]: New VM state is ACTIVE.
Sat Dec 4 15:40:47 2010 [LCM][I]: New VM state is PROLOG.
Sat Dec 4 15:40:47 2010 [VM][I]: Virtual Machine has no context
Sat Dec 4 15:40:47 2010 [TM][I]: tm_ln.sh: Creating directory /srv/cloud/one/var/images/12/images
Sat Dec 4 15:40:47 2010 [TM][I]: tm_ln.sh: Executed "mkdir -p /srv/cloud/one/var/images/12/images".
Sat Dec 4 15:40:47 2010 [TM][I]: tm_ln.sh: Executed "chmod a+w /srv/cloud/one/var/images/12/images".
Sat Dec 4 15:40:47 2010 [TM][I]: tm_ln.sh: Link /srv/cloud/images/debian_disk.img
Sat Dec 4 15:40:47 2010 [TM][I]: tm_ln.sh: Executed "ln -s /srv/cloud/images/debian_disk.img /srv/cloud/one/var/images/12/images/disk.0".
Sat Dec 4 15:40:47 2010 [TM][I]: tm_ln.sh: Creating directory /srv/cloud/one/var/images/12/images
Sat Dec 4 15:40:47 2010 [TM][I]: tm_ln.sh: Executed "mkdir -p /srv/cloud/one/var/images/12/images".
Sat Dec 4 15:40:47 2010 [TM][I]: tm_ln.sh: Executed "chmod a+w /srv/cloud/one/var/images/12/images".
Sat Dec 4 15:40:47 2010 [TM][I]: tm_ln.sh: Link /srv/cloud/images/debian-506-amd64-netinst.iso
Sat Dec 4 15:40:47 2010 [TM][I]: tm_ln.sh: Executed "ln -s /srv/cloud/images/debian-506-amd64-netinst.iso /srv/cloud/one/var/images/12/images/disk.1".
Sat Dec 4 15:40:47 2010 [TM][I]: tm_mkswap.sh: Creating directory /srv/cloud/one/var/images/12/images
Sat Dec 4 15:40:47 2010 [TM][I]: tm_mkswap.sh: Executed "mkdir -p /srv/cloud/one/var/images/12/images".
Sat Dec 4 15:40:47 2010 [TM][I]: tm_mkswap.sh: Executed "chmod a+w /srv/cloud/one/var/images/12/images".
Sat Dec 4 15:40:47 2010 [TM][I]: tm_mkswap.sh: Creating 1024Mb image in /srv/cloud/one/var/images/12/images/disk.2
Sat Dec 4 15:40:47 2010 [TM][I]: tm_mkswap.sh: Executed "/bin/dd if=/dev/zero of=/srv/cloud/one/var/images/12/images/disk.2 bs=1 count=1 seek=1024M".
Sat Dec 4 15:40:47 2010 [TM][I]: tm_mkswap.sh: Initializing swap space
Sat Dec 4 15:40:47 2010 [TM][I]: tm_mkswap.sh: Executed "/sbin/mkswap /srv/cloud/one/var/images/12/images/disk.2".
Sat Dec 4 15:40:47 2010 [TM][I]: tm_mkswap.sh: Executed "chmod a+w /srv/cloud/one/var/images/12/images/disk.2".
Sat Dec 4 15:40:55 2010 [TM][I]: tm_mkimage.sh: Executed "mkdir -p /srv/cloud/one/var/images/12/images".
Sat Dec 4 15:40:55 2010 [TM][I]: tm_mkimage.sh: Executed "/bin/dd if=/dev/zero of=/srv/cloud/one/var/images/12/images/disk.3 bs=1 count=1 seek=4096M".
Sat Dec 4 15:40:55 2010 [TM][I]: tm_mkimage.sh: Executed "/sbin/mkfs -t ext3 -F /srv/cloud/one/var/images/12/images/disk.3".
Sat Dec 4 15:40:55 2010 [TM][I]: tm_mkimage.sh: Executed "chmod a+rw /srv/cloud/one/var/images/12/images/disk.3".
Sat Dec 4 15:40:55 2010 [LCM][I]: New VM state is BOOT
Sat Dec 4 15:40:55 2010 [VMM][I]: Generating deployment file: /srv/cloud/one/var/12/deployment.0
Sat Dec 4 15:40:55 2010 [VMM][I]: Command execution fail: /srv/cloud/one/lib/remotes/vmm/xen/deploy node1 /srv/cloud/one/var/12/deployment.0
Sat Dec 4 15:40:55 2010 [VMM][I]: STDERR follows.
Sat Dec 4 15:40:55 2010 [VMM][I]: sudo: /usr/sbin/xm: command not found
Sat Dec 4 15:40:55 2010 [VMM][I]: ExitCode: 1
Sat Dec 4 15:40:55 2010 [VMM][E]: Error deploying virtual machine
Sat Dec 4 15:40:55 2010 [DiM][I]: New VM state is FAILED
Sat Dec 4 15:40:55 2010 [TM][W]: Ignored: LOG - 12 tm_delete.sh: Deleting /srv/cloud/one/var/images/12/images
Sat Dec 4 15:40:55 2010 [TM][W]: Ignored: LOG - 12 tm_delete.sh: Executed "rm -rf /srv/cloud/one/var/images/12/images".
Sat Dec 4 15:40:55 2010 [TM][W]: Ignored: TRANSFER SUCCESS 12 -
Log-Datei 2: …/var/oned.log:Sat Dec 4 15:40:17 2010 [ReM][D]: VirtualMachinePoolInfo method invoked
Sat Dec 4 15:40:20 2010 [ReM][D]: VirtualMachineAllocate invoked
Sat Dec 4 15:40:47 2010 [ReM][D]: HostPoolInfo method invoked
Sat Dec 4 15:40:47 2010 [ReM][D]: VirtualMachinePoolInfo method invoked
Sat Dec 4 15:40:47 2010 [ReM][D]: VirtualMachineDeploy invoked
Sat Dec 4 15:40:47 2010 [DiM][D]: Deploying VM 12
Sat Dec 4 15:40:47 2010 [TM][D]: Message received: LOG - 12 tm_ln.sh: Creating directory /srv/cloud/one/var/images/12/images
Sat Dec 4 15:40:47 2010 [TM][D]: Message received: LOG - 12 tm_ln.sh: Executed "mkdir -p /srv/cloud/one/var/images/12/images".
Sat Dec 4 15:40:47 2010 [TM][D]: Message received: LOG - 12 tm_ln.sh: Executed "chmod a+w /srv/cloud/one/var/images/12/images".
Sat Dec 4 15:40:47 2010 [TM][D]: Message received: LOG - 12 tm_ln.sh: Link /srv/cloud/images/debian_disk.img
Sat Dec 4 15:40:47 2010 [TM][D]: Message received: LOG - 12 tm_ln.sh: Executed "ln -s /srv/cloud/images/debian_disk.img /srv/cloud/one/var/images/12/images/disk.0".
Sat Dec 4 15:40:47 2010 [TM][D]: Message received: LOG - 12 tm_ln.sh: Creating directory /srv/cloud/one/var/images/12/images
Sat Dec 4 15:40:47 2010 [TM][D]: Message received: LOG - 12 tm_ln.sh: Executed "mkdir -p /srv/cloud/one/var/images/12/images".
Sat Dec 4 15:40:47 2010 [TM][D]: Message received: LOG - 12 tm_ln.sh: Executed "chmod a+w /srv/cloud/one/var/images/12/images".
Sat Dec 4 15:40:47 2010 [TM][D]: Message received: LOG - 12 tm_ln.sh: Link /srv/cloud/images/debian-506-amd64-netinst.iso
Sat Dec 4 15:40:47 2010 [TM][D]: Message received: LOG - 12 tm_ln.sh: Executed "ln -s /srv/cloud/images/debian-506-amd64-netinst.iso /srv/cloud/one/var/images/12/images/disk.1".
Sat Dec 4 15:40:47 2010 [TM][D]: Message received: LOG - 12 tm_mkswap.sh: Creating directory /srv/cloud/one/var/images/12/images
Sat Dec 4 15:40:47 2010 [TM][D]: Message received: LOG - 12 tm_mkswap.sh: Executed "mkdir -p /srv/cloud/one/var/images/12/images".
Sat Dec 4 15:40:47 2010 [TM][D]: Message received: LOG - 12 tm_mkswap.sh: Executed "chmod a+w /srv/cloud/one/var/images/12/images".
Sat Dec 4 15:40:47 2010 [TM][D]: Message received: LOG - 12 tm_mkswap.sh: Creating 1024Mb image in /srv/cloud/one/var/images/12/images/disk.2
Sat Dec 4 15:40:47 2010 [TM][D]: Message received: LOG - 12 tm_mkswap.sh: Executed "/bin/dd if=/dev/zero of=/srv/cloud/one/var/images/12/images/disk.2 bs=1 count=1 seek=1024M".
Sat Dec 4 15:40:47 2010 [TM][D]: Message received: LOG - 12 tm_mkswap.sh: Initializing swap space
Sat Dec 4 15:40:47 2010 [TM][D]: Message received: LOG - 12 tm_mkswap.sh: Executed "/sbin/mkswap /srv/cloud/one/var/images/12/images/disk.2".
Sat Dec 4 15:40:47 2010 [TM][D]: Message received: LOG - 12 tm_mkswap.sh: Executed "chmod a+w /srv/cloud/one/var/images/12/images/disk.2".
Sat Dec 4 15:40:55 2010 [TM][D]: Message received: LOG - 12 tm_mkimage.sh: Executed "mkdir -p /srv/cloud/one/var/images/12/images".
Sat Dec 4 15:40:55 2010 [TM][D]: Message received: LOG - 12 tm_mkimage.sh: Executed "/bin/dd if=/dev/zero of=/srv/cloud/one/var/images/12/images/disk.3 bs=1 count=1 seek=4096M".
Sat Dec 4 15:40:55 2010 [TM][D]: Message received: LOG - 12 tm_mkimage.sh: Executed "/sbin/mkfs -t ext3 -F /srv/cloud/one/var/images/12/images/disk.3".
Sat Dec 4 15:40:55 2010 [TM][D]: Message received: LOG - 12 tm_mkimage.sh: Executed "chmod a+rw /srv/cloud/one/var/images/12/images/disk.3".
Sat Dec 4 15:40:55 2010 [TM][D]: Message received: TRANSFER SUCCESS 12 -
Sat Dec 4 15:40:55 2010 [VMM][D]: Message received: LOG - 12 Command execution fail: /srv/cloud/one/lib/remotes/vmm/xen/deploy node1 /srv/cloud/one/var/12/deployment.0
Sat Dec 4 15:40:55 2010 [VMM][D]: Message received: LOG - 12 STDERR follows.
Sat Dec 4 15:40:55 2010 [VMM][D]: Message received: LOG - 12 sudo: /usr/sbin/xm: command not found
Sat Dec 4 15:40:55 2010 [VMM][D]: Message received: LOG - 12 ExitCode: 1
Frontend:NFS settings (Frontend-Host)
define an export-directory
sudo vim /etc/exports
/srv/cloud node1(rw,sync,no_subtree_check)
Configuration settings (Frontend-Host)
change config file etc/oned.conf:
sudo vi /srv/cloud/one/etc/oned.conf
…
…
…
VM_DIR=/srv/cloud/one/var/images
# Sample configuration for MySQL
DB = [ backend = "mysql",
server = "localhost",
user = "oneadmin",
passwd = "blabla",
db_name = "opennebula" ]
IMAGE_REPOSITORY_PATH = /srv/cloud/one/var/images
# the official documentation suggests the directory:
# /srv/cloud/images as container for images, right?
DEFAULT_IMAGE_TYPE = "CDROM"
# because of iso-image, is this ok?
DEFAULT_DEVICE_PREFIX = "hd"
# what does this mean?
# allowed: sd, xvd, vd
# definition disk device mapping:
# sda: OS type Image.
# sdb: Contextualization CDROM.
# sdc: CDROM type Image.
# sdd: Swap disk.
# sd[e,f,g…]: DATABLOCK type Images.
IM_MAD = [
name = "im_xen",
executable = "one_im_ssh",
arguments = "xen" ]
VM_MAD = [
name = "vmm_xen",
executable = "one_vmm_sh",
arguments = "xen",
default = "vmm_sh/vmm_sh_xen.conf",
type = "xen" ]
# the file vmm_sh_xen.conf doesnt exist in the folder vmm_sh
TM_MAD = [
name = "tm_nfs",
executable = "one_tm",
arguments = "tm_nfs/tm_nfs.conf" ]
…
…
…
define the virtual network
Before we create a virtual machine, we have to define the virtual network. This is done by creating a template file, e.g. vm_lan.template, which should contain something like:
NAME = "VM LAN"
TYPE = RANGED
BRIDGE = br0 # Replace br0 with the bridge interface from the cluster nodes
NETWORK_ADDRESS = 192.168.2.128
# Replace with corresponding IP address
NETWORK_SIZE = 126
NETMASK = 255.255.255.0
GATEWAY = 192.168.2.108
NS = x.x.x.x
# is this ok?
define a virtual machine (as oneadmin user): vi /srv/cloud/one/etc/vmm_sh/vmm_sh_xen.conf
CPU = 0.5
MEMORY = 256
OS = [ KERNEL="/boot/vmlinuz-2.6.26-1-xen-amd64", INITRD="/boot/initrd.img-2.6.26-1-xen-amd64" ]
# , kernel_cmd="ro"
# , root="sda5"
# these two attributes are optional for xen, so i comment them out. is this ok?
CREDIT = 256
define a virtual machine:
vi /srv/cloud/one/vm_instance.template
NAME = debian
CPU = 1
MEMORY = 512
# Disks & NICS
OS = [ boot = "cdrom" ]
# Define your main disk as usual, and tell OpenNebula to keep the changes.
DISK = [
TYPE = "disk",
SOURCE = "/srv/cloud/images/debian_disk.img",
TARGET = hda,
CLONE = "no" ]
# this assumes that you have a plain file for debian_disk.img (e.g.
with a dd).
# is this right?
# Define an additional DISK for the ISO image with the installation CD
DISK = [
TYPE = "cdrom",
SOURCE = "/srv/cloud/images/debian-506-amd64-netinst.iso",
TARGET = hdb,
CLONE = "no" ]
# swap, sdd
DISK = [
TYPE = swap,
SIZE = 1024,
READONLY = "no" ]
DISK = [
TYPE = fs,
SIZE = 4096,
FORMAT = ext3,
SAVE = yes,
TARGET = sdg ]
NIC = [ NETWORK = "VM LAN" ]
GRAPHICS = [
type = "vnc",
listen = "node1",
port = "5902" ]
FEATURES=[ acpi="no" ]
Execution-Host(s):NFS settings (Execution-Host)
# install req. packages
sudo apt-get install portmap nfs-common
# In each cluster node create /srv/cloud
# create a directory to use as a muont point:
sudo mkdir -p /srv/cloud
# edit hosts.allow
sudo vim /etc/hosts.allow
portmap : 192.168.2.108 # (frontend_ip_address)
# edit hosts.deny files
sudo vim /etc/hosts.deny
portmap : ALL
# edit fstab files in order to enable mounting of NFS space during the boot of the OS:
sudo vim /etc/fstab
192.168.2.108:/srv/cloud /srv/cloud nfs rw 0 0
# and mount this directory from the front-end:
sudo mount -t nfs 192.168.2.108:/srv/cloud /srv/cloud
Xen installation: google: install xen on debian lenny
apt-get install xen-linux-system-2.6.26-1-xen-amd64 xen-utils-3.2-1 lvm2 python-xml xen-tools
sudo vi /etc/xen/xend-config.sxp
#(network-script network-dummy)
(network-script network-bridge)
(xend-relocation-server yes)
(vif-script vif-bridge)
(xend-relocation-port 8002)
(xend-relocation-hosts-allow 'host*') # for hostnames like “host01, host02” [...]
shutdown -r now
sudo xm list
Xen settings:
give dom0 512mb ram, otherwise it will took all the ram for itself
# (already done)
give user oneadmin and xen enough privilegs
sudo /usr/sbin/visudo -f /etc/sudoers
oneadmin ALL=(ALL) NOPASSWD: ALL
%xen ALL=(ALL) NOPASSWD: /usr/sbin/xm *
%xen ALL=(ALL) NOPASSWD: /usr/sbin/xentop *
Network Interface (Execution-Host):
# The primary network interface
sudo vi /etc/network/interfaces
auto eth0
iface eth0 inet manual
[...]
auto br0
iface br0 inet static
address 192.168.2.102
netmask 255.255.255.0
network 192.168.2.0
broadcast 192.168.2.255
gateway 192.168.2.108
dns-nameservers 192.168.2.1
bridge_ports eth0
bridge_fd 9
bridge_hello 2
bridge_maxage 12
bridge_stp off
sudo /etc/init.d/networking restart
Exklusiv: Neue E-Mail-Adresse @iPhone.de jetzt verfügbar!
Sichern Sie sich jetzt ihre persönliche E-Mail-Adresse at iphone.de
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opennebula.org/pipermail/users-opennebula.org/attachments/20101204/b9b3639d/attachment-0002.htm>
More information about the Users
mailing list