Port-xen archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Create Debian domU on NetBSD (tutorial)



On Tue, Mar 23, 2010 at 11:51:55AM +0100, Victor Dorneanu wrote:

> You can find the HowTo here[1]. Some feedback - negative as positive -
> would be great.
> 
> Thanks.
> 
> [1] 
> http://dornea.nu/articles/2010/03/22/howto-create-new-debian-domu-using-xen-on-bsd

Right, now brace yourself for a long and mostly off-topic message.

I've just installed a couple of Debians recently, both on i386 and
amd64. I would suggest to make clearer which version of NetBSD you
used (as a system), which kernel you booted up and why (STABLE is
supported on the day you wrote it, 5.0.2 is not), and what hardware
+ Xen version + systems are known to work today and can be expected
tomorrow (your Howto will be read in the future). As far as I know,
the following is working today:

i386  + NetBSD-5.0.x + Xen-3.3 + netbsd-XEN3PAE_DOM0 (STABLE)
amd64 + NetBSD-5.0.x + Xen-3.1 + netbsd-XEN3_DOM0 (STABLE)

As far as I understand, this should become in the future:

i386  + NetBSD-5.1.x + Xen-3.3 + netbsd-XEN3PAE_DOM0 (5.1.x)
amd64 + NetBSD-5.1.x + Xen-3.3 + netbsd-XEN3_DOM0 (5.1.x)

When this was installed, I didn't have to download the Linux DomU
kernel and ramdisk as you wrote, xm-debian.cfg was enough on its own
(apart from vif, disk, and name parameters that I edited). So I just
ran:

xm create -c xm-debian.cfg install=true 
install-mirror=ftp://my.debian.mirror/debian

and the kernel and ramdisk were downloaded automagically. More than just
the bridge name, I highly suggest to fix the MAC address of the virtual
interface in vif. If not fixed, and changed to a random value next time
Xen boots your Debian DomU, your interface won't be brought up by Debian
because of predefined udev rules that identify the interface to be set
up from the MAC address. If you forgot to fix it the first time you
booted up your DomU, find the MAC given to your interface in
/etc/udev/rules.d/70-persistent-net.rules .

On "Step6: Install Debian", either you boot the DomU with:
 "xm create xm-debian.cfg ..." and then "xm console debianinstall",
or just:
 "xm create -c xm-debian.cfg ..."
but not:
 "xm create -c xm-debian.cfg ..." and then "xm console debianinstall"

This one coming might destroy data when installing the DomU, and might
not be safe at all when running the DomU, I'm just not qualified to make
any assessment about it. If you want your DomU to be installed on free
space on the disk, or on an already defined Linux partition, you need to
set:

disk = [ 'phy:/dev/wd0d,xvda,w' ]

(if the disk is the first disk detected by NetBSD). If you have only got
one disk on this machine (off which is running your Dom0), make sure
that:
 - you understand what the above means
 - you don't change the size and types of the existing partitions.
 - you do not install GRUB or LILO on the Master Boot Record.
 - you do _NOT_ install GRUB or LILO on the Master Boot Record.

By the way, with this, I didn't have any problem formatting my Linux
partition as Ext3. I would not suggest to mount it in NetBSD, though,
even as Ext2. If you want to share data among Dom0 and DomUs, use NFS.

However, before the end of the installation, you have to execute a shell
to :
 - manually create /boot/grub in the Debian DomU (so the following
   doesn't fail)
 - run "aptitude install linux-image-xen ..." 

You will need, somehow, to copy this kernel (vmlinuz-2.6.xx-y-xen-686
or vmlinuz-2.6.xx-y-xen-amd64) and its generated ramdisk to the Dom0, so
you can restart the DomU later. I used NFS for that.

Sorry for being that much off-topic.

-- 
Étienne


Home | Main Index | Thread Index | Old Index