[systemd-devel] How to provision a container after creation via a script

Chris Morgan chmorgan at gmail.com
Tue Jun 23 14:40:11 PDT 2015


On Tue, Jun 23, 2015 at 4:18 PM, Matthew Karas <mkarascybi at gmail.com> wrote:
> I have a few gigs - so it shouldn't be a problem.  I'm using parallels
> 9.  I will try manually when I have the time.
>
> On Tue, Jun 23, 2015 at 2:18 PM, Johannes Ernst
> <johannes.ernst at gmail.com> wrote:
>>
>>> On Jun 23, 2015, at 7:45, Matthew Karas <mkarascybi at gmail.com> wrote:
>>>
>>> I am trying to configure a container after creation using machinectl
>>> but I'm coming up against problems in my implementation.  If this
>>> isn't the correct way to set up a container after creation please let
>>> me know the right way.
>>>
>>> ---------My Implementation------
>>> I'm running a bash loop installing modules via systemd-nspawn on the machine
>>>
>>> systemd-nspawn -m <MACHINE> dnf -y install <PACKAGE>
>>>
>>> The machine was created via this command
>>>
>>> sudo machinectl pull-raw --verify=no <httppath to fed22> <MACHINE>
>>>
>>> ---------My Problem---------------
>>>
>>> The script installs a few packages then hangs saying the command for
>>> systemd-nspawn was killed.  Each attempt installs a few more packages.
>>>
>>> Once the script hangs - I have to reboot the system, as systemd-nspawn
>>> says the file system is busy.  There is no way to cancel the script
>>> unless you close the terminal.
>>>
>>> ---------My System----------------
>>>
>>> I'm on a macbook pro running parallels 9 - the VM is a fedora 22 install.
>>
>> I’m doing something rather similar on a macbook pro running VirtualBox and Arch. Have not run into problems.
>>
>> Does your scenario work if you do the installation manually from the shell instead of from a script?
>>
>> Just to state the obvious: the virtual machine has enough memory?
>>
>>
>>> _______________________________________________
>>> systemd-devel mailing list
>>> systemd-devel at lists.freedesktop.org
>>> http://lists.freedesktop.org/mailman/listinfo/systemd-devel
>>
> _______________________________________________
> systemd-devel mailing list
> systemd-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/systemd-devel


If the script doesn't contain proprietary information could you share
it? Wouldn't mind trying it here under my F22 install.

Chris


More information about the systemd-devel mailing list