[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [Libguestfs] Would this be considered a ubuntu or libguestfs issue?

On Wed, Mar 18, 2015 at 09:57:41AM -0400, Lee Revell wrote:
> On 03/17/2015 05:52 PM, Richard W.M. Jones wrote:
> >On Tue, Mar 17, 2015 at 11:49:02AM -0400, Lee Revell wrote:
> >>virt-builder on a ubuntu guest when passed --update fails with
> >>"Unable ls -al to connect to Upstart":
> >>
> >>https://www.nesono.com/node/368
> >
> >Possibly a libguestfs bug.  What is the full debug output?  What
> >version of Ubuntu?  What version of libguestfs and how obtained?
> 14.04, 12.04 and 10.04 all fail with a "Failed to connect to socket
> /com/ubuntu/upstart: Connection refused" error (the exact package
> that fails is rsyslog on 10 and 12 and libpam-systemd in 14).
> libguestfs-1.29.29 + supermin 5.1.12 built from source on fedora 21.
> Here's a log for a 14.04 guest. The command used was:
> $ ./run virt-builder ubuntu-14.04 --update --root-password
> password:changeme --format qcow2 -o /mnt/nfs/ubuntu-10.le04.qcow2

Yup, this is a bug .. in something.

What is happening is that the Ubuntu libpam-systemd package has a
post-install script that tries to communicate with the init system
(which it expects to be running, but isn't running inside the
libguestfs appliance).

The obvious way to fix this would be to use a firstboot script instead
(assuming that is working - didn't you say you had a problem with
that?).  Something like:

  $ virt-builder ... --firstboot-command 'apt-get -y update ; apt-get -y upgrade'

It may be there is some other method based on persuading the systemd
post script not to run, or not to try talking to the init process ...

Note that --update is just a convenient shorthand for:

  --run-command '
     export DEBIAN_FRONTEND=noninteractive
     apt_opts="-q -y -o Dpkg::Options::=--force-confnew"
     apt-get $apt_opts update
     apt-get $apt_opts upgrade

You can play around with that command until you get something that
works better.

> Errors were encountered while processing:
>  /var/cache/apt/archives/libpam-systemd_204-5ubuntu20.10_amd64.deb
> E: Sub-process /usr/bin/dpkg returned an error code (1)


Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
libguestfs lets you edit virtual machines.  Supports shell scripting,
bindings from many languages.  http://libguestfs.org

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]