Port-xen archive

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

Re: Installing Linux guest...



At date and time Sat, 14 Mar 2015 10:38:41 -0400, Anthony Howe wrote:

> Well I figured out how to make a Debian PV guest install properly from
> minimal .iso installer.  The issue was getting the xvd* major,minor
> numbers right.  I wrote a script mkvdisk for preparing an image disk and
> created /etc/skel/xen.* files for netbsd, debian, and centos.
> 
> During the install, /dev/cdrom is changed to /dev/xvdc; xvda is used for
> / and downgraded to ext3, since I read that pygrub doesn't yet work with
> ext4 file system; xvdb used for swap.
> 
> Once the installer has prepared the image, I simply comment out the
> entry for the .iso and the VM is ready to go without further changes.
> 
> I've tried this with the Centos 7 minimal .iso, but it doesn't work
> (yet); pygrub fails to find the kernel for some reason.
> 
> 
> ---xen.debian---
> name = "{DOMAIN}"
> bootloader = "pygrub"
> memory = 2048
> vif = [ 'bridge=bridge0' ]
> disk = [
>         # Use for phy: types...
>         #       hda = 0x300, hdb = 0x301
>         # Use for file: type...
>         #       xvda = 0xCA00, xvdb = 0xCA10, xvdc = 0xCA20, xvdd = 0xCA30
>         #       xvde = 0xCA40, xvdf = 0xCA50, xvdg = 0xCA60, xvdh = 0xCA70
>         'file:/home/iso/debian-7.8.0-amd64-netinst.iso,0xCA30,r',
>         'file:/spare/xen/{DOMAIN}/vdisk0,0xCA00,w',
>         'file:/spare/xen/{DOMAIN}/swap,0xCA10,w',
> ]

You could also leave some space free on your disk beside the NetBSD
slice and install Linux to bare metal, using logical volumes for root,
home and whatever else. Compile a Xen-aware, paravirtualized kernel in
Linux (keep the original) and copy this kernel to NetBSD for use when
you want to boot the Linux system as a domU.

This allows you to boot your Linux natively and also as a Xen domU.

You need to adjust fstab so that Linux picks up the logical volumes
correctly, whether it is booted bare-metal or as a domU. It's been a
while since I did this; I seem to remember using UUIDs for this purpose
but that might have been with traditional partitions and not logical
volumes.

With Slackware I handled booting into both environments by loading Lilo
into / instead of the MBR. I then let the NetBSD boot manager handle
booting to NetBSD dom0 or Linux. Not sure how this works with grub.

This setup was very fast - at least as fast as a native Slackware
install and possibly faster. Another thing I did while in Slackware
native was to enable XDMCP so that I could forward X in Slackware to the
dom0 while it was running as a domU.

-- 
Gerard Lally



Home | Main Index | Thread Index | Old Index