[libvirt-users] Fail to build libvirt-sandbox under ubuntu 12.10

I'm trying to build libvirt-sandbox under ubuntu 12.10 sudo apt-get install git build-essential lxc libvirt-bin libvirt-glib-1.0 libglib2.0-0 libglib2.0-dev gtk-doc-tools libxml2-dev libselinux-dev git clone git://libvirt.org/libvirt-sandbox.git cd libvirt-sandbox sudo ./autobuild The error I'm getting: make[2]: Entering directory `/home/user/libvirt-sandbox/build/bin' CC virt_sandbox-virt-sandbox.o CCLD virt-sandbox CC virt_sandbox_service_util-virt-sandbox-service-util.o make[2]: *** No rule to make target `container.c', needed by `virt_sandbox_service_util-container.o'. Stop. Am I doing something wrong? Thanks

On Tue, Jan 29, 2013 at 04:03:08AM +0200, pablo platt wrote:
I'm trying to build libvirt-sandbox under ubuntu 12.10
sudo apt-get install git build-essential lxc libvirt-bin libvirt-glib-1.0 libglib2.0-0 libglib2.0-dev gtk-doc-tools libxml2-dev libselinux-dev git clone git://libvirt.org/libvirt-sandbox.git cd libvirt-sandbox sudo ./autobuild
The error I'm getting: make[2]: Entering directory `/home/user/libvirt-sandbox/build/bin' CC virt_sandbox-virt-sandbox.o CCLD virt-sandbox CC virt_sandbox_service_util-virt-sandbox-service-util.o make[2]: *** No rule to make target `container.c', needed by `virt_sandbox_service_util-container.o'. Stop.
Am I doing something wrong?
Looks like Dan added a bogus line to the Makefile - i've deleted it now and pushed the fix. So update your GIT checkout. Daniel -- |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|

Thank you for the fix, I can build and install now. Now I'm having issues with the example in the man page. I'm getting unkonw option error for --host-bind:
mkdir $HOME/scratch virt-sandbox -c lxc:/// --host-bind $HOME=$HOME/scratch /bin/sh Unknown option --host-bind
The part in the man page for the options probably has typo. -b DST-GUEST-DIR=SRC-GUEST-DIR, --guest-bind One of them should probably be HOST-DIR? -B DST-GUEST-DIR=SRC-HOST-DIR, --guest-bind DST-GUEST-DIR=SRC-HOST-DIR Maybe it should be --host-bind? When dropping the --host-bind option I'm getting permission denied error:
virt-sandbox -c lxc:/// /bin/sh Unable to open connection: Unable to open lxc:///: Failed to connect socket to '/var/run/libvirt/libvirt-sock': Permission denied
I've found this http://wiki.libvirt.org/page/Failed_to_connect_to_the_hypervisor#Permission_... But it's not clear what to put in unix_sock_group, unix_sock_ro_perms and unix_sock_rw_perms. When running as root I'm getting another error (or warning):
sudo virt-sandbox -c lxc:/// /bin/sh /bin/sh: 0: can't access tty; job control turned off
Thanks On Tue, Jan 29, 2013 at 12:15 PM, Daniel P. Berrange <berrange@redhat.com>wrote:
On Tue, Jan 29, 2013 at 04:03:08AM +0200, pablo platt wrote:
I'm trying to build libvirt-sandbox under ubuntu 12.10
sudo apt-get install git build-essential lxc libvirt-bin libvirt-glib-1.0 libglib2.0-0 libglib2.0-dev gtk-doc-tools libxml2-dev libselinux-dev git clone git://libvirt.org/libvirt-sandbox.git cd libvirt-sandbox sudo ./autobuild
The error I'm getting: make[2]: Entering directory `/home/user/libvirt-sandbox/build/bin' CC virt_sandbox-virt-sandbox.o CCLD virt-sandbox CC virt_sandbox_service_util-virt-sandbox-service-util.o make[2]: *** No rule to make target `container.c', needed by `virt_sandbox_service_util-container.o'. Stop.
Am I doing something wrong?
Looks like Dan added a bogus line to the Makefile - i've deleted it now and pushed the fix. So update your GIT checkout.
Daniel -- |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/:| |: http://libvirt.org -o- http://virt-manager.org:| |: http://autobuild.org -o- http://search.cpan.org/~danberr/:| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc:|

The Unable to open connection error is fixed when adding the user to the livrtd group. Now I see this issue: https://bugzilla.redhat.com/show_bug.cgi?format=multiple&id=903593 and the rest of the issues in my previous post. On Tue, Jan 29, 2013 at 1:21 PM, pablo platt <pablo.platt@gmail.com> wrote:
Thank you for the fix, I can build and install now.
Now I'm having issues with the example in the man page.
I'm getting unkonw option error for --host-bind:
mkdir $HOME/scratch virt-sandbox -c lxc:/// --host-bind $HOME=$HOME/scratch /bin/sh Unknown option --host-bind
The part in the man page for the options probably has typo. -b DST-GUEST-DIR=SRC-GUEST-DIR, --guest-bind One of them should probably be HOST-DIR?
-B DST-GUEST-DIR=SRC-HOST-DIR, --guest-bind DST-GUEST-DIR=SRC-HOST-DIR Maybe it should be --host-bind?
When dropping the --host-bind option I'm getting permission denied error:
virt-sandbox -c lxc:/// /bin/sh Unable to open connection: Unable to open lxc:///: Failed to connect socket to '/var/run/libvirt/libvirt-sock': Permission denied
I've found this
http://wiki.libvirt.org/page/Failed_to_connect_to_the_hypervisor#Permission_... But it's not clear what to put in unix_sock_group, unix_sock_ro_perms and unix_sock_rw_perms.
When running as root I'm getting another error (or warning):
sudo virt-sandbox -c lxc:/// /bin/sh /bin/sh: 0: can't access tty; job control turned off
Thanks
On Tue, Jan 29, 2013 at 12:15 PM, Daniel P. Berrange <berrange@redhat.com>wrote:
I'm trying to build libvirt-sandbox under ubuntu 12.10
sudo apt-get install git build-essential lxc libvirt-bin
On Tue, Jan 29, 2013 at 04:03:08AM +0200, pablo platt wrote: libvirt-glib-1.0
libglib2.0-0 libglib2.0-dev gtk-doc-tools libxml2-dev libselinux-dev git clone git://libvirt.org/libvirt-sandbox.git cd libvirt-sandbox sudo ./autobuild
The error I'm getting: make[2]: Entering directory `/home/user/libvirt-sandbox/build/bin' CC virt_sandbox-virt-sandbox.o CCLD virt-sandbox CC virt_sandbox_service_util-virt-sandbox-service-util.o make[2]: *** No rule to make target `container.c', needed by `virt_sandbox_service_util-container.o'. Stop.
Am I doing something wrong?
Looks like Dan added a bogus line to the Makefile - i've deleted it now and pushed the fix. So update your GIT checkout.
Daniel -- |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|

On Tue, Jan 29, 2013 at 01:21:15PM +0200, pablo platt wrote:
Thank you for the fix, I can build and install now.
Now I'm having issues with the example in the man page.
I'm getting unkonw option error for --host-bind:
mkdir $HOME/scratch virt-sandbox -c lxc:/// --host-bind $HOME=$HOME/scratch /bin/sh Unknown option --host-bind
The part in the man page for the options probably has typo. -b DST-GUEST-DIR=SRC-GUEST-DIR, --guest-bind One of them should probably be HOST-DIR?
-B DST-GUEST-DIR=SRC-HOST-DIR, --guest-bind DST-GUEST-DIR=SRC-HOST-DIR Maybe it should be --host-bind?
Opps, the man page was out of date the - syntax checked - see the updated man page i just committed to git.
When running as root I'm getting another error (or warning):
sudo virt-sandbox -c lxc:/// /bin/sh /bin/sh: 0: can't access tty; job control turned off
I dunno why sh is doing this - i don't see it myself with bash on Fedora - i assume 'sh' is dash on Ubuntu Daniel -- |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|

On Tue, Jan 29, 2013 at 7:02 PM, Daniel P. Berrange <berrange@redhat.com>wrote:
On Tue, Jan 29, 2013 at 01:21:15PM +0200, pablo platt wrote:
Thank you for the fix, I can build and install now.
Now I'm having issues with the example in the man page.
I'm getting unkonw option error for --host-bind:
mkdir $HOME/scratch virt-sandbox -c lxc:/// --host-bind $HOME=$HOME/scratch /bin/sh Unknown option --host-bind
The part in the man page for the options probably has typo. -b DST-GUEST-DIR=SRC-GUEST-DIR, --guest-bind One of them should probably be HOST-DIR?
-B DST-GUEST-DIR=SRC-HOST-DIR, --guest-bind DST-GUEST-DIR=SRC-HOST-DIR Maybe it should be --host-bind?
Opps, the man page was out of date the - syntax checked - see the updated man page i just committed to git.
Please see additional small issues in the man page: guest-bind If TYPE is host-image, then SRC is interpreted as the path to another directory in the container filesystem. Should be "if TYpe is guest-bind" ? The "--include" option is useful for populating these temporary directories with copies of host files. I don't see --include option in the man page. This example should be updated: # mkdir $HOME/scratch # virt-sandbox -c lxc:/// --host-bind $HOME=$HOME/scratch /bin/sh
When running as root I'm getting another error (or warning):
sudo virt-sandbox -c lxc:/// /bin/sh /bin/sh: 0: can't access tty; job control turned off
I dunno why sh is doing this - i don't see it myself with bash on Fedora - i assume 'sh' is dash on Ubuntu
I've tried /bin/bash instead of /bin/sh on Ubuntu and I'm not getting the above error so there is some problem with dash. I'm probably missing something because when running the following, I'm getting the contents of my home dir: sudo virt-sandbox -c lxc:/// /bin/ls $HOME Shouldn't virt-sandbox hide everything in the host from the guest except for specifically mounted folders? Thanks
participants (2)
-
Daniel P. Berrange
-
pablo platt