Доброго вечора, шановні колеги.
Хелп мі, пліз.
Підкажіть, будь-ласка, як правильно намалювати найпростіший конфігураційний
файл в Xen 3.X для паравіртуальної гостьової машини під Debian (Domain0).
Маю образ системи Убунту у вигляді Xen'івського файлу BBB.img:
oleh@aaz64:~$ /sbin/fdisk -lu BBB.img
You must set cylinders.
You can do this from the extra functions menu.
Disk BBB.img: 0 MB, 0 bytes
4 heads, 32 sectors/track, 0 cylinders, total 0 sectors
Units = sectors of 1 * 512 = 512 bytes
Disk identifier: 0x0004b043
Device Boot Start End Blocks Id System
BBB.img1 1 156248046 78124023 83 Linux
Partition 1 has different physical/logical endings:
phys=(1023, 3, 32) logical=(1220687, 3, 15)
BBB.img2 156248064 164061183 3906560 82 Linux swap / Solaris
Partition 2 has different physical/logical beginnings (non-Linux?):
phys=(1023, 3, 32) logical=(1220688, 0, 1)
Partition 2 has different physical/logical endings:
phys=(1023, 3, 32) logical=(1281727, 3, 32)
oleh@aaz64:~$
root@aaz64:/home/oleh# losetup /dev/loop0 BBB.img -o $((1 * 512))
Там у форматі ext4 (а Domain0 в мене ext3) знаходиться рутова файлова
система:
root@aaz64:/home/oleh# file -s /dev/loop0
/dev/loop0: Linux rev 1.0 ext4 filesystem data,
UUID=8930d547-902b-483a-bdec-3f7b3a8be99c (needs journal recovery) (extents)
(large files) (huge files)
root@aaz64:/home/oleh#
Хочу ще виділити для цієї гостьової машини (DomainU) 1 ГБ Ram.
Примонтував файл образу BBB.img *(вірніше, /dev/loop0)* до /mnt. Отримав
нормальне дерево рутової файлової системи:
oleh@aaz64:/home/oleh$ ls -l /mnt
загалом 88
drwxr-xr-x 2 root root 4096 січ 13 07:17 bin
drwxr-xr-x 3 root root 4096 січ 13 07:22 boot
drwxr-xr-x 4 root root 4096 січ 13 07:15 dev
drwxr-xr-x 85 root root 4096 січ 13 07:22 etc
drwxr-xr-x 3 root root 4096 січ 13 07:17 home
lrwxrwxrwx 1 root root 37 січ 13 07:22 initrd.img ->
boot/initrd.img-2.6.32-27-generic-pae
drwxr-xr-x 14 root root 4096 січ 13 07:17 lib
drwx------ 2 root root 16384 січ 13 07:21 lost+found
drwxr-xr-x 2 root root 4096 січ 13 07:15 media
drwxr-xr-x 2 root root 4096 кві 23 2010 mnt
drwxr-xr-x 2 root root 4096 січ 13 07:15 opt
drwxr-xr-x 2 root root 4096 кві 23 2010 proc
drwx------ 3 root root 4096 січ 13 07:17 root
drwxr-xr-x 2 root root 4096 січ 13 07:22 sbin
drwxr-xr-x 2 root root 4096 гру 5 2009 selinux
drwxr-xr-x 2 root root 4096 січ 13 07:15 srv
drwxr-xr-x 2 root root 4096 бер 30 2010 sys
drwxrwxrwt 5 root root 4096 січ 13 07:22 tmp
drwxr-xr-x 10 root root 4096 січ 13 07:15 usr
drwxr-xr-x 14 root root 4096 січ 13 07:16 var
lrwxrwxrwx 1 root root 34 січ 13 07:22 vmlinuz ->
boot/vmlinuz-2.6.32-27-generic-pae
oleh@aaz64:/home/oleh$
Тепер пробую стартонути віртуальну тачку і нічого не виходить. Завалюється
старт на процесі init :(
Відчуваю, що якоїсь єрунди не вистачає/неправильно роблю... А що саме?
Наперед вдячний за консультацію!
Не мав ніколи до цього часу справи з Xen, то вже вибачте...
Ось лог консолі:
root@aaz64:/home/oleh# xm create -c /dev/null memory=1024
kernel=/mnt/vmlinuz ramdisk=/mnt/initrd.img
disk=file:/home/oleh/BBB.img,xvda1,r root=/dev/xvda1
Using config file "/dev/null".
Started domain null
[ 0.000000] Reserving virtual address space above 0xf5800000
[ 0.000000] Initializing cgroup subsys cpuset
[ 0.000000] Initializing cgroup subsys cpu
[ 0.000000] Linux version 2.6.32-27-generic-pae (buildd@roseapple) (gcc
version 4.4.3 (Ubuntu 4.4.3-4ubuntu5) ) #49-Ubuntu SMP Thu Dec 2 00:07:52
UTC 2010 (Ubuntu 2.6.32-27.49-generic-pae 2.6.32.26+drm33.12)
[ 0.000000] KERNEL supported cpus:
[ 0.000000] Intel GenuineIntel
[ 0.000000] AMD AuthenticAMD
[ 0.000000] NSC Geode by NSC
[ 0.000000] Cyrix CyrixInstead
[ 0.000000] Centaur CentaurHauls
[ 0.000000] Transmeta GenuineTMx86
[ 0.000000] Transmeta TransmetaCPU
[ 0.000000] UMC UMC UMC UMC
[ 0.000000] ACPI in unprivileged domain disabled
[ 0.000000] BIOS-provided physical RAM map:
[ 0.000000] Xen: 0000000000000000 - 00000000000a0000 (usable)
[ 0.000000] Xen: 00000000000a0000 - 0000000000100000 (reserved)
[ 0.000000] Xen: 0000000000100000 - 0000000040000000 (usable)
[ 0.000000] DMI not present or invalid.
[ 0.000000] last_pfn = 0x40000 max_arch_pfn = 0x1000000
[ 0.000000] Scanning 1 areas for low memory corruption
[ 0.000000] modified physical RAM map:
[ 0.000000] modified: 0000000000000000 - 0000000000002000 (usable)
[ 0.000000] modified: 0000000000002000 - 0000000000006000 (reserved)
[ 0.000000] modified: 0000000000006000 - 00000000000a0000 (usable)
[ 0.000000] modified: 00000000000a0000 - 0000000000100000 (reserved)
[ 0.000000] modified: 0000000000100000 - 0000000040000000 (usable)
[ 0.000000] init_memory_mapping: 0000000000000000-000000002d1fe000
[ 0.000000] Using x86 segment limits to approximate NX protection
[ 0.000000] RAMDISK: 00a5b000 - 01215000
[ 0.000000] 302MB HIGHMEM available.
[ 0.000000] 721MB LOWMEM available.
[ 0.000000] mapped low ram: 0 - 2d1fe000
[ 0.000000] low ram: 0 - 2d1fe000
[ 0.000000] node 0 low ram: 00000000 - 2d1fe000
[ 0.000000] node 0 bootmap 00007000 - 0000ca40
[ 0.000000] (9 early reservations) ==> bootmem [0000000000 - 002d1fe000]
[ 0.000000] #0 [0000000000 - 0000001000] BIOS data page ==>
[0000000000 - 0000001000]
[ 0.000000] #1 [0001318000 - 0001324000] XEN PAGETABLES ==>
[0001318000 - 0001324000]
[ 0.000000] #2 [0000001000 - 0000002000] EX TRAMPOLINE ==>
[0000001000 - 0000002000]
[ 0.000000] #3 [0000006000 - 0000007000] TRAMPOLINE ==>
[0000006000 - 0000007000]
[ 0.000000] #4 [0000100000 - 0000935818] TEXT DATA BSS ==>
[0000100000 - 0000935818]
[ 0.000000] #5 [0000a5b000 - 0001215000] RAMDISK ==>
[0000a5b000 - 0001215000]
[ 0.000000] #6 [0001215000 - 0001318000] XEN START INFO ==>
[0001215000 - 0001318000]
[ 0.000000] #7 [0001324000 - 0001480000] PGTABLE ==>
[0001324000 - 0001480000]
[ 0.000000] #8 [0000007000 - 000000d000] BOOTMAP ==>
[0000007000 - 000000d000]
[ 0.000000] Zone PFN ranges:
[ 0.000000] DMA 0x00000000 -> 0x00001000
[ 0.000000] Normal 0x00001000 -> 0x0002d1fe
[ 0.000000] HighMem 0x0002d1fe -> 0x00040000
[ 0.000000] Movable zone start PFN for each node
[ 0.000000] early_node_map[3] active PFN ranges
[ 0.000000] 0: 0x00000000 -> 0x00000002
[ 0.000000] 0: 0x00000006 -> 0x000000a0
[ 0.000000] 0: 0x00000100 -> 0x00040000
[ 0.000000] Using APIC driver default
[ 0.000000] SFI: Simple Firmware Interface v0.7 http://simplefirmware.org
[ 0.000000] SMP: Allowing 1 CPUs, 0 hotplug CPUs
[ 0.000000] Local APIC disabled by BIOS -- you can enable it with "lapic"
[ 0.000000] APIC: disable apic facility
[ 0.000000] PM: Registered nosave memory: 0000000000002000 -
0000000000006000
[ 0.000000] PM: Registered nosave memory: 00000000000a0000 -
0000000000100000
[ 0.000000] Allocating PCI resources starting at 40000000 (gap:
40000000:c0000000)
[ 0.000000] Booting paravirtualized kernel on Xen
[ 0.000000] Xen version: 3.2-1
[ 0.000000] NR_CPUS:8 nr_cpumask_bits:8 nr_cpu_ids:1 nr_node_ids:1
[ 0.000000] PERCPU: Embedded 15 pages/cpu @c1c88000 s39480 r0 d21960
u65536
[ 0.000000] pcpu-alloc: s39480 r0 d21960 u65536 alloc=16*4096
[ 0.000000] pcpu-alloc: [0] 0
[ 0.000000] Xen: using vcpu_info placement
[ 0.000000] Built 1 zonelists in Zone order, mobility grouping on. Total
pages: 259995
[ 0.000000] Kernel command line: root=/dev/xvda1
[ 0.000000] PID hash table entries: 4096 (order: 2, 16384 bytes)
[ 0.000000] Dentry cache hash table entries: 131072 (order: 7, 524288
bytes)
[ 0.000000] Inode-cache hash table entries: 65536 (order: 6, 262144
bytes)
[ 0.000000] Enabling fast FPU save and restore... done.
[ 0.000000] Enabling unmasked SIMD FPU exception support... done.
[ 0.000000] Initializing CPU#0
[ 0.000000] allocated 5242880 bytes of page_cgroup
[ 0.000000] please try 'cgroup_disable=memory' option if you don't want
memory cgroups
[ 0.000000] Initializing HighMem for node 0 (0002d1fe:00040000)
[ 0.000000] Memory: 1014708k/1048576k available (4835k kernel code,
33012k reserved, 2218k data, 672k init, 309256k highmem)
[ 0.000000] virtual kernel memory layout:
[ 0.000000] fixmap : 0xf571d000 - 0xf57ff000 ( 904 kB)
[ 0.000000] pkmap : 0xf5200000 - 0xf5400000 (2048 kB)
[ 0.000000] vmalloc : 0xed9fe000 - 0xf51fe000 ( 120 MB)
[ 0.000000] lowmem : 0xc0000000 - 0xed1fe000 ( 721 MB)
[ 0.000000] .init : 0xc07e4000 - 0xc088c000 ( 672 kB)
[ 0.000000] .data : 0xc05b8ebf - 0xc07e36e8 (2218 kB)
[ 0.000000] .text : 0xc0100000 - 0xc05b8ebf (4835 kB)
[ 0.000000] SLUB: Genslabs=13, HWalign=64, Order=0-3, MinObjects=0,
CPUs=1, Nodes=1
[ 0.000000] Hierarchical RCU implementation.
[ 0.000000] NR_IRQS:2304 nr_irqs:256
[ 0.000000] Console: colour dummy device 80x25
[ 0.000000] console [tty0] enabled
[ 0.000000] console [hvc0] enabled
[ 0.000000] installing Xen timer for CPU 0
[ 0.000000] Detected 2094.748 MHz processor.
[ 0.004000] Calibrating delay loop (skipped), value calculated using
timer frequency.. 4189.49 BogoMIPS (lpj=8378992)
[ 0.004000] Security Framework initialized
[ 0.004000] AppArmor: AppArmor initialized
[ 0.004000] Mount-cache hash table entries: 512
[ 0.004000] Initializing cgroup subsys ns
[ 0.004000] Initializing cgroup subsys cpuacct
[ 0.004000] Initializing cgroup subsys memory
[ 0.004000] Initializing cgroup subsys devices
[ 0.004000] Initializing cgroup subsys freezer
[ 0.004000] Initializing cgroup subsys net_cls
[ 0.004000] CPU: L1 I cache: 32K, L1 D cache: 32K
[ 0.004000] CPU: L2 cache: 1024K
[ 0.004000] CPU: Unsupported number of siblings 2
[ 0.004000] Performance Events: unsupported p6 CPU model 23 no PMU
driver, software events only.
[ 0.004000] SMP alternatives: switching to UP code
[ 0.008000] Freeing SMP alternatives: 20k freed
[ 0.008000] ftrace: converting mcount calls to 0f 1f 44 00 00
[ 0.008000] ftrace: allocating 22417 entries in 44 pages
[ 0.008078] cpu 0 spinlock event irq 1
[ 0.008319] Brought up 1 CPUs
[ 0.008531] devtmpfs: initialized
[ 0.009098] Grant table initialized
[ 0.009111] regulator: core version 0.5
[ 0.028956] Time: 165:165:165 Date: 165/165/65
[ 0.029086] NET: Registered protocol family 16
[ 0.029320] EISA bus registered
[ 0.029320] PCI: Fatal: No config space access function found
[ 0.032090] bio: create slab <bio-0> at 0
[ 0.032193] ACPI: Interpreter disabled.
[ 0.032236] xen_balloon: Initialising balloon driver.
[ 0.032236] vgaarb: loaded
[ 0.032341] SCSI subsystem initialized
[ 0.032604] usbcore: registered new interface driver usbfs
[ 0.032636] usbcore: registered new interface driver hub
[ 0.032701] usbcore: registered new device driver usb
[ 0.032923] PCI: System does not support PCI
[ 0.032933] PCI: System does not support PCI
[ 0.033068] NetLabel: Initializing
[ 0.033078] NetLabel: domain hash size = 128
[ 0.033085] NetLabel: protocols = UNLABELED CIPSOv4
[ 0.033112] NetLabel: unlabeled traffic allowed by default
[ 0.033175] Switching to clocksource xen
[ 0.035918] AppArmor: AppArmor Filesystem Enabled
[ 0.035938] pnp: PnP ACPI: disabled
[ 0.035946] PnPBIOS: Disabled
[ 0.036300] NET: Registered protocol family 2
[ 0.036411] IP route cache hash table entries: 32768 (order: 5, 131072
bytes)
[ 0.036785] TCP established hash table entries: 131072 (order: 8, 1048576
bytes)
[ 0.037410] TCP bind hash table entries: 65536 (order: 7, 524288 bytes)
[ 0.037792] TCP: Hash tables configured (established 131072 bind 65536)
[ 0.037806] TCP reno registered
[ 0.037953] NET: Registered protocol family 1
[ 0.038156] platform rtc_cmos: registered platform RTC device (no PNP
device found)
[ 0.038237] cpufreq-nforce2: No nForce2 chipset.
[ 0.038275] Scanning for low memory corruption every 60 seconds
[ 0.038468] audit: initializing netlink socket (disabled)
[ 0.038499] type=2000 audit(1298063037.416:1): initialized
[ 0.048478] Trying to unpack rootfs image as initramfs...
[ 0.060402] highmem bounce pool size: 64 pages
[ 0.060422] HugeTLB registered 2 MB page size, pre-allocated 0 pages
[ 0.068074] VFS: Disk quotas dquot_6.5.2
[ 0.068186] Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[ 0.069015] fuse init (API version 7.13)
[ 0.069146] msgmni has been set to 1378
[ 0.069455] alg: No test for stdrng (krng)
[ 0.069543] Block layer SCSI generic (bsg) driver version 0.4 loaded
(major 253)
[ 0.069557] io scheduler noop registered
[ 0.069564] io scheduler anticipatory registered
[ 0.069572] io scheduler deadline registered
[ 0.069631] io scheduler cfq registered (default)
[ 0.069724] pci_hotplug: PCI Hot Plug PCI Core version: 0.5
[ 0.069769] pciehp: PCI Express Hot Plug Controller Driver version: 0.4
[ 0.078455] Serial: 8250/16550 driver, 4 ports, IRQ sharing enabled
[ 0.080133] isapnp: Write Data Register 0xa79 already used
[ 0.080398] brd: module loaded
[ 0.081151] loop: module loaded
[ 0.081339] input: Macintosh mouse button emulation as
/devices/virtual/input/input0
[ 0.082061] Fixed MDIO Bus: probed
[ 0.082121] PPP generic driver version 2.4.2
[ 0.082189] tun: Universal TUN/TAP device driver, 1.6
[ 0.082197] tun: (C) 1999-2004 Max Krasnyansky