pvgrub and single partition VM
Hello list.
I just tried pvgrub with a single-partition host:
kernel = "/usr/lib/xen/boot/pv-grub-x86_64.gz" extra = "(hd0,0)/boot/grub/menu.lst"
root = "/dev/sda1 ro"
extra = "xencons=tty console=tty"
memory = 512
maxmem = 1024
name = "cendrillon"
uuid = "46b9ff12-7ceb-4139-bbff-47117e650f25" disk = [ 'phy:/dev/iscsi/sn.101200926/lun9/part1,sda1,w' ] vif = [ 'mac=00:16:3e:00:00:1a, bridge=hebergement' ]
However, it can't read menu.lst file. And any attempt to load it interactively fails:
grubdom> configfile (hd0,0)/boot/grub/menu.lst
Error 5: Partition table invalid or corrupt
The messages seems to imply pvgrub expect to read a partition table, meaning a whole disk has to be exported to the virtual host, and not a single partition ?
Signature · 4 lines
Guillaume Rousse Service des Moyens Informatiques INRIA Saclay - Ile de France Tel: 01 69 35 69 62
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 10 lines · Samuel Thibault
Quoted 3 lines · Guillaume Rousse, le Tue 20 Jan 2009 11:57:51 +0100, a écrit :
extra = "(hd0,0)/boot/grub/menu.lst"
The messages seems to imply pvgrub expect to read a partition table, meaning a whole disk has to be exported to the virtual host, and not a single partition ?
No, you _told_ it so. Use
extra = "(hd0)/boot/grub/menu.lst"
if you're giving the partition itself.
It seems logic, but doesn't work much better:
grubdom> configfile (hd0)/boot/grub/menu.lst
Error 17: Cannot mount selected partition
The logs doesn't show anything suspect:
[2009-01-20 15:41:26 10151] DEBUG (XendDomainInfo:111) XendDomainInfo.create_from_dict({'vcpus_params': {'cap': 0, 'weight': 256}, 'PV_args': 'root=/dev/sda1 ro xencons=tty console=tty', 'features': '', 'cpus': [[]], 'paused': 0, 'domid': 80, 'shutdown': 0, 'VCPUs_live': 1, 'PV_bootloader': '', 'actions_after_crash': 'restart', 'vbd_refs': ['1e3f126f-66ac-3ea0-e0f2-6170332fd590'], 'PV_ramdisk': '', 'is_control_domain': False, 'name_label': 'cendrillon', 'VCPUs_at_startup': 1, 'HVM_boot_params': {}, 'platform': {}, 'PV_kernel': '/usr/lib/xen/boot/pv-grub-x86_64.gz', 'console_refs': ['1a37ba6d-3385-1eaa-90ea-89fafba823a3'], 'online_vcpus': 1, 'blocked': 0, 'on_xend_stop': 'ignore', 'memory_static_min': 0, 'HVM_boot_policy': '', 'shutdown_reason': 3, 'VCPUs_max': 1, 'start_time': 1232462393.5077569, 'memory_static_max': 1073741824, 'actions_after_shutdown': 'destroy', 'on_xend_start': 'ignore', 'crashed': 0, 'memory_dynamic_max': 536870912, 'actions_after_suspend': '', 'is_a_template': False, 'PV_bootloader_args': '', 'memory_dynamic_min': 536870912, 'uuid': '46b9ff12-7ceb-4139-bbff-47117e650f25', 'cpu_time': 89.821253213999995, 'shadow_memory': 0, 'dying': 0, 'vcpu_avail': 1, 'notes': {}, 'other_config': {}, 'running': 0, 'actions_after_reboot': 'restart', 'vif_refs': ['ed147c84-d62c-255e-19b4-1f64a4fe8de4'], 'target': 0, 'vtpm_refs': [], 'devices': {'1e3f126f-66ac-3ea0-e0f2-6170332fd590': ('vbd', {'uuid': '1e3f126f-66ac-3ea0-e0f2-6170332fd590', 'bootable': 1, 'devid': 2049, 'driver': 'paravirtualised', 'dev': 'sda1', 'uname': 'phy:/dev/iscsi/sn.101200926/lun9/part1', 'mode': 'w'}), 'ed147c84-d62c-255e-19b4-1f64a4fe8de4': ('vif', {'bridge': 'hebergement', 'mac': '00:16:3e:00:00:1a', 'devid': 0, 'uuid': 'ed147c84-d62c-255e-19b4-1f64a4fe8de4'}), '1a37ba6d-3385-1eaa-90ea-89fafba823a3': ('console', {'other_config': {}, 'protocol': 'vt100', 'uuid': '1a37ba6d-3385-1eaa-90ea-89fafba823a3', 'location': '2'})}}) [2009-01-20 15:41:26 10151] DEBUG (XendDomainInfo:2028) XendDomainInfo.constructDomain
[2009-01-20 15:41:26 10151] DEBUG (balloon:132) Balloon: 559836 KiB free; need 2048; done.
[2009-01-20 15:41:26 10151] DEBUG (XendDomain:447) Adding Domain: 81
[2009-01-20 15:41:26 10151] DEBUG (XendDomainInfo:2134) XendDomainInfo.initDomain: 81 256
[2009-01-20 15:41:26 10151] DEBUG (XendDomainInfo:2215) _initDomain:shadow_memory=0x0, memory_static_max=0x40000000, memory_static_min=0x0.
[2009-01-20 15:41:26 10151] DEBUG (balloon:132) Balloon: 559828 KiB free; need 528384; done.
[2009-01-20 15:41:26 10151] INFO (image:166) buildDomain os=linux dom=81 vcpus=1
[2009-01-20 15:41:26 10151] DEBUG (image:631) domid = 81 [2009-01-20 15:41:26 10151] DEBUG (image:632) memsize = 512 [2009-01-20 15:41:26 10151] DEBUG (image:633) image = /usr/lib/xen/boot/pv-grub-x86_64.gz [2009-01-20 15:41:26 10151] DEBUG (image:634) store_evtchn = 1 [2009-01-20 15:41:26 10151] DEBUG (image:635) console_evtchn = 2 [2009-01-20 15:41:26 10151] DEBUG (image:636) cmdline = root=/dev/sda1 ro xencons=tty console=tty [2009-01-20 15:41:26 10151] DEBUG (image:637) ramdisk = [2009-01-20 15:41:26 10151] DEBUG (image:638) vcpus = 1 [2009-01-20 15:41:26 10151] DEBUG (image:639) features =
[2009-01-20 15:41:26 10151] INFO (XendDomainInfo:1900) createDevice: console : {'other_config': {}, 'protocol': 'vt100', 'uuid': '1a37ba6d-3385-1eaa-90ea-89fafba823a3', 'location': '2'}
[2009-01-20 15:41:26 10151] DEBUG (DevController:122) DevController: writing {'protocol': 'x86_64-abi', 'state': '1', 'backend-id': '0', 'backend': '/local/domain/0/backend/console/81/0'} to /local/domain/81/device/console/0.
[2009-01-20 15:41:26 10151] DEBUG (DevController:124) DevController: writing {'domain': 'cendrillon', 'frontend': '/local/domain/81/device/console/0', 'uuid': '1a37ba6d-3385-1eaa-90ea-89fafba823a3', 'frontend-id': '81', 'state': '1', 'location': '2', 'online': '1', 'protocol': 'vt100'} to /local/domain/0/backend/console/81/0.
[2009-01-20 15:41:26 10151] INFO (XendDomainInfo:1900) createDevice: vbd : {'uuid': '1e3f126f-66ac-3ea0-e0f2-6170332fd590', 'bootable': 1, 'devid': 2049, 'driver': 'paravirtualised', 'dev': 'sda1', 'uname': 'phy:/dev/iscsi/sn.101200926/lun9/part1', 'mode': 'w'}
[2009-01-20 15:41:26 10151] DEBUG (DevController:122) DevController: writing {'virtual-device': '2049', 'device-type': 'disk', 'protocol': 'x86_64-abi', 'backend-id': '0', 'state': '1', 'backend': '/local/domain/0/backend/vbd/81/2049'} to /local/domain/81/device/vbd/2049.
[2009-01-20 15:41:26 10151] DEBUG (DevController:124) DevController: writing {'domain': 'cendrillon', 'frontend': '/local/domain/81/device/vbd/2049', 'uuid': '1e3f126f-66ac-3ea0-e0f2-6170332fd590', 'dev': 'sda1', 'state': '1', 'params': '/dev/iscsi/sn.101200926/lun9/part1', 'mode': 'w', 'online': '1', 'frontend-id': '81', 'type': 'phy'} to /local/domain/0/backend/vbd/81/2049.
[2009-01-20 15:41:26 10151] INFO (XendDomainInfo:1900) createDevice: vif : {'bridge': 'hebergement', 'mac': '00:16:3e:00:00:1a', 'devid': 0, 'uuid': 'ed147c84-d62c-255e-19b4-1f64a4fe8de4'}
[2009-01-20 15:41:26 10151] DEBUG (DevController:122) DevController: writing {'mac': '00:16:3e:00:00:1a', 'handle': '0', 'protocol': 'x86_64-abi', 'backend-id': '0', 'state': '1', 'backend': '/local/domain/0/backend/vif/81/0'} to /local/domain/81/device/vif/0.
[2009-01-20 15:41:26 10151] DEBUG (DevController:124) DevController: writing {'bridge': 'hebergement', 'domain': 'cendrillon', 'handle': '0', 'uuid': 'ed147c84-d62c-255e-19b4-1f64a4fe8de4', 'script': '/etc/xen/scripts/vif-bridge', 'mac': '00:16:3e:00:00:1a', 'frontend-id': '81', 'state': '1', 'online': '1', 'frontend': '/local/domain/81/device/vif/0'} to /local/domain/0/backend/vif/81/0.
[2009-01-20 15:41:26 10151] DEBUG (XendDomainInfo:2729) Storing VM details: {'on_xend_stop': 'ignore', 'shadow_memory': '0', 'uuid': '46b9ff12-7ceb-4139-bbff-47117e650f25', 'on_reboot': 'restart', 'start_time': '1232462486.58', 'on_poweroff': 'destroy', 'on_xend_start': 'ignore', 'on_crash': 'restart', 'xend/restart_count': '0', 'vcpus': '1', 'vcpu_avail': '1', 'image': "(linux (kernel /usr/lib/xen/boot/pv-grub-x86_64.gz) (args 'root=/dev/sda1 ro xencons=tty console=tty') (notes))", 'name': 'cendrillon'} [2009-01-20 15:41:26 10151] DEBUG (XendDomainInfo:1359) Storing domain details: {'console/ring-ref': '3844027', 'console/port': '2', 'name': 'cendrillon', 'console/limit': '1048576', 'vm': '/vm/46b9ff12-7ceb-4139-bbff-47117e650f25', 'domid': '81', 'store/port': '1', 'cpu/0/availability': 'online', 'memory/target': '524288', 'control/platform-feature-multiprocessor-suspend': '1', 'store/ring-ref': '3557963', 'console/type': 'xenconsoled'} [2009-01-20 15:41:26 10151] DEBUG (DevController:155) Waiting for devices vif.
[2009-01-20 15:41:26 10151] DEBUG (XendDomainInfo:1443) XendDomainInfo.handleShutdownWatch
[2009-01-20 15:41:26 10151] DEBUG (DevController:160) Waiting for 0.
[2009-01-20 15:41:26 10151] DEBUG (DevController:645) hotplugStatusCallback /local/domain/0/backend/vif/81/0/hotplug-status.
[2009-01-20 15:41:26 10151] DEBUG (DevController:659) hotplugStatusCallback 1.
[2009-01-20 15:41:27 10151] DEBUG (DevController:155) Waiting for devices vscsi.
[2009-01-20 15:41:27 10151] DEBUG (DevController:155) Waiting for devices vbd.
[2009-01-20 15:41:27 10151] DEBUG (DevController:160) Waiting for 2049.
[2009-01-20 15:41:27 10151] DEBUG (DevController:645) hotplugStatusCallback /local/domain/0/backend/vbd/81/2049/hotplug-status.
[2009-01-20 15:41:27 10151] DEBUG (DevController:659) hotplugStatusCallback 1.
[2009-01-20 15:41:27 10151] DEBUG (DevController:155) Waiting for devices irq.
[2009-01-20 15:41:27 10151] DEBUG (DevController:155) Waiting for devices vkbd.
[2009-01-20 15:41:27 10151] DEBUG (DevController:155) Waiting for devices vfb.
[2009-01-20 15:41:27 10151] DEBUG (DevController:155) Waiting for devices console.
And I can mount the partition from dom0 without problem. I have to check if ext3 support is not missing from pvgrub, but it's statically build, and I don't find any runtime-option for this, so I guess I have to check build logs.
Signature · 4 lines
Guillaume Rousse Service des Moyens Informatiques INRIA Saclay - Ile de France Tel: 01 69 35 69 62
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 7 lines · Samuel Thibault
Quoted 5 lines · Samuel Thibault, le Tue 20 Jan 2009 16:17:44 +0100, a écrit :
Quoted 1 line · Guillaume Rousse, le Tue 20 Jan 2009 15:48:55 +0100, a écrit :
And I can mount the partition from dom0 without problem. I have to check if ext3 support is not missing from pvgrub,
There is no need for any particular support for ext3, as while unmounted that's just ext2. And the 256byte inode patch is applied while building. I thus wonder what the problem can be.
Quoted 5 lines
I've just checked again, I could run configfile (hd0)/boot/blabla on a freshly formatted ext3 volume. In case you are using some non-default option that annoys grub, could you send us the output of tune2fs -l yourpartition
?
Sorry for the delay, I've been occupied by other task.
Here it is:
[root@sequoia ~]# tune2fs -l /dev/iscsi/sn.101200926/lun9/part1 tune2fs 1.41.2 (02-Oct-2008)
Filesystem volume name: <none> Last mounted on: <not available> Filesystem UUID: 9c8962e1-d521-4bbf-8dad-c92b0077d61e Filesystem magic number: 0xEF53 Filesystem revision #: 1 (dynamic) Filesystem features: has_journal ext_attr resize_inode dir_index filetype sparse_super large_file Filesystem flags: signed_directory_hash Default mount options: (none) Filesystem state: clean Errors behavior: Continue Filesystem OS type: Linux Inode count: 1310720 Block count: 5242876 Reserved block count: 262143 Free blocks: 5059920 Free inodes: 1279106 First block: 0 Block size: 4096 Fragment size: 4096 Reserved GDT blocks: 1022 Blocks per group: 32768 Fragments per group: 32768 Inodes per group: 8192 Inode blocks per group: 512 Filesystem created: Tue Feb 3 15:42:35 2009 Last mount time: Tue Feb 3 15:50:22 2009 Last write time: Tue Feb 3 15:58:30 2009 Mount count: 2 Maximum mount count: 29 Last checked: Tue Feb 3 15:42:35 2009 Check interval: 15552000 (6 months) Next check after: Sun Aug 2 16:42:35 2009 Reserved blocks uid: 0 (user root) Reserved blocks gid: 0 (group root) First inode: 11 Inode size: 256 Required extra isize: 28 Desired extra isize: 28 Journal inode: 8 Default directory hash: half_md4 Directory Hash Seed: 65b6279d-5265-40b1-9e16-afbf6335005f Journal backup: inode blocks
This is an ISCSI device.