Sep
15
2008
0

Is there a way to somehow mount a (shutdown) Xen disk image and browse files?

Yes .. Many .. One is
# losetup /dev/loop0 System.img
# kpartx -a /dev/loop0
# ls -l /dev/mapper/loop0*
brw-rw—- 1 root disk 253, 0 Jul 14 18:53 /dev/mapper/loop0p1
brw-rw—- 1 root disk 253, 1 Jul 14 18:53 /dev/mapper/loop0p2
# mount /dev/mapper/loop0p2 /mnt

Another is

# fdisk -l -u System.img

Device Boot Start End Blocks Id System
System.img1 * 63 208844 104391 83 Linux
System.img2 208845 8385929 4088542+ 83 Linux
# echo 208845\*512 | bc
106928640
# mount -o loop,offset=106928640 System.img /mnt

But those will not work for partitions which are LVM .. like:
# fdisk -l -u System.img
Disk System.img: 0 MB, 0 bytes
255 heads, 63 sectors/track, 0 cylinders, total 0 sectors
Units = sectors of 1 * 512 = 512 bytes

Device Boot Start End Blocks Id System
System.img1 * 63 208844 104391 83 Linux
System.img2 208845 8385929 4088542+ 8e Linux LVM

mount fails with:
mount: you must specify the filesystem type
or
ioctl: LOOP_SET_STATUS: Invalid argument
(if you use an offset mount)

I am pretty sure that there is a way to mount the logical volumes under that LVM
from dom0 .. Need to investigate..

BTW
this is not supposed to work also if the filesystem is encrypted.. That
requires encryption arguments to be passed along too.. That is rreally
advised for the sake of security.

Share
Written by in: storage,xen | Tweet This
Sep
15
2008
0

Xen Kernel Hangs booting Dom0 at Relinquishing VGA console

Xen Kernel Hangs booting Dom0 at Relinquishing VGA console

Any kernel I have tested from fedora since 2.6.23 had this issue .. Need some time to really work on it ..

Share
Written by in: xen | Tweet This
Sep
15
2008
0

Xen: How to define the boot order for HVM in vm.cfg

This is done by the boot paramer in vm.cfg.

The switches are:

* floppy (a)
* hard disk (c)
* Network (n)
* CD-ROM (d)

If you use

boot = ‘n’

it will be stuck at PXE boot even if there is no dhcp lease and guest will not attempt boot from the Virtual Disk.

To be able to have an order, you need to concatenate the switches. e.g. if you need to have a boot order like

1. network (n)
2. harddisk (c)
3. cdrom (d)

you need to have

boot=”ncd”

in vm.cfg.

Moreover,

If somehow the TFTP server is not accessible or misconfigured, that will fail
over to “c” aka. disk..

But if the DHCP server is not available, the boot will be stuck in a loop of “No
IP address”. Actually this is not much different from a normal BIOS.. A couple
of Dell systems with IBA (Intel Boot Agent) behaves similarly, but only
providing keystroke options.

I’ll also check the behaviour model of pypxeboot too ..

Share
Written by in: network,xen | Tweet This

Powered by WordPress | Theme: Aeros 2.0 by TheBuckmaker.com