[libvirt-users] (no subject)
by David M. Barlieb
HI, I've just begun using libvirt as part of my KVM installation and
have been having some confusion regarding networking of my virtual
guests. I'm not sure if I should even be sending this to this mailing
list and if not please let me know and if possible where I should be
sending this inquiry.
I understand I can setup a dedicated bridged interface for my guest. But
as for the virbr interface which is the default, I'm a little confused
about. When using this, does the guest os use the same ip as the host?
If so, then how to packets get to the guest instead of the host. I would
guess there's an alternate mac address for the guest interface and this
is how it gets there but am not certain. Sorry if this seems like a
simple question but I'm not very well versed in networking.
daveb
13 years, 11 months
[libvirt-users] java binding and virtualbox-ose
by Andrea Turli
I'm trying to connect to vbox hypervisor on an Ubuntu 10.04 machine
through libvirt java binding (libvirt-java-0.4.6) by simply invoking:
Connect conn = new Connect("vbox:///session", false);
but I got this exception:
libvir: warning : Failed to find the interface: Is the daemon running ?
libvir: Remote error : unable to connect to
'/var/run/libvirt/libvirt-sock': Connection refused
libvir: warning : Failed to find a node driver: Is the libvirtd daemon running ?
libvir: Remote error : unable to connect to
'/var/run/libvirt/libvirt-sock': Connection refused
libvir: warning : Failed to find a secret storage driver: Is the
daemon running ?
org.libvirt.LibvirtException: Failed to find a secret storage driver:
Is the daemon running ?
at org.libvirt.ErrorHandler.processError(ErrorHandler.java:28)
at org.libvirt.Connect.<init>(Connect.java:195)
at VBOX.main(VBOX.java:32)
Otherwise, from virsh, I can correctly connect to the vbox hypervisor:
$ export LIBVIRT_DEBUG=1
$virsh -c vbox:///session list --all
11:37:18.318: debug : virInitialize:336 : register drivers
11:37:18.318: debug : virRegisterDriver:837 : registering Test as driver 0
11:37:18.318: debug : virRegisterNetworkDriver:675 : registering Test
as network driver 0
11:37:18.318: debug : virRegisterInterfaceDriver:706 : registering
Test as interface driver 0
11:37:18.318: debug : virRegisterStorageDriver:737 : registering Test
as storage driver 0
11:37:18.318: debug : virRegisterDeviceMonitor:768 : registering Test
as device driver 0
11:37:18.318: debug : virRegisterSecretDriver:799 : registering Test
as secret driver 0
11:37:18.318: debug : virRegisterDriver:837 : registering Xen as driver 1
11:37:18.318: debug : virRegisterDriver:837 : registering OPENVZ as driver 2
11:37:18.336: debug : vboxRegister:83 : VBoxCGlueInit found API
version: 3.1.6 (3001006)
11:37:18.336: debug : vboxRegister:100 : VirtualBox API version: 3.1
11:37:18.336: debug : virRegisterDriver:837 : registering VBOX as driver 3
11:37:18.336: debug : virRegisterNetworkDriver:675 : registering VBOX
as network driver 1
11:37:18.336: debug : virRegisterStorageDriver:737 : registering VBOX
as storage driver 1
11:37:18.336: debug : virRegisterDriver:837 : registering remote as driver 4
11:37:18.336: debug : virRegisterNetworkDriver:675 : registering
remote as network driver 2
11:37:18.336: debug : virRegisterInterfaceDriver:706 : registering
remote as interface driver 1
11:37:18.336: debug : virRegisterStorageDriver:737 : registering
remote as storage driver 2
11:37:18.336: debug : virRegisterDeviceMonitor:768 : registering
remote as device driver 1
11:37:18.336: debug : virRegisterSecretDriver:799 : registering remote
as secret driver 1
11:37:18.336: debug : virConnectOpenAuth:1337 : name=vbox:///session,
auth=0x231638, flags=0
11:37:18.336: debug : do_open:1106 : name "vbox:///session" to URI components:
scheme vbox
opaque (null)
authority (null)
server (null)
user (null)
port 0
path /session
11:37:18.336: debug : do_open:1116 : trying driver 0 (Test) ...
11:37:18.336: debug : do_open:1122 : driver 0 Test returned DECLINED
11:37:18.336: debug : do_open:1116 : trying driver 1 (Xen) ...
11:37:18.336: debug : do_open:1122 : driver 1 Xen returned DECLINED
11:37:18.336: debug : do_open:1116 : trying driver 2 (OPENVZ) ...
11:37:18.336: debug : do_open:1122 : driver 2 OPENVZ returned DECLINED
11:37:18.336: debug : do_open:1116 : trying driver 3 (VBOX) ...
11:37:18.589: debug : vboxOpen:836 : in vboxOpen
11:37:18.589: debug : do_open:1122 : driver 3 VBOX returned SUCCESS
11:37:18.589: debug : do_open:1142 : network driver 0 Test returned DECLINED
11:37:18.589: debug : vboxNetworkOpen:5439 : network initialized
11:37:18.589: debug : do_open:1142 : network driver 1 VBOX returned SUCCESS
11:37:18.589: debug : do_open:1161 : interface driver 0 Test returned DECLINED
11:37:18.589: debug : doRemoteOpen:564 : proceeding with name = vbox:///session
11:37:18.590: debug : remoteIO:8455 : Do proc=66 serial=0 length=28 wait=(nil)
11:37:18.590: debug : remoteIO:8517 : We have the buck 66 0xb7516008 0xb7516008
11:37:18.595: debug : remoteIODecodeMessageLength:7939 : Got length,
now need 64 total (60 more)
11:37:18.595: debug : remoteIOEventLoop:8381 : Giving up the buck 66
0xb7516008 (nil)
11:37:18.595: debug : remoteIO:8548 : All done with our call 66 (nil) 0xb7516008
11:37:18.596: debug : remoteIO:8455 : Do proc=1 serial=1 length=56 wait=(nil)
11:37:18.596: debug : remoteIO:8517 : We have the buck 1 0x95eb908 0x95eb908
11:37:18.659: debug : remoteIOEventLoop:8402 : Giving up the buck due
to I/O error 1 0x95eb908 (nil)
11:37:18.660: debug : do_open:1161 : interface driver 1 remote returned ERROR
11:37:18.660: debug : do_open:1181 : storage driver 0 Test returned DECLINED
11:37:18.660: debug : vboxStorageOpen:6191 : vbox storage initialized
11:37:18.660: debug : do_open:1181 : storage driver 1 VBOX returned SUCCESS
11:37:18.660: debug : do_open:1201 : node driver 0 Test returned DECLINED
11:37:18.660: debug : doRemoteOpen:564 : proceeding with name = vbox:///session
11:37:18.661: debug : do_open:1201 : node driver 1 remote returned ERROR
11:37:18.661: debug : do_open:1228 : secret driver 0 Test returned DECLINED
11:37:18.661: debug : doRemoteOpen:564 : proceeding with name = vbox:///session
11:37:18.661: debug : do_open:1228 : secret driver 1 remote returned ERROR
11:37:18.661: debug : virConnectNumOfDomains:1714 : conn=0x95a1910
11:37:18.663: debug : virConnectNumOfDefinedDomains:4554 : conn=0x95a1910
11:37:18.664: debug : virConnectListDefinedDomains:4593 :
conn=0x95a1910, names=0x95e9b58, maxnames=1
Id Name State
----------------------------------
11:37:18.666: debug : virDomainLookupByName:1974 : conn=0x95a1910, name=tty
11:37:18.669: debug : virGetDomain:345 : New hash entry 0x95dad48
11:37:18.669: debug : virDomainGetInfo:2825 : domain=0x95dad48, info=0xbfeca708
- tty shut off
11:37:18.673: debug : virDomainFree:2062 : domain=0x95dad48
11:37:18.673: debug : virUnrefDomain:422 : unref domain 0x95dad48 tty 1
11:37:18.673: debug : virReleaseDomain:376 : release domain 0x95dad48 tty
11:37:18.673: debug : virReleaseDomain:392 : unref connection 0x95a1910 2
11:37:18.673: debug : virConnectClose:1355 : conn=0x95a1910
11:37:18.673: debug : virUnrefConnect:259 : unref connection 0x95a1910 1
11:37:18.673: debug : vboxNetworkClose:5448 : network uninitialized
11:37:18.673: debug : vboxStorageClose:6200 : vbox storage uninitialized
11:37:18.673: debug : vboxClose:843 : VBOX: in vboxClose
11:37:18.681: debug : virReleaseConnect:216 : release connection 0x95a1910
even if with some warnings/errors.
Do you have any hint? Thank you
--
Andrea Turli
Ricercatore
Direzione Ricerca e Innovazione
andrea.turli(a)eng.it
Engineering Ingegneria Informatica spa
Via Riccardo Morandi, 32 00148 Roma (RM)
Tel. +39 06 8307 4710
Fax +39 06 8307 4200
www.eng.it
13 years, 11 months
[libvirt-users] ESX(i) implemented functions
by Sherif Nagy
Dear All,
I would like to know what functions and classes are implemented in the
ESX(i) driver ? i am trying to use virsh to retrieve some simple information
such as vcpuinfo domain, but it is not working, so I would like to know what
functions are implemented in libvirt ESX(i) driver. Also i checked the
http://libvirt.org/drvesx.html and nothing is mentioned there.
Thank You,
Regards,
Sherif
13 years, 11 months
[libvirt-users] libvirtio version compatibility...
by Erik Brakkee
Hi,
I intend to run a server with about 4 VMs with KVM and would like to use
virtio for performance. However, one thing that is holding me back is
compatibility. In the past I have seen with Xen that the paravirtualized
drivers of one version in the host (dom0) would not always be compatible
with a version in the client.
If I would run into compatibility problems than I would like to continue
to use full virtualization despite the performance impact. Therefore my
question. In case I am running a setup with a host and a number of
domains, is it guaranteed that I can do the following:
* upgrade the host independent of the guests
* upgrade a guest independent of the host
Cheers
Erik
--
Nonsense and other useful things: http://brakkee.org
MountainHoppers: http://mountainhoppers.nl
Track Detective: http://trackdetective.com
Twitter: http://twitter.com/ErikBrakkee
13 years, 11 months
[libvirt-users] java binding and virtualbox-ose
by Andrea Turli
I'm trying to connect to vbox hypervisor on an Ubuntu 10.04 machine
through libvirt java binding (libvirt-java-0.4.6) by simply invoking:
Connect conn = new Connect("vbox:///session", false);
but I got this exception:
libvir: warning : Failed to find the interface: Is the daemon running ?
libvir: Remote error : unable to connect to
'/var/run/libvirt/libvirt-sock': Connection refused
libvir: warning : Failed to find a node driver: Is the libvirtd daemon running ?
libvir: Remote error : unable to connect to
'/var/run/libvirt/libvirt-sock': Connection refused
libvir: warning : Failed to find a secret storage driver: Is the
daemon running ?
org.libvirt.LibvirtException: Failed to find a secret storage driver:
Is the daemon running ?
at org.libvirt.ErrorHandler.processError(ErrorHandler.java:28)
at org.libvirt.Connect.<init>(Connect.java:195)
at VBOX.main(VBOX.java:32)
Otherwise, from virsh, I can correctly connect to the vbox hypervisor:
$ export LIBVIRT_DEBUG=1
$virsh -c vbox:///session list --all
11:37:18.318: debug : virInitialize:336 : register drivers
11:37:18.318: debug : virRegisterDriver:837 : registering Test as driver 0
11:37:18.318: debug : virRegisterNetworkDriver:675 : registering Test
as network driver 0
11:37:18.318: debug : virRegisterInterfaceDriver:706 : registering
Test as interface driver 0
11:37:18.318: debug : virRegisterStorageDriver:737 : registering Test
as storage driver 0
11:37:18.318: debug : virRegisterDeviceMonitor:768 : registering Test
as device driver 0
11:37:18.318: debug : virRegisterSecretDriver:799 : registering Test
as secret driver 0
11:37:18.318: debug : virRegisterDriver:837 : registering Xen as driver 1
11:37:18.318: debug : virRegisterDriver:837 : registering OPENVZ as driver 2
11:37:18.336: debug : vboxRegister:83 : VBoxCGlueInit found API
version: 3.1.6 (3001006)
11:37:18.336: debug : vboxRegister:100 : VirtualBox API version: 3.1
11:37:18.336: debug : virRegisterDriver:837 : registering VBOX as driver 3
11:37:18.336: debug : virRegisterNetworkDriver:675 : registering VBOX
as network driver 1
11:37:18.336: debug : virRegisterStorageDriver:737 : registering VBOX
as storage driver 1
11:37:18.336: debug : virRegisterDriver:837 : registering remote as driver 4
11:37:18.336: debug : virRegisterNetworkDriver:675 : registering
remote as network driver 2
11:37:18.336: debug : virRegisterInterfaceDriver:706 : registering
remote as interface driver 1
11:37:18.336: debug : virRegisterStorageDriver:737 : registering
remote as storage driver 2
11:37:18.336: debug : virRegisterDeviceMonitor:768 : registering
remote as device driver 1
11:37:18.336: debug : virRegisterSecretDriver:799 : registering remote
as secret driver 1
11:37:18.336: debug : virConnectOpenAuth:1337 : name=vbox:///session,
auth=0x231638, flags=0
11:37:18.336: debug : do_open:1106 : name "vbox:///session" to URI components:
scheme vbox
opaque (null)
authority (null)
server (null)
user (null)
port 0
path /session
11:37:18.336: debug : do_open:1116 : trying driver 0 (Test) ...
11:37:18.336: debug : do_open:1122 : driver 0 Test returned DECLINED
11:37:18.336: debug : do_open:1116 : trying driver 1 (Xen) ...
11:37:18.336: debug : do_open:1122 : driver 1 Xen returned DECLINED
11:37:18.336: debug : do_open:1116 : trying driver 2 (OPENVZ) ...
11:37:18.336: debug : do_open:1122 : driver 2 OPENVZ returned DECLINED
11:37:18.336: debug : do_open:1116 : trying driver 3 (VBOX) ...
11:37:18.589: debug : vboxOpen:836 : in vboxOpen
11:37:18.589: debug : do_open:1122 : driver 3 VBOX returned SUCCESS
11:37:18.589: debug : do_open:1142 : network driver 0 Test returned DECLINED
11:37:18.589: debug : vboxNetworkOpen:5439 : network initialized
11:37:18.589: debug : do_open:1142 : network driver 1 VBOX returned SUCCESS
11:37:18.589: debug : do_open:1161 : interface driver 0 Test returned DECLINED
11:37:18.589: debug : doRemoteOpen:564 : proceeding with name = vbox:///session
11:37:18.590: debug : remoteIO:8455 : Do proc=66 serial=0 length=28 wait=(nil)
11:37:18.590: debug : remoteIO:8517 : We have the buck 66 0xb7516008 0xb7516008
11:37:18.595: debug : remoteIODecodeMessageLength:7939 : Got length,
now need 64 total (60 more)
11:37:18.595: debug : remoteIOEventLoop:8381 : Giving up the buck 66
0xb7516008 (nil)
11:37:18.595: debug : remoteIO:8548 : All done with our call 66 (nil) 0xb7516008
11:37:18.596: debug : remoteIO:8455 : Do proc=1 serial=1 length=56 wait=(nil)
11:37:18.596: debug : remoteIO:8517 : We have the buck 1 0x95eb908 0x95eb908
11:37:18.659: debug : remoteIOEventLoop:8402 : Giving up the buck due
to I/O error 1 0x95eb908 (nil)
11:37:18.660: debug : do_open:1161 : interface driver 1 remote returned ERROR
11:37:18.660: debug : do_open:1181 : storage driver 0 Test returned DECLINED
11:37:18.660: debug : vboxStorageOpen:6191 : vbox storage initialized
11:37:18.660: debug : do_open:1181 : storage driver 1 VBOX returned SUCCESS
11:37:18.660: debug : do_open:1201 : node driver 0 Test returned DECLINED
11:37:18.660: debug : doRemoteOpen:564 : proceeding with name = vbox:///session
11:37:18.661: debug : do_open:1201 : node driver 1 remote returned ERROR
11:37:18.661: debug : do_open:1228 : secret driver 0 Test returned DECLINED
11:37:18.661: debug : doRemoteOpen:564 : proceeding with name = vbox:///session
11:37:18.661: debug : do_open:1228 : secret driver 1 remote returned ERROR
11:37:18.661: debug : virConnectNumOfDomains:1714 : conn=0x95a1910
11:37:18.663: debug : virConnectNumOfDefinedDomains:4554 : conn=0x95a1910
11:37:18.664: debug : virConnectListDefinedDomains:4593 :
conn=0x95a1910, names=0x95e9b58, maxnames=1
Id Name State
----------------------------------
11:37:18.666: debug : virDomainLookupByName:1974 : conn=0x95a1910, name=tty
11:37:18.669: debug : virGetDomain:345 : New hash entry 0x95dad48
11:37:18.669: debug : virDomainGetInfo:2825 : domain=0x95dad48, info=0xbfeca708
- tty shut off
11:37:18.673: debug : virDomainFree:2062 : domain=0x95dad48
11:37:18.673: debug : virUnrefDomain:422 : unref domain 0x95dad48 tty 1
11:37:18.673: debug : virReleaseDomain:376 : release domain 0x95dad48 tty
11:37:18.673: debug : virReleaseDomain:392 : unref connection 0x95a1910 2
11:37:18.673: debug : virConnectClose:1355 : conn=0x95a1910
11:37:18.673: debug : virUnrefConnect:259 : unref connection 0x95a1910 1
11:37:18.673: debug : vboxNetworkClose:5448 : network uninitialized
11:37:18.673: debug : vboxStorageClose:6200 : vbox storage uninitialized
11:37:18.673: debug : vboxClose:843 : VBOX: in vboxClose
11:37:18.681: debug : virReleaseConnect:216 : release connection 0x95a1910
even if with some warnings/errors.
Do you have any hint? Thank you
--
Andrea Turli
Ricercatore
Direzione Ricerca e Innovazione
andrea.turli(a)eng.it
Engineering Ingegneria Informatica spa
Via Riccardo Morandi, 32 00148 Roma (RM)
Tel. +39 06 8307 4710
Fax +39 06 8307 4200
www.eng.it
13 years, 11 months
[libvirt-users] Updating Multiple VM Guests?
by Kenneth Stailey
Hi,
The libvirt.org FAQ says that "virsh edit" is the recommended way of updating the libvirt xml.
If a change has to be made to many VMs "virsh edit" is tedious, time-consuming and likely to be prone to careless errors.
Is there a command line approach to updating multiple VMs?
Thanks,
Ken
13 years, 11 months
[libvirt-users] Problem booting Microsoft Windows KVM virtual machine
by RaSca
Hi all,
I'm having problems with a vm's startup, I cloned the entire disk of a
Windows 2000 with dd on a drbd device, that disk was configured with two
partitions. I'm able to see all the partitions contents by using kpartx
and mount them:
# kpartx -l /dev/drbd0
drbd0p1 : 0 202751488 /dev/drbd0 32
drbd0p2 : 0 285567360 /dev/drbd0 202751520
The problem is that when i try to startup the vm with virsh it hangs on
boot by saying "error on operating system load".
Here are the details and the vm conf:
# cat /etc/libvirt/qemu/vm-sophos.xml
<domain type='kvm'>
<name>vm-sophos</name>
<uuid>213a464c-73ad-8122-3647-7ff6b78d9e07</uuid>
<memory>262144</memory>
<currentMemory>262144</currentMemory>
<vcpu>1</vcpu>
<os>
<type arch='i686' machine='pc-0.12'>hvm</type>
<boot dev='cdrom'/>
<boot dev='hd'/>
</os>
<features>
<acpi/>
<apic/>
<pae/>
</features>
<clock offset='utc'/>
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
<on_crash>restart</on_crash>
<devices>
<emulator>/usr/bin/kvm</emulator>
<disk type='file' device='disk'>
<driver name='qemu' type='raw'/>
<source file='/dev/drbd0'/>
<target dev='hda' bus='ide'/>
<address type='drive' controller='0' bus='0' unit='0'/>
</disk>
<disk type='file' device='cdrom'>
<driver name='qemu' type='raw'/>
<target dev='hdc' bus='ide'/>
<readonly/>
<address type='drive' controller='0' bus='1' unit='0'/>
</disk>
<controller type='ide' index='0'>
<address type='pci' domain='0x0000' bus='0x00' slot='0x01'
function='0x1'/>
</controller>
<interface type='bridge'>
<mac address='52:54:00:15:0d:68'/>
<source bridge='br0'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x03'
function='0x0'/>
</interface>
<serial type='pty'>
<target port='0'/>
</serial>
<console type='pty'>
<target type='serial' port='0'/>
</console>
<input type='mouse' bus='ps2'/>
<graphics type='vnc' port='-1' autoport='yes' keymap='en-us'/>
<video>
<model type='cirrus' vram='9216' heads='1'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x02'
function='0x0'/>
</video>
<memballoon model='virtio'>
<address type='pci' domain='0x0000' bus='0x00' slot='0x04'
function='0x0'/>
</memballoon>
</devices>
</domain>
Note that I've tried to change "source file" parameter with /dev/dm-0p1,
/dev/drbd0p1, but virsh don't let me boot the machine saying it is
unable to find the disk.
The kvm command launched by virsh is this one:
/usr/bin/kvm -S -M pc-0.12 -cpu qemu32 -enable-kvm -m 256 -smp
1,sockets=1,cores=1,threads=1 -name vm-sophos -uuid
213a464c-73ad-8122-3647-7ff6b78d9e07 -nodefaults -chardev
socket,id=monitor,path=/var/lib/libvirt/qemu/vm-sophos.monitor,server,nowait
-mon chardev=monitor,mode=readline -rtc base=utc -boot dc -drive
file=/dev/drbd0,if=none,id=drive-ide0-0-0,boot=on,format=raw -device
ide-drive,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0 -drive
if=none,media=cdrom,id=drive-ide0-1-0,readonly=on,format=raw -device
ide-drive,bus=ide.1,unit=0,drive=drive-ide0-1-0,id=ide0-1-0 -device
rtl8139,vlan=0,id=net0,mac=52:54:00:15:0d:68,bus=pci.0,addr=0x3 -net
tap,fd=44,vlan=0,name=hostnet0 -chardev pty,id=serial0 -device
isa-serial,chardev=serial0 -usb -vnc 0.0.0.0:0 -k en-us -vga cirrus
-device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x4
I'd also followed the steps described here:
http://www.brandonturner.net/blog/2010/01/convert-windows-to-xen-guest/
to use fixmbr and the operation succeed, but the error on the vm is
still the same.
What should else i check?
--
Raoul Scarazzini
Mia Mamma Usa Linux: Niente è impossibile da capire, se lo spieghi bene!
mobile: +393281776712
rasca(a)miamammausalinux.org
http://www.miamammausalinux.org
13 years, 12 months
[libvirt-users] controlling VM access to different tap devices
by Ryan Haggerty
Sorry if this off-topic but I have a qemu related question I was going
to send to the qemu users mailing list but that list appears to have
vanished. I thought this community might have some insight.
I am interested in controlling VM access to different tap devices so I
want to have different qemu processes bound to different tun devices.
I've created new tun devices (eg. /dev/net/tun_low) followed by the use
of tunctl to create new tap devices based off of the new device nodes
(ie tunctl -t tap0 -f /dev/net/tun_low). This also did not seem to work
as the VM's seemed to still be accessing /dev/net/tun (running strace on
qemu-spice I found it was still doing an open on /dev/net/tun) and not
my new device /dev/net/tun_low. Any suggestions on forcing qemu to use
alternative tun devices?
14 years
[libvirt-users] controlling VM access to different tap devices
by Ryan Haggerty
Sorry if this off-topic but I have a qemu related question I was going
to send to the qemu users mailing list but that list appears to have
vanished. I thought this community might have some insight.
I am interested in controlling VM access to different tap devices so I
want to have different qemu processes bound to different tun devices.
I've created new tun devices (eg. /dev/net/tun_low) followed by the use
of tunctl to create new tap devices based off of the new device nodes
(ie tunctl -t tap0 -f /dev/net/tun_low). This also did not seem to work
as the VM's seemed to still be accessing /dev/net/tun (running strace on
qemu-spice I found it was still doing an open on /dev/net/tun) and not
my new device /dev/net/tun_low. Any suggestions on forcing qemu to use
alternative tun devices?
14 years