Xen
Problem
[root@bacula ~]# uname -a
Linux bacula 2.6.21.7-3.fc8xen #1 SMP Thu Mar 20 14:57:53 EDT 2008 i686 i686 i386 GNU/Linux
kernel-xen.i686 2.6.21.7-3.fc8 installed
kernel-xen-devel.i686 2.6.21.7-3.fc8 installed
xen.i386 3.1.2-2.fc8 installed
xen-devel.i386 3.1.2-2.fc8 installed
xen-libs.i386 3.1.2-2.fc8 installed
libvirt.i386 0.4.4-1.fc8 installed
libvirt-python.i386 0.4.4-1.fc8 installed
python-virtinst.noarch 0.300.2-4.fc8 installed
virt-manager.i386 0.5.3-2.fc8 installed
[root@bacula ~]# virt-install -f /var/xen/xen1 -r 512
libvir: Remote error : Connection refused
libvir: warning : Failed to find the network: Is the daemon running ?
libvir: Remote error : Connection refused
What is the name of your virtual machine? xen1
libvir: Xen Daemon error : GET operation failed: xend_get: error from xen daemon:
Would you like to enable graphics support? (yes or no) no
What is the install location? ftp://ftp.linux.ee/pub/fedora/linux/releases/8/Fedora/i386/os/
Starting install…
libvir: Xen Daemon error : GET operation failed: xend_get: error from xen daemon:
Retrieving file .treeinfo 100% |=========================| 430 B 00:00
Retrieving file vmlinuz.. 100% |=========================| 2.1 MB 00:04
Retrieving file initrd.im 100% |=========================| 6.4 MB 00:17
libvir: Xen Daemon error : GET operation failed: xend_get: error from xen daemon:
libvir: Xen Daemon error : GET operation failed: xend_get: error from xen daemon:
virDomainLookupByID() failed GET operation failed: xend_get: error from xen daemon:
Domain installation may not have been successful.
If it was, you can restart your domain by running ‘virsh start xen1′; otherwise, please restart your installation.
Fri, 11 Jul 2008 10:30:21 ERROR virDomainLookupByID() failed GET operation failed: xend_get: error from xen daemon
Traceback (most recent call last)
File “/usr/sbin/virt-install”, line 502, in <module>
main()
File “/usr/sbin/virt-install”, line 462, in main
dom = guest.start_install(conscb,progresscb)
File “/usr/lib/python2.5/site-packages/virtinst/Guest.py”, line 813, in start_install
return self._do_install(consolecb, meter)
File “/usr/lib/python2.5/site-packages/virtinst/Guest.py”, line 829, in _do_install
self._create_devices(meter)
File “/usr/lib/python2.5/site-packages/virtinst/Guest.py”, line 727, in _create_devices
nic.setup(self.conn)
File “/usr/lib/python2.5/site-packages/virtinst/Guest.py”, line 281, in setup
vm = conn.lookupByID(id)
File “/usr/lib/python2.5/site-packages/libvirt.py”, line 920, in lookupByID
if ret is None:raise libvirtError(‘virDomainLookupByID() failed’, conn=self)
libvirtError: virDomainLookupByID() failed GET operation failed: xend_get: error from xen daemon
[root@bacula ~]# xm list
Name ID Mem VCPUs State Time(s)
Domain-0 0 489 1 r—– 738.2
Solution
This isn’t correct solution put it helped
[root@bacula ~]# /etc/init.d/libvirtd stop
Stopping libvirtd daemon: [ OK ]
[root@bacula ~]# ifconfig
eth0 Link encap:Ethernet HWaddr 00:03:47:CC:8D:65
inet addr:192.168.0.25 Bcast:192.168.0.255 Mask:255.255.255.0
inet6 addr: fe80::203:47ff:fecc:8d65/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:591162 errors:0 dropped:0 overruns:0 frame:0
TX packets:223436 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:817710986 (779.8 MiB) TX bytes:18837707 (17.9 MiB)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:41037 errors:0 dropped:0 overruns:0 frame:0
TX packets:41037 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:311768355 (297.3 MiB) TX bytes:311768355 (297.3 MiB)
peth0 Link encap:Ethernet HWaddr 00:03:47:CC:8D:65
inet6 addr: fe80::203:47ff:fecc:8d65/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:704107 errors:0 dropped:0 overruns:3 frame:3
TX packets:292359 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:940469809 (896.9 MiB) TX bytes:23683864 (22.5 MiB)
virbr0 Link encap:Ethernet HWaddr 00:00:00:00:00:00
inet6 addr: fe80::200:ff:fe00:0/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:6 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 b) TX bytes:468 (468.0 b)
virbr0 interface can’t be up anymore.
let’s force it down:
[root@bacula ~]# ifconfig virbr0 down
[root@bacula ~]# ifconfig
eth0 Link encap:Ethernet HWaddr 00:03:47:CC:8D:65
inet addr:192.168.0.25 Bcast:192.168.0.255 Mask:255.255.255.0
inet6 addr: fe80::203:47ff:fecc:8d65/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:591280 errors:0 dropped:0 overruns:0 frame:0
TX packets:223515 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:817719441 (779.8 MiB) TX bytes:18848257 (17.9 MiB)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:41037 errors:0 dropped:0 overruns:0 frame:0
TX packets:41037 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:311768355 (297.3 MiB) TX bytes:311768355 (297.3 MiB)
peth0 Link encap:Ethernet HWaddr 00:03:47:CC:8D:65
inet6 addr: fe80::203:47ff:fecc:8d65/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:704246 errors:0 dropped:0 overruns:3 frame:3
TX packets:292438 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:940481285 (896.9 MiB) TX bytes:23694414 (22.5 MiB)
now I thought it is good idea to take peth0 down too:
[root@bacula ~]# ifconfig peth0 down
Read from remote host bacula: Connection reset by peer
Connection to bacula closed.
Ok, I asked to restart machine After restart
[root@bacula ~]# ifconfig
eth0 Link encap:Ethernet HWaddr 00:03:47:CC:8D:65
inet addr:192.168.0.25 Bcast:192.168.0.255 Mask:255.255.255.0
inet6 addr: fe80::203:47ff:fecc:8d65/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:63 errors:0 dropped:0 overruns:0 frame:0
TX packets:74 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:8591 (8.3 KiB) TX bytes:9292 (9.0 KiB)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:12 errors:0 dropped:0 overruns:0 frame:0
TX packets:12 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:760 (760.0 b) TX bytes:760 (760.0 b)
[root@bacula ~]# uname -a
Linux bacula 2.6.21.7-3.fc8xen #1 SMP Thu Mar 20 14:57:53 EDT 2008 i686 i686 i386 GNU/Linux
[root@bacula ~]# /etc/init.d/xend status
xenstored (pid 2008) is running…
blktapctrl (pid 2010) is running…
xenconsoled (pid 2013) is running…
xend (pid 2019) is running…
[root@bacula ~]# virt-install -f /var/xen/xen1 -n xen1 -r 512 -s 4 -l ftp://ftp.linux.ee/pub/fedora/linux/releases/8/Fedora/i386/os/ -d
Would you like to enable graphics support? (yes or no) no
Starting install… good
Problem 2
Unable to determine geometry of file/device |
| /dev/xvda. You should not use Parted unless |
| you REALLY know what you’re doing!
Invalid argument during read on /dev/xvda
Solution 2
I have created /var/xen/xen1 empty file before installing guest system. Don’t pre-create file to guest! virt-install will ask from you file and size and will create it.

