[one-users] Cannot start VM with XEN

Javier Fontan jfontan at gmail.com
Wed Jun 29 09:55:36 PDT 2011


root user can cause problems with nfs, security concerns, ssh
configurations (don't let root login), selinux, file permissions, etc.
As a side note is not that uncommon to use a special user, check for
example web, mail and database servers that use their own users.

On Mon, Jun 6, 2011 at 10:18 AM, anthony garnier <sokar6012 at hotmail.com> wrote:
> Hi,
>
> Yes I'm running oned as root and I already used the "no root squash" option.
> Why root would create issues ?
>
>
>
>> Date: Wed, 1 Jun 2011 17:55:33 +0200
>> Subject: Re: [one-users] Cannot start VM with XEN
>> From: jfontan at gmail.com
>> To: sokar6012 at hotmail.com
>> CC: users at lists.opennebula.org
>>
>> Are you running oned as root? If you are doing so take into account
>> that nfs can give you some problems with nfs mounts and root
>> ownership. Maybe you can solve those problems adding no_root_squash to
>> export/mount options.
>>
>> Anyway, the recommended way to run opennebula is with its own user and
>> having that same user/id in all the nodes.
>>
>> On Fri, May 27, 2011 at 3:18 PM, anthony garnier <sokar6012 at hotmail.com>
>> wrote:
>> > Hi,
>> >
>> > I've just installed openebula  and I can't create a VM.
>> > I use Xen hypervisor 3.1.2
>> >
>> > Frontend : one
>> > CentOS 5.5 64bits
>> >
>> > Node in cluster : node01
>> > CentOS 5.5 64bits for Dom0
>> > Debian lenny i386 for DomU
>> >
>> > I can directly create a fully running Debian VM with xm cmd but when I
>> > use
>> >  # onevm create debian.one
>> >
>> > # onevm list
>> >  ID     USER     NAME    STAT       CPU     MEM        HOSTNAME
>> > TIME
>> >  17     root        debian     fail             0        0K
>> > node01          00 00:01:04
>> >
>> >
>> > content of debian.one :
>> >
>> > NAME   = debian
>> > CPU    = 1
>> > MEMORY = 512
>> >
>> >     OS     = [
>> >        kernel   = "/boot/vmlinuz-2.6.26-2-686-bigmem",
>> >        initrd   = "/boot/initrd.img-2.6.26-2-686-bigmem",
>> >        root     = "xvda1" ]
>> > #OS = [BOOTLOADER  = /usr/bin/pygrub]
>> >
>> >     DISK   = [
>> >        source   = "/opt/nebula/repo/debian.img",
>> >        target   = "xvda1",
>> >        readonly = "no",
>> >        driver   = "file:"       ] # already tried to change into tap:aio
>> >
>> >     DISK   = [
>> >        type     = "swap",
>> >        size     = 1024,
>> >        target   = "xvda2"]
>> >
>> > NIC    = [ NETWORK = network ]
>> >
>> >
>> > Content of deployment0
>> >
>> > name = 'one-14'
>> > #O CPU_CREDITS = 256
>> > memory  = '512'
>> > kernel = '/boot/vmlinuz-2.6.26-2-686-bigmem'
>> > ramdisk = '/boot/initrd.img-2.6.26-2-686-bigmem'
>> > root = '/dev/xvda1'
>> > disk = [
>> >     'file:/opt/nebula/images/14/images/disk.0,xvda1,w',
>> >     'tap:aio:/opt/nebula/images/14/images/disk.1,xvda2,w',
>> > ]
>> > vif = [
>> >     ' mac=02:00:c0:a8:00:10,ip=192.168.0.16,bridge=xenbr0',
>> > ]
>> >
>> > Logfile :
>> > cat /var/log/one/14.log
>> > Fri May 27 11:25:00 2011 [DiM][I]: New VM state is ACTIVE.
>> > Fri May 27 11:25:00 2011 [LCM][I]: New VM state is PROLOG.
>> > Fri May 27 11:25:00 2011 [VM][I]: Virtual Machine has no context
>> > Fri May 27 11:25:42 2011 [TM][I]: tm_clone.sh:
>> > one:/opt/nebula/repo/debian.img
>> > node01:/opt/nebula/images/14/images/disk.0
>> > Fri May 27 11:25:42 2011 [TM][I]: tm_clone.sh: DST:
>> > /var/lib/one/14/images/disk.0
>> > Fri May 27 11:25:42 2011 [TM][I]: tm_clone.sh: Creating directory
>> > /var/lib/one/14/images
>> > Fri May 27 11:25:42 2011 [TM][I]: tm_clone.sh: Executed "mkdir -p
>> > /var/lib/one/14/images".
>> > Fri May 27 11:25:42 2011 [TM][I]: tm_clone.sh: Executed "chmod a+w
>> > /var/lib/one/14/images".
>> > Fri May 27 11:25:42 2011 [TM][I]: tm_clone.sh: Cloning
>> > /opt/nebula/repo/debian.img
>> > Fri May 27 11:25:42 2011 [TM][I]: tm_clone.sh: Executed "cp -r
>> > /opt/nebula/repo/debian.img /var/lib/one/14/images/disk.0".
>> > Fri May 27 11:25:42 2011 [TM][I]: tm_clone.sh: Executed "chmod a+rw
>> > /var/lib/one/14/images/disk.0".
>> > Fri May 27 11:25:42 2011 [TM][I]: tm_mkswap.sh: Creating directory
>> > /var/lib/one/14/images
>> > Fri May 27 11:25:42 2011 [TM][I]: tm_mkswap.sh: Executed "mkdir -p
>> > /var/lib/one/14/images".
>> > Fri May 27 11:25:42 2011 [TM][I]: tm_mkswap.sh: Executed "chmod a+w
>> > /var/lib/one/14/images".
>> > Fri May 27 11:25:42 2011 [TM][I]: tm_mkswap.sh: Creating 1024Mb image in
>> > /var/lib/one/14/images/disk.1
>> > Fri May 27 11:25:42 2011 [TM][I]: tm_mkswap.sh: Executed "/bin/dd
>> > if=/dev/zero of=/var/lib/one/14/images/disk.1 bs=1 count=1 seek=1024M".
>> > Fri May 27 11:25:42 2011 [TM][I]: tm_mkswap.sh: Initializing swap space
>> > Fri May 27 11:25:42 2011 [TM][I]: tm_mkswap.sh: Executed "/sbin/mkswap
>> > /var/lib/one/14/images/disk.1".
>> > Fri May 27 11:25:42 2011 [TM][I]: tm_mkswap.sh: Executed "chmod a+w
>> > /var/lib/one/14/images/disk.1".
>> > Fri May 27 11:25:42 2011 [LCM][I]: New VM state is BOOT
>> > Fri May 27 11:25:42 2011 [VMM][I]: Generating deployment file:
>> > /var/lib/one/14/deployment.0
>> > Fri May 27 11:25:45 2011 [VMM][I]: Command execution fail: 'if [ -x
>> > "/var/tmp/one/vmm/xen/deploy" ]; then /var/tmp/one/vmm/xen/deploy
>> > /opt/nebula/images/14/images/deployment.0; else
>> > exit 42; fi'
>> > Fri May 27 11:25:45 2011 [VMM][I]: STDERR follows.
>> > Fri May 27 11:25:45 2011 [VMM][I]: Error: Device 51713 (vbd) could not
>> > be
>> > connected.
>> > Fri May 27 11:25:45 2011 [VMM][I]: File
>> > /opt/nebula/images/14/images/disk.0
>> > is read-only, and so I will not
>> > Fri May 27 11:25:45 2011 [VMM][I]: mount it read-write in a guest
>> > domain.
>> > Fri May 27 11:25:45 2011 [VMM][I]: ExitCode: 1
>> > Fri May 27 11:25:45 2011 [VMM][E]: Error deploying virtual machine:
>> > Error:
>> > Device 51713 (vbd) could not be connected.
>> > Fri May 27 11:25:45 2011 [DiM][I]: New VM state is FAILED
>> > Fri May 27 11:25:46 2011 [TM][W]: Ignored: LOG - 14 tm_delete.sh:
>> > Deleting
>> > /var/lib/one/14/images
>> >
>> > Fri May 27 11:25:46 2011 [TM][W]: Ignored: LOG - 14 tm_delete.sh:
>> > Executed
>> > "rm -rf /var/lib/one/14/images".
>> >
>> > Fri May 27 11:25:46 2011 [TM][W]: Ignored: TRANSFER SUCCESS 14 -
>> >
>> > Fri May 27 11:57:17 2011 [DiM][I]: New VM state is DONE.
>> >
>> >
>> > # cat /var/log/xen/xen-hotplug.log
>> > Nothing to flush.
>> > xenstore-read: couldn't read path backend/vbd/14/1792/node
>> > Nothing to flush.
>> > Nothing to flush.
>> > Nothing to flush.
>> > Nothing to flush.
>> > stat: cannot stat `/opt/nebula/images/14/images/disk.0': No such file or
>> > directory
>> >
>> >
>> > This is the file when I create a VM manualy with xm on node01
>> > name = "test-debian-install"
>> > uuid = "ecc46d0d-95f2-8b0b-fe92-94f3391d58a5"
>> > maxmem = 1024
>> > memory = 1024
>> > vcpus = 1
>> > bootloader = "/usr/bin/pygrub"
>> > on_poweroff = "destroy"
>> > on_reboot = "restart"
>> > on_crash = "restart"
>> > disk = [ "tap:aio:/var/lib/xen/images/test-debian.img,xvda,w" ]
>> > vif = [ "mac=00:16:36:68:56:ef,bridge=xenbr0,script=vif-bridge" ]
>> >
>> >
>> >
>> > Does someone have a clue ?
>> >
>> >
>> >
>> >
>> >
>> >
>> >
>> >
>> >
>> > _______________________________________________
>> > Users mailing list
>> > Users at lists.opennebula.org
>> > http://lists.opennebula.org/listinfo.cgi/users-opennebula.org
>> >
>> >
>>
>>
>>
>> --
>> Javier Fontan, Grid & Virtualization Technology Engineer/Researcher
>> DSA Research Group: http://dsa-research.org
>> Globus GridWay Metascheduler: http://www.GridWay.org
>> OpenNebula Virtual Infrastructure Engine: http://www.OpenNebula.org
>



-- 
Javier Fontan, Grid & Virtualization Technology Engineer/Researcher
DSA Research Group: http://dsa-research.org
Globus GridWay Metascheduler: http://www.GridWay.org
OpenNebula Virtual Infrastructure Engine: http://www.OpenNebula.org



More information about the Users mailing list