Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > HOWTO-Related Questions

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 29th October 2009, 00:12
computer_freak_8 computer_freak_8 is offline
Junior Member
 
Join Date: Sep 2009
Posts: 18
Thanks: 3
Thanked 5 Times in 5 Posts
Default Virtualization Xen Debian Lenny AMD64: "xm create hostname" (error)

Hello,
I'm trying this tutorial, and I got it to work once, so I tried it again, with partial success.

I successfully created the image (or so it said), but when I tried to start it, I get an error. I'm not sure what's different; below is copy/paste from my SSH terminal (but with my username@hostname changed, and the lines I typed the commands on have been put in bold).
Code:
user@server:~$ sudo xm create /etc/xen/debian-lenny.cfg 
Using config file "/etc/xen/debian-lenny.cfg".
Error: Device 51714 (vbd) could not be connected.
File /home/xen/domains/debian-lenny/disk.img is loopback-mounted through /dev/loop0,
which is mounted in the privileged domain,
and so cannot be mounted by a guest.
user@server:~$ sudo xm list
Name                                        ID   Mem VCPUs      State   Time(s)
Domain-0                                     0   842     4     r-----    345.5
user@server:~$ sudo -s
root@server:~# exit
exit
user@server:~$ sudo whoami
root
user@server:~$ sudo xm create /etc/xen/debian-lenny.cfg 
Using config file "/etc/xen/debian-lenny.cfg".
Error: Device 51714 (vbd) could not be connected.
File /home/xen/domains/debian-lenny/disk.img is loopback-mounted through /dev/loop0,
which is mounted in the privileged domain,
and so cannot be mounted by a guest.
user@server:~$ sudo -s
root@server:~# xm create /etc/xen/debian-lenny.cfg
Using config file "/etc/xen/debian-lenny.cfg".
Error: Device 51714 (vbd) could not be connected.
File /home/xen/domains/debian-lenny/disk.img is loopback-mounted through /dev/loop0,
which is mounted in the privileged domain,
and so cannot be mounted by a guest.
root@server:~# exit
exit
user@server:~$ 
Reply With Quote
Sponsored Links
  #2  
Old 29th October 2009, 22:49
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,743 Times in 2,577 Posts
Default

Is it possible that /home/xen/domains/debian-lenny/disk.img is still mounted while you're trying to start the guest? What's the output of
Code:
mount
?
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
The Following User Says Thank You to falko For This Useful Post:
computer_freak_8 (29th October 2009)
  #3  
Old 29th October 2009, 23:28
computer_freak_8 computer_freak_8 is offline
Junior Member
 
Join Date: Sep 2009
Posts: 18
Thanks: 3
Thanked 5 Times in 5 Posts
 
Default

Edit: The short version is that I got it working now. Thanks! For the full explanation, keep reading...

Quote:
Originally Posted by falko View Post
Is it possible that /home/xen/domains/debian-lenny/disk.img is still mounted while you're trying to start the guest?
Bingo! The question now is, how to unmount it? Hmm...
Code:
user@server:~$ sudo mount -l
/dev/sda5 on / type ext3 (rw,errors=remount-ro)
tmpfs on /lib/init/rw type tmpfs (rw,nosuid,mode=0755)
proc on /proc type proc (rw,noexec,nosuid,nodev)
sysfs on /sys type sysfs (rw,noexec,nosuid,nodev)
procbususb on /proc/bus/usb type usbfs (rw)
udev on /dev type tmpfs (rw,mode=0755)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)
devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=620)
nfsd on /proc/fs/nfsd type nfsd (rw)
/home/xen/domains/debian-lenny/disk.img on /tmp/tekA5p8kWS type ext3 (rw,loop=/dev/loop0)
/proc on /tmp/tekA5p8kWS/proc type none (rw,bind)
user@server:~$ sudo umount /home/xen/domains/debian-lenny/disk.img 
umount: /tmp/tekA5p8kWS: device is busy
umount: /tmp/tekA5p8kWS: device is busy
Well, this probably isn't the recommended way, but here's what I tried next:
Code:
user@server:~$ ps -A | grep xen
   31 ?        00:00:00 xenwatch
   32 ?        00:00:00 xenbus
 3208 ?        00:00:00 xenstored
 3215 ?        00:00:00 xenconsoled
user@server:~$ sudo kill 3208
user@server:~$ ps -A | grep xen
   31 ?        00:00:00 xenwatch
   32 ?        00:00:00 xenbus
 3215 ?        00:00:00 xenconsoled
user@server:~$ sudo umount /home/xen/domains/debian-lenny/disk.img 
umount: /tmp/tekA5p8kWS: device is busy
umount: /tmp/tekA5p8kWS: device is busy
user@server:~$ sudo kill 3215
user@server:~$ ps -A | grep xen
   31 ?        00:00:00 xenwatch
   32 ?        00:00:00 xenbus
user@server:~$ sudo umount /home/xen/domains/debian-lenny/disk.img 
umount: /tmp/tekA5p8kWS: device is busy
umount: /tmp/tekA5p8kWS: device is busy
user@server:~$ sudo /etc/init.d/xend force-reload
Restarting XEN control daemon: xend
This made it unresponsive. So, from another terminal:
Code:
me@client:~$ ssh user@192.168.5.9
ssh: connect to host 192.168.5.9 port 22: No route to host
me@client:~$ ssh user@192.168.5.9
ssh: connect to host 192.168.5.9 port 22: No route to host
At this point I rebooted the machine (the server). This made the first SSH terminal say:
Code:
Read from remote host 192.168.5.9: Connection reset by peer
Connection to 192.168.5.9 closed.
After it finished booting, I got it working:
Code:
me@client:~$ ssh user@192.168.5.9
user@192.168.5.9's password: 
Linux server 2.6.26-2-xen-amd64 #1 SMP Thu Aug 20 00:36:34 UTC 2009 x86_64

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Thu Oct 29 17:02:40 2009 from machine.domain
user@server:~$ sudo xm list
[sudo] password for user: 
Name                                        ID   Mem VCPUs      State   Time(s)
Domain-0                                     0  1640     4     r-----      8.0
user@server:~$ sudo xm create /etc/xen/debian-lenny.cfg 
Using config file "/etc/xen/debian-lenny.cfg".
Started domain debian-lenny
user@server:~$ sudo xm list
Name                                        ID   Mem VCPUs      State   Time(s)
Domain-0                                     0   958     4     r-----      9.7
debian-lenny                                 1   786     1     -b----      2.8
user@server:~$ sudo xm console debian-lenny

[ lots of boot output goes here ]

Starting periodic command scheduler: crond.

Debian GNU/Linux 5.0 debian-lenny hvc0

debian-lenny login: root
Password: 
Linux debian-lenny 2.6.26-2-xen-amd64 #1 SMP Thu Aug 20 00:36:34 UTC 2009 x86_64

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
debian-lenny:~# echo -e "\n\n\nThank you, \n"'Falko!!!'"\n\n\n"



Thank you, 
Falko!!!



debian-lenny:~# 

Last edited by computer_freak_8; 29th October 2009 at 23:29. Reason: Add note to top.
Reply With Quote
The Following User Says Thank You to computer_freak_8 For This Useful Post:
falko (30th October 2009)
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
High on Lenny - Lvm Mount Problem Serverman Technical 1 23rd June 2009 16:26
Perfect XEN Setup on Debian Lenny (i386 keeps creating 64bit kernels!) indiehead HOWTO-Related Questions 2 28th March 2009 19:18
Following The Perfect Xen 3.0 Setup For Debian ERROR: INIT no more processes left aljosa HOWTO-Related Questions 11 22nd September 2008 22:57
Fresh Install on Debian cksrealm Installation/Configuration 12 22nd February 2006 16:14
Install stop at uuwish, UUDeview SeaWolf Installation/Configuration 6 4th October 2005 23:53


All times are GMT +2. The time now is 08:50.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.