[one-users] Contextualization

Valentin Bud valentin.bud at gmail.com
Fri Apr 18 00:12:01 PDT 2014


Hello Christophe,

I suggest you follow Andrei's suggestion in the future. It is much cleaner
and more
OpenNebula way to say so.

Read in line to continue with the process I have described.

On Thu, Apr 17, 2014 at 2:30 PM, Christophe Duez <
christophe.duez at student.uantwerpen.be> wrote:

> Hello,
> Thank you for the extensive responds
> This is what I did and where I got stuck:
>
> Export the libvirt xml of the VM from the host,
>>
>>> virsh dumpxml one-45 > /tmp/XmlDumpFile
>>
>>
>
>> stop the VM,
>>
>>> virsh destroy one-45
>>>
>>
>> undefine the domain.
>>
>>> virsh undefine one-45
>>
>>
>
>> Configure the xml to mount a local folder from the host inside the VM [1].
>>
>>>  <filesystem type='mount' accessmode='passthrough'>
>>>       <driver type='path' wrpolicy='immediate'/>
>>>       <source dir='/tmp/contextualization'/>
>>>       <target dir='/tmp/contextualization'/>
>>>       <readonly/>
>>>     </filesystem>
>>
>>
>
>>  Somehow deliver the context package in that folder.
>>
>>> mkdir /tmp/contextualization/
>>>  yum install opennebula-context -y --downloadonly
>>> --downloaddir=/tmp/contextualization/
>>
>>
>
> Define the domain using your crafted XML,
>>
>>> virsh define /tmp/XmlDumpFile
>>
>>
>> boot the machine,
>>
>>> ????
>>
>>
# virsh list --all

# virsh start one-45

After it boots up mount the shared folder in the VM and install the context
package.
The shared folder appears as a 9p [1] device inside the VM. You can find in
[1]
the way to mount it.

One more thing though. The /tmp/contextualization directory and contents
must be
owned by oneadmin, because the VM runs under oneadmin user. This way you
will be
able to mount it in the VM.

# chown -R /tmp/contextualization


>
>
> VNC to it,
>> mount the shared folder in the host and install the deb/rpm.
>
>
> can you explain the boot parth of the whole process?
> and is this right what i did so far?
>

Yes, it is perfectly right what you did so far. Again, Andrei's suggestion
is way better and
much simpler than mine.

If you choose to follow the FILES approach please redefine your original
one-45 machine.
This way you won't loose your previous work, the already installed VM.

# virsh destroy one-45
# virsh undefine one-45
# virsh define /var/lib/one/datastores/0/45/deployment.0
# virsh start one-45

Now your VM should be back under OpenNebula's control. You can stop it,
add one-context to FILES datastore, modify the template to include the
one-context
file in the CONTEXT section.

Boot the machine, mount the CONTEXT ISO (the CDROM) and there you'll have
the
one-context package.

[1]: http://www.linux-kvm.org/page/9p_virtio

Best,
Valentin


>
>
>
> On Thu, Apr 17, 2014 at 11:17 AM, Valentin Bud <valentin.bud at gmail.com>wrote:
>
>>  Hello Christophe,
>>
>>  Does your VM have a local network connection with the host or any other
>> computer in your local network? If that's the case you can finish the
>> installation,
>> reboot, connect to the VM via SSH, scp the contextualization package from
>> a local computer that is in the same network or has access to the network
>> the VM
>> is part of.
>>
>>  If you don't have VM network connectivity at all, the process I know of
>> is a little
>> bit tedious but doable.
>>
>>  Export the libvirt xml of the VM from the host, stop the VM, undefine
>> the domain.
>> Configure the xml to mount a local folder from the host inside the VM
>> [1]. Somehow
>> deliver the context package in that folder. Define the domain using your
>> crafted XML,
>> boot the machine, VNC to it, mount the shared folder in the host and
>> install the deb/rpm.
>>
>>  Are you somehow building a Debian image? If so try out bootstrap-vz, a
>> bootstraping
>> framework for Debian specifically targeted at bootstrapping systems for
>> virtualized
>> environments.
>>
>>  [1]: http://libvirt.org/formatdomain.html#elementsFilesystems
>>
>>  Best,
>> Valentin
>>
>> On Thu, Apr 17, 2014 at 11:29 AM, Christophe Duez <
>> christophe.duez at student.uantwerpen.be> wrote:
>>
>>> Hello,
>>> I followed this video from your youtube channel Bootstrapping
>>> OpenNebula 3.4 and creating a VM from scratch<https://www.youtube.com/watch?v=fQP4NQQ9NSI>.
>>> I did this with the OpenNebula 4.4.1.
>>> Almost at the end they say you have to follow the documentation to setup
>>> contextualization.
>>> I searched the documentation and found out there are 2 ways:
>>>
>>>
>>>>    - Install from our repositories package *one-context* in
>>>>    Ubuntu/Debian or *opennebula-context* in CentOS/RedHat.
>>>>    Instructions to add the repository at the installation guide<http://docs.opennebula.org/4.4/design_and_installation/building_your_cloud/ignc.html#ignc>
>>>>    .
>>>>    - Download and install the package for your distribution:
>>>>       - DEB<http://dev.opennebula.org/attachments/download/750/one-context_4.4.0.deb>:
>>>>       Compatible with Ubuntu 11.10 to 13.04 and Debian Squeeze
>>>>       - RPM<http://dev.opennebula.org/attachments/download/747/one-context_4.4.0.rpm>:
>>>>       Compatible with CentOS and RHEL 6.x
>>>>
>>>>
>>>   Now the problem that I have is the following...
>>> Without internet connection downloading the one-context package from the
>>> repository is impossible, right?
>>> And downloading the Package directly isn't possible either, is it not?
>>> So how do I enable/install the contextualization?
>>>
>>>  Please help me...
>>>
>>>  --
>>> Kind regards,
>>> Duez Christophe
>>>
>>> _______________________________________________
>>> Users mailing list
>>> Users at lists.opennebula.org
>>> http://lists.opennebula.org/listinfo.cgi/users-opennebula.org
>>>
>>>
>>
>>
>>  --
>> Valentin Bud
>> http://databus.pro | valentin at databus.pro
>>
>
>
>
> --
> Kind regards,
> Duez Christophe
> Student at University of Antwerp :
> Master of Industrial Sciences: Electronics-ICT
>
> E christophe.duez at student.uantwperen.be
> L linkedin duez-christophe<http://www.linkedin.com/pub/duez-christophe/74/7/39>
>



-- 
Valentin Bud
http://databus.pro | valentin at databus.pro
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opennebula.org/pipermail/users-opennebula.org/attachments/20140418/0a62ce79/attachment-0002.htm>


More information about the Users mailing list