debootstrap or virt-install Ubuntu Server Maverick fails
Running any kind of variation of debootstrap, I get the following error:
I: Extracting zlib1g...
W: Failure trying to run: chroot /lxc/iso/dodo mount -t proc proc /proc
debootstrap.log :
mount: permission denied
If I manually chroot
into the directory, then I am prompted with:
id: cannot find name for group ID 0
I have no name!
I tried addgroup
but it's not installed, apt-get/aptitude : command not found
, so I can't do anything with it.
I've tried ubuntu-vm-builder
, but since it's calling debootstrap, I get the same error.
I played with it for a few days, then I stopped and gave virt-install a try. Everything works until I get to the console to finish the install which only shows:
Escape character is ^]
and nothing more, no matter what I type.
So basically what I'm trying to do is build a usable chroot
system so that I can use it with lxc or libvirt.
What are my options to get containers/virtualisation up and running? I've read somewhere that I can use openvz templates with lxc or libvirt. How can I do this?
I'm doing all this on a dedicated server, so I can't access it by hand, only ssh, plus on my local pc running Ubuntu Desktop Maverick everything works.
EDIT
Getting closer, I managed to understand how to use an openvz template with lxc, now the problem comes with the network bridge:
lxc-start: invalid interface name: br0 # Use same bridge device used in your controlling host setup lxc-start: failed to process 'lxc.network.link = br0 # Use same bridge device used in your controlling host setup' lxc-start: failed to read configuration file
I followed the exact steps to create a bridge and lxc conf looks like:
lxc.network.type = veth
lxc.network.flags = up
lxc.network.link = br0 # Use same bridge device used in your controlling host setup
lxc.network.hwaddr = {a1:b2:c3:d4:e5:f6} # As appropiate (line only needed if you wish to dhcp later)
lxc.network.ipv4 = {10.0.0.100} # (Use 0.0.0.0 if you wish to dhcp later)
lxc.network.name = eth0 # could likely be whatever you want
Since it's not working, I know smth is wrong so could somebody guide me ?
EDIT: looks like the base install was using a custom kernel (bzImage-2.6.34.6-xxxx-grs-ipv6-65) for which I didn't find the headers. I did an update-grub
after I installed a new kernel, edited menu.lst and now it's using 2.6.35-23-server and now debootstrap is working just fine (same as ubuntu-vm-builder).
This command worked for me:
sudo lxc-create -n my-vm -t ubuntu
but I didn't generally find that lxc was very mature. Using kvm:
vm-builder kvm ubuntu
Perhaps the simplest solution is: download an Ubuntu ISO, run virt-manager, create a VM through the GUI, attach the ISO to the CD drive, then boot it and install in the usual way.