Skip to contentSkip to conversation

The Problem of Creating a domain

DISCUSSION Inaba 4 participants 7 messages Feb 9, 2004 – Feb 17, 2004

lore
Share & tools
lore

Inaba

author
#0 lore raw

Hi all !!

I have a problem of creating a domain, How can I solve this problem ?

thanks for your help

the messages received from xen_read_console as bellow

[6] ctivating swap partitions: swapon: /dev/hda7: No such device or address
[6] [FAILED]
[6] ioctl 80041272 not supported by xl_block
[6] Finding module dependencies: depmod: Can't open /lib/modules/2.4.24-xeno/modules.dep for writing
[6] [FAILED]
[6] Checking filesystems
[6] Couldn't find matching filesystem: LABEL=/policy
[6] Checking all file systems.
[6] [FAILED]
[6]
[6] *** An error occurred during the file system check.
[6] *** Dropping you to a shell; the system will reboot
[6] *** when you leave the shell.
[6] Give root password for maintenance

fdisk -l /dev/hda

Disk /dev/hda: 30.6 GB, 30606151680 bytes
255 heads, 63 sectors/track, 3720 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot    Start       End    Blocks   Id  System
/dev/hda1   *         1       653   5245191    7  HPFS/NTFS
/dev/hda2           654      3719  24627645    f  Win95 Ext'd (LBA)
/dev/hda5           654      1175   4192933+  83  Linux
/dev/hda6          1176      1828   5245191   83  Linux
/dev/hda7          1829      1893    522081   82  Linux swap
/dev/hda8          1894      3719  14667313+  83  Linux

configuration of my domain

image = "/boot/xenolinux.gz"
ramdisk = ""
#ramdisk = "/boot/initrd.gz" builder_fn='xc.linux_build' # this is a linux domain

mem_size = 64

domain_name = "This is VM %d" % vmid

vfr_ipaddr = [XenoUtil.add_offset_to_ip(XenoUtil.get_current_ipaddr(),vmid),

        XenoUtil.add_offset_to_ip('169.254.1.0',vmid),]

vbd_list = [ ('phy:hda8','hda8','w')]

vbd_expert = 0

netmask = XenoUtil.get_current_ipmask()
gateway = XenoUtil.get_current_ipgw()
nfsserv = '169.254.1.0'

cmdline_ip = "ip="+vfr_ipaddr[0]+":"+nfsserv+":"+gateway+":"+netmask+"::eth0:on"

cmdline_root = "root=/dev/hda8 ro" cmdline_extra = "4 VMID=%d usr=/dev/hda8" % vmid

#1 lore raw
Quoted 8 lines

[6] ctivating swap partitions: swapon: /dev/hda7: No such device or address
[6] [FAILED]
[6] ioctl 80041272 not supported by xl_block
[6] Finding module dependencies: depmod: Can't open /lib/modules/2.4.24-xeno/modules.dep for writing
[6] [FAILED]
[6] Checking filesystems
[6] Couldn't find matching filesystem: LABEL=/policy

Edit your /etc/fstab on /dev/hda8 so that it includes a device name rather than a Label for your filesystems (The standard kernel configuration doesn't have devfs)

Also, if you want to use hda7 for swap in the new domain you'll need to make it available:

vbd_list = [ ('phy:hda8','hda8','w'), ('phy:hda7','hda7','w') ]

However, your fdisk output suggests that you might be using hda7 as swap for domain0. Don't use the same swap partition for domain 1 !!!

Ian

-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now. Build and deploy apps & Web services for Linux with a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click

author
#2 lore raw

I have editted the /etc/fstab like this

/dev/hda1 / ext3 defaults 1 1
none /dev/pts devpts gid=5,mode=620 0
0
/dev/hda5 /domain ext3 defaults 1 2
none /proc proc defaults 0
0
none /dev/shm tmpfs defaults 0
0

/dev/hda2               /work                   ext3    defaults        1 2
/dev/hda3               swap                    swap    defaults        0 0

but when I created a new domain, some errors still occurred in filesystem checking as below

[1] Checking filesystems
[1] fsck.ext3Possibly non-existent or swap device?
[1] Possibly non-existent or swap device?
[1] Checking all file systems.
[1] [/sbin/fsck.ext3 (1) -- /domain] fsck.ext3 -a /dev/hda5
[1] [/sbin/fsck.ext3 (1) -- /work] fsck.ext3 -a /dev/hda2
[1] : No such device or address while trying to open /dev/hda5
[1] fsck.ext3: No such device or address while trying to open /dev/hda2
[1] [FAILED]
[1]
[1] *** An error occurred during the file system check.
[1] *** Dropping you to a shell; the system will reboot
[1] *** when you leave the shell.
[1] Give root password for maintenance

I think may be there are some errors in /etc/fstab but I could not find it

Is there any step I missed?

# fdisk -l /dev/hdaDisk /dev/hda: 30.6 GB, 30606151680 bytes

255 heads, 63 sectors/track, 3720 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot    Start       End    Blocks   Id     System
/dev/hda1   *         1      1305  10482381   83  Linux
/dev/hda2          1306      2610  10482412+  83  Linux
/dev/hda3          2611      2675    522112+  82  Linux swap
/dev/hda4          2676      3720   8393962+   f  Win95 Ext'd (LBA)
/dev/hda5          2676      3720   8393931   83  Linux

another dumb problem:

my vbd_list is set like this

vbd_list = [ ('phy:hda5','hda5','w' ), ('phy:hda3','hda3','w') ]

but it shows the error message as below

Warning: one or more hard disk extents are
writeable by two or more domains simultaneously.
ERROR: This kind of disk sharing is not allowed
at the current safety level (0).

and then I changed the vbd_list as

vbd_list = [ ('phy:hda1','hda1','w' ), ('phy:hda3','hda3','w') ]

It could continue the domain booting sequence

Why I can't use /dev/hda5 as the vbd_list?

Is there any clear document that descirbe how to install Xen from xeno-1.2.tar.gz step by step?

Cheers!

Inaba

Quoted 7 lines

Edit your /etc/fstab on /dev/hda8 so that it includes a device name rather than a Label for your filesystems (The standard kernel configuration doesn't have devfs)

Also, if you want to use hda7 for swap in the new domain you'll need to make it available:

Quoted 9 lines

vbd_list = [ ('phy:hda8','hda8','w'), ('phy:hda7','hda7','w') ]

However, your fdisk output suggests that you might be using hda7 as swap for domain0. Don't use the same swap partition for domain 1 !!!

Ian

-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now. Build and deploy apps & Web services for Linux with a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click

#3 lore raw
Quoted 9 lines

vbd_list = [ ('phy:hda5','hda5','w' ), ('phy:hda3','hda3','w') ]

but it shows the error message as below

Warning: one or more hard disk extents are
writeable by two or more domains simultaneously.
ERROR: This kind of disk sharing is not allowed
at the current safety level (0).

The vbd_list determines what areas of the disk the new domain will have access to.

This error message is triggering because you are tying to do something that is dangerous : giving two domains read/write access to the same area of disk.

The two domains need their own, separate, root filesystems. It looks like you're trying to have hda5 as the root filesystem for the new domain, but already have it mounted in domain0, hence the error.

Also, it looks like you're trying to give both domains hda3 as a swap device, which will definitely not work!

There are several sources of documentation that we hope to collate and get on the main Xen pages:

Jans' excellent Xen FAQ:
http://xen.epiuse.com/xen-faq.txt

Bin Ren's HOWTO:
http://www.cl.cam.ac.uk/~br260/doc/xeno-1.1-howto.txt

Yan-Ching's HOWTO:
http://www.csc.liv.ac.uk/~u2ycc/xen/xen-install-domain-fs-howto.txt

Xen for Grid by Greg Newby:
http://www.arsc.edu/~newby/grid/xen-for-grid.txt

Ian

-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now. Build and deploy apps & Web services for Linux with a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click

#4 lore raw
In reply to Inaba
Quoted 32 lines

I have editted the /etc/fstab like this

/dev/hda1 / ext3 defaults 1 1
none /dev/pts devpts gid=5,mode=620 0
0
/dev/hda5 /domain ext3 defaults 1 2
none /proc proc defaults 0
0
none /dev/shm tmpfs defaults 0
0

/dev/hda2               /work                   ext3    defaults        1 2
/dev/hda3               swap                    swap    defaults        0 0

but when I created a new domain, some errors still occurred in filesystem checking as below

[1] Checking filesystems
[1] fsck.ext3Possibly non-existent or swap device?
[1] Possibly non-existent or swap device?
[1] Checking all file systems.
[1] [/sbin/fsck.ext3 (1) -- /domain] fsck.ext3 -a /dev/hda5
[1] [/sbin/fsck.ext3 (1) -- /work] fsck.ext3 -a /dev/hda2
[1] : No such device or address while trying to open /dev/hda5
[1] fsck.ext3: No such device or address while trying to open /dev/hda2
[1] [FAILED]
[1]
[1] *** An error occurred during the file system check.
[1] *** Dropping you to a shell; the system will reboot
[1] *** when you leave the shell.
[1] Give root password for maintenance

Quoted 1 line

I think may be there are some errors in /etc/fstab but I could not find it

The above error message means "there is no device called /dev/hda5". This means that you have not exported it as a vbd to this domain.

The vbd exports and the /etc/fstab for every domain (except 0) need to be "in sync".

Quoted 4 lines

another dumb problem:

my vbd_list is set like this

Quoted 8 lines

vbd_list = [ ('phy:hda5','hda5','w' ), ('phy:hda3','hda3','w') ]

but it shows the error message as below

Warning: one or more hard disk extents are
writeable by two or more domains simultaneously.
ERROR: This kind of disk sharing is not allowed
at the current safety level (0).

My guess is that you have either hda5 or hda3 (or both) mounted read-write in domain 0. If the tool let you proceed, you would end up moulinexing the partitions (you cannot allow two domains to mount the same partition read-write as they will make independent and inconsistent updates).

To fix this, unmout (or remount read-only) /dev/hda5 and/or /dev/hda3

Quoted 5 lines

and then I changed the vbd_list as

vbd_list = [ ('phy:hda1','hda1','w' ), ('phy:hda3','hda3','w') ]

It could continue the domain booting sequence

Well this would cause the problem you observed above: you have now not exported hda5 to the new domain, and so when it tries to access it it discovers that it is not there.

Quoted 1 line

Why I can't use /dev/hda5 as the vbd_list?

This is not a sane question -- if you mean why can you not have hda5 in the vbd_list, the answer is almost certainly as explained above.

Quoted 2 lines

Is there any clear document that descirbe how to install Xen from xeno-1.2.tar.gz step by step?

There are a number of howtos as mentioned in Ian's last message:

Jans' excellent Xen FAQ:
http://xen.epiuse.com/xen-faq.txt

Bin Ren's HOWTO:
http://www.cl.cam.ac.uk/~br260/doc/xeno-1.1-howto.txt

Yan-Ching's HOWTO:
http://www.csc.liv.ac.uk/~u2ycc/xen/xen-install-domain-fs-howto.txt

Xen for Grid by Greg Newby:
http://www.arsc.edu/~newby/grid/xen-for-grid.txt

However I do not think any of these go into sufficient detail for you.

cheers,

S.

-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now. Build and deploy apps & Web services for Linux with a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click

#5 lore raw

Thanks for all the helps !!

When I create the domain 1, I received the message as bellow in xen_read_domain console:

[10] modprobe: Can't open dependencies file /lib/modules/2.4.24-xeno/modules.dep (No such file or directory)
[10] Remounting root filesystem in read-write mode: [ OK ]
[10] Mounting local filesystems: [ OK ]
[10] Turning on process accounting [ OK ]
[10] INIT: Entering runlevel: 4
[10] Entering non-interactive startup
[10] Setting network parameters: [ OK ]
[10] Bringing up loopback interface: [ OK ]

[10] Starting system logger: [  OK  ]
[10] Starting kernel logger: [  OK  ]

[10] Initializing random number generator: [ OK ]
[10] Starting sshd:[ OK ]
[10] Starting crond: [ OK ]
[10] Starting xfs: [ OK ]
[10] Starting anacron: [ OK ]
[10]
[10] eth0 Link encap:Ethernet HWaddr AA:00:00:63:8B:C7
[10] inet addr:163.25.117.195 Bcast:163.25.117.255
Mask:255.255.255.0

[10]           UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
[10]           RX packets:0 errors:0 dropped:0 overruns:0 frame:0
[10]           TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
[10]           collisions:0 txqueuelen:1000
[10]           RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)

[10]
[10] cat: /usr/XenDemoCD/buildinfo.txt: No such file or directory
[10] INIT: no more processes left in this runlevel

Is that means that the boot sequence of domain1 done ? (I guess not)

But I could not use ssh [email protected] to access domain 1 ?

And I use the command #xc_dom_control.py list, it shows :

{'cpu_time': 47000774876L, 'stopped': 0, 'name': 'Domain-0', 'mem_kb':
131072, 'dom': 0, 'running': 1, 'cpu': 0}
{'cpu_time': 5224622362L, 'stopped': 0, 'name': 'This is VM 1', 'mem_kb':
65536, 'dom': 10, 'running': 0, 'cpu': 0}

What's the problem in the domain1 booting?

cheers,

Inaba

----- Original Message -----
From: "Steven Hand" <[email protected]>
To: "Inaba" <[email protected]>
Cc: "Ian Pratt" <[email protected]>; "xen-devel" <[email protected]>
Sent: Monday, February 16, 2004 5:00 PM
Subject: Re: [Xen-devel] The Problem of Creating a domain

Quoted 4 lines
Quoted 4 lines

I have editted the /etc/fstab like this

/dev/hda1 / ext3 defaults

1 1

Quoted 1 line
Quoted 1 line

none /dev/pts devpts

gid=5,mode=620 0

Quoted 2 lines
Quoted 2 lines

0
/dev/hda5 /domain ext3 defaults

1 2

Quoted 1 line
Quoted 1 line

none /proc proc defaults

0

Quoted 2 lines
Quoted 2 lines

0
none /dev/shm tmpfs defaults

0

Quoted 2 lines
Quoted 2 lines

0
/dev/hda2 /work ext3 defaults

1 2

Quoted 1 line
Quoted 1 line

/dev/hda3 swap swap defaults

0 0

Quoted 2 lines
Quoted 2 lines

but when I created a new domain, some errors still occurred in

filesystem

Quoted 17 lines
Quoted 17 lines

checking as below

[1] Checking filesystems
[1] fsck.ext3Possibly non-existent or swap device?
[1] Possibly non-existent or swap device?
[1] Checking all file systems.
[1] [/sbin/fsck.ext3 (1) -- /domain] fsck.ext3 -a /dev/hda5
[1] [/sbin/fsck.ext3 (1) -- /work] fsck.ext3 -a /dev/hda2
[1] : No such device or address while trying to open /dev/hda5
[1] fsck.ext3: No such device or address while trying to open /dev/hda2
[1] [FAILED]
[1]
[1] *** An error occurred during the file system check.
[1] *** Dropping you to a shell; the system will reboot
[1] *** when you leave the shell.
[1] Give root password for maintenance

Quoted 1 line
Quoted 1 line

I think may be there are some errors in /etc/fstab but I could not find

it

Quoted 77 lines

The above error message means "there is no device called /dev/hda5". This means that you have not exported it as a vbd to this domain.

The vbd exports and the /etc/fstab for every domain (except 0) need to be "in sync".

Quoted 4 lines

another dumb problem:

my vbd_list is set like this

Quoted 8 lines

vbd_list = [ ('phy:hda5','hda5','w' ), ('phy:hda3','hda3','w') ]

but it shows the error message as below

Warning: one or more hard disk extents are
writeable by two or more domains simultaneously.
ERROR: This kind of disk sharing is not allowed
at the current safety level (0).

My guess is that you have either hda5 or hda3 (or both) mounted read-write in domain 0. If the tool let you proceed, you would end up moulinexing the partitions (you cannot allow two domains to mount the same partition read-write as they will make independent and inconsistent updates).

To fix this, unmout (or remount read-only) /dev/hda5 and/or /dev/hda3

Quoted 5 lines

and then I changed the vbd_list as

vbd_list = [ ('phy:hda1','hda1','w' ), ('phy:hda3','hda3','w') ]

It could continue the domain booting sequence

Well this would cause the problem you observed above: you have now not exported hda5 to the new domain, and so when it tries to access it it discovers that it is not there.

Quoted 1 line

Why I can't use /dev/hda5 as the vbd_list?

This is not a sane question -- if you mean why can you not have hda5 in the vbd_list, the answer is almost certainly as explained above.

Quoted 2 lines

Is there any clear document that descirbe how to install Xen from xeno-1.2.tar.gz step by step?

There are a number of howtos as mentioned in Ian's last message:

Jans' excellent Xen FAQ:
http://xen.epiuse.com/xen-faq.txt

Bin Ren's HOWTO:

   http://www.cl.cam.ac.uk/~br260/doc/xeno-1.1-howto.txt

   Yan-Ching's HOWTO:
   http://www.csc.liv.ac.uk/~u2ycc/xen/xen-install-domain-fs-howto.txt

   Xen for Grid by Greg Newby:
   http://www.arsc.edu/~newby/grid/xen-for-grid.txt

However I do not think any of these go into sufficient detail for you.

cheers,

S.

Quoted 9 lines

-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now. Build and deploy apps & Web services for Linux with a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click
_______________________________________________
Xen-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/xen-devel

-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now. Build and deploy apps & Web services for Linux with a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click

#6 lore raw
Quoted 5 lines

When I create the domain 1, I received the message as bellow in xen_read_domain console:
[10] INIT: Entering runlevel: 4
[10] Starting sshd:[ OK ]

...

Quoted 9 lines

[10] eth0 Link encap:Ethernet HWaddr AA:00:00:63:8B:C7
[10] inet addr:163.25.117.195 Bcast:163.25.117.255
Mask:255.255.255.0

[10]           UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
[10]           RX packets:0 errors:0 dropped:0 overruns:0 frame:0
[10]           TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
[10]           collisions:0 txqueuelen:1000
[10]           RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)

[10]

...

Quoted 3 lines

[10] INIT: no more processes left in this runlevel

Is that means that the boot sequence of domain1 done ? (I guess not)

The domain is booted just fine.

Quoted 1 line

But I could not use ssh [email protected] to access domain 1 ?

I see you're using the root filesystems from the democd. Which version 1.0 or 1.2 ?

The problem is one of two things:
1) you're either not telling Xen that it should route packets
destined to 169.254.1.1 to this domain
2) you're not actually assigning linux this IP address

Quoted 1 line

From the output listed above it looks like you're assigning the

domain the IP address 163.25.117.195.

You can either assign the domain an IP address with the ip= section of the kernel command line, or by setting it in the init scripts. Take a look at /etc/sysconfig/network-scripts/ifcfg-eth0 in your root file system. If you're using the one from the 1.2 democd you'll need to also set the LOCALIP= variable on the kernel command line to tell it what address you want.

Best,
Ian

-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now. Build and deploy apps & Web services for Linux with a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click