Would this be considered a ubuntu or libguestfs issue?
virt-builder on a ubuntu guest when passed --update fails with "Unable to connect to Upstart": https://www.nesono.com/node/368 Lee
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 to connect to Upstart":
Possibly a libguestfs bug. What is the full debug output? What version of Ubuntu? What version of libguestfs and how obtained? Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com virt-top is 'top' for virtual machines. Tiny program with many powerful monitoring features, net stats, disk stats, logging, etc. http://people.redhat.com/~rjones/virt-top
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":
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 Thanks, Lee
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":
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)
Rich. -- 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
On 03/18/2015 10:17 AM, Richard W.M. Jones wrote:
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'
Yeah, this is the workaround I've been using. Thanks, Lee
On Wed, Mar 18, 2015 at 02:17:50PM +0000, Richard W.M. Jones wrote:
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. [...] 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).
I can reproduce this. I still think it's a bug in the Ubuntu dpkg scripts though .. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com Fedora Windows cross-compiler. Compile Windows programs, test, and build Windows installers. Over 100 libraries supported. http://fedoraproject.org/wiki/MinGW
On Sat, Apr 04, 2015 at 10:20:17PM +0100, Richard W.M. Jones wrote:
On Wed, Mar 18, 2015 at 02:17:50PM +0000, Richard W.M. Jones wrote:
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. [...] 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).
I can reproduce this. I still think it's a bug in the Ubuntu dpkg scripts though ..
Bug or not, I replaced the --update flag with: --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 ||: ' \ --firstboot-command 'apt-get -f install' which seems to work around the problem, although Ubuntu gets "stuck" booting - not sure if it did that before however. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com virt-p2v converts physical machines to virtual machines. Boot with a live CD or over the network (PXE) and turn machines into KVM guests. http://libguestfs.org/virt-v2v
participants (2)
-
Lee Revell -
Richard W.M. Jones