[libvirt-users] Problem attaching device
by steven765@yahoo.com
I keep getting an error when I try to attach a device in the libvirt api through python
The python code is:
conn=libvirt.open('qemu:///system')
dom = conn.lookupByName("fedoratest")
if dom.info()[0]==1:
dom.attachDevice('net.xml')
And I keep getting: "libvirtError: XML description not well formed or invalid
The xml is a simple network card that works fine in virsh. It is just:
#cat net.xml
<interface type='network'>
<mac address='52:54:00:00:fe:5c'/>
<source network-'default'/>
target dev='vnet1'/>
</interface>
I've tired giving it the full path still no luck.
Thanks in advance,
14 years, 8 months
[libvirt-users] Libvirt using ssh
by Marco Mornati
Hello,
I'm looking that using libvirt Java library with ssh, when connection
is closed the ssh process used as connection to hyperisor is not
closed. Is there a different way than close invoking to kill that
process? If not maybe there is something to fix in java porting.
Let me know
Bye
Marco
14 years, 8 months
[libvirt-users] Migrating domains across nodes
by Sagar Dixit
Hi,
I am exploring the migration APIs and was curious to know if I can use them
with LXC containers for live migration from one node to another.
If not LXC, then can I use them with OpenVZ containers ? If yes, what would
be the general steps involved.
Thanks,
Sagar
14 years, 8 months
[libvirt-users] need help on working with libvirt+virtualbox
by Madhusudhan sunkara
Hi all,
i am trying to create virtual box using libvirt ,
following is xml i tried to use following xml (followed example in libvirt
site . http://libvirt.org/drvvbox.html)
<domain type='vbox'>
<name>vboxtest</name>
<os> <type>hvm</type> <boot dev='hd'/> <boot
dev='cdrom'/> </os>
<memory>393216</memory>
<vcpu>1</vcpu>
<features> <acpi/> </features>
<devices>
<disk type='file' device='cdrom'> <source file=''/> <target
dev='hdc'/> <readonly/> </disk>
<disk type='file' device='disk'> <source
file='/d1/vir_box/ub.vdi'/> <target dev='hdd'/> </disk>
<interface type='bridge'> <source bridge='eth0'/> <mac
address='00:15:C5:ED:63:E6'/> </interface>
<interface type='user'> <mac address='00:15:C5:ED:63:E6'/>
<model type='Am79C973'/> </interface>
<parallel type='dev'> <source path='/dev/pts/1'/>
<target port='0'/> </parallel>
<parallel type='dev'> <source path='/dev/pts/2'/>
<target port='1'/> </parallel>
<serial type="dev"> <source path="/dev/ttyS0"/> <target
port="0"/> </serial>
</devices>
</domain>
now i have few questions/doubts on the xml
(i have working vdi file which is created using GUI and has ubuntu installed
, i just want to start that using another machine )
as soon as i try following code i am getting segfault , i am suspecting some
problem with xml input
import libvirt
conn=libvirt.open('vbox:///session')
xmldesc = <above string>
dom=conn.createLinux(xmldesc,0)
Segmentation fault
in my home directory/Machines xml file is created
<?xml version="1.0"?>
<VirtualBox xmlns="http://www.innotek.de/VirtualBox-settings"
version="1.9-linux">
<Machine uuid="{9e37e287-67e3-ca78-5af0-9c38f14de49e}" name="vboxtest"
OSType="Other" lastStateChange="2010-03-22T10:29:18Z" aborted="true">
<Hardware version="2">
<CPU count="1">
<HardwareVirtEx enabled="true" exclusive="true"/>
<HardwareVirtExNestedPaging enabled="true"/>
<HardwareVirtExVPID enabled="true"/>
<PAE enabled="false"/>
</CPU>
<Memory RAMSize="384"/>
<Boot> <Order position="1" device="Floppy"/> <Order position="2"
device="DVD"/> <Order position="3" device="HardDisk"/> <Order position="4"
device="None"/> </Boot>
<Display VRAMSize="8" monitorCount="1" accelerate3D="false"
accelerate2DVideo="false"/>
<RemoteDisplay enabled="false" port="3389" authType="Null"/>
<BIOS> <ACPI enabled="true"/> <IOAPIC enabled="false"/> <Logo
fadeIn="true" fadeOut="true" displayTime="0"/> <BootMenu
mode="MessageAndMenu"/> <TimeOffset value="0"/>
<PXEDebug enabled="false"/>
</BIOS>
<USBController enabled="false" enabledEhci="false"/>
<Network>
<Adapter slot="0" enabled="false" MACAddress="080027F53A84"
cable="true" speed="0" type="Am79C973"/>
<Adapter slot="1" enabled="false" MACAddress="080027EE31BD"
cable="true" speed="0" type="Am79C973"/>
<Adapter slot="2" enabled="false" MACAddress="080027CE9DA5"
cable="true" speed="0" type="Am79C973"/>
<Adapter slot="3" enabled="false" MACAddress="080027D86B0D"
cable="true" speed="0" type="Am79C973"/>
<Adapter slot="4" enabled="false" MACAddress="080027DAA33F"
cable="true" speed="0" type="Am79C973"/>
<Adapter slot="5" enabled="false" MACAddress="08002734F6E6"
cable="true" speed="0" type="Am79C973"/>
<Adapter slot="6" enabled="false" MACAddress="08002747D785"
cable="true" speed="0" type="Am79C973"/>
<Adapter slot="7" enabled="false" MACAddress="080027C22A98"
cable="true" speed="0" type="Am79C973"/>
</Network>
<UART>
<Port slot="0" enabled="false" IOBase="0x3f8" IRQ="4"
hostMode="Disconnected"/>
<Port slot="1" enabled="false" IOBase="0x3f8" IRQ="4"
hostMode="Disconnected"/>
</UART>
<LPT>
<Port slot="0" enabled="false" IOBase="0x378" IRQ="4"/>
<Port slot="1" enabled="false" IOBase="0x378" IRQ="4"/>
</LPT>
<AudioAdapter controller="AC97" driver="ALSA" enabled="false"/>
<SharedFolders/>
<Clipboard mode="Bidirectional"/>
<Guest memoryBalloonSize="0" statisticsUpdateInterval="0"/>
<GuestProperties/>
</Hardware>
<StorageControllers/>
</Machine>
</VirtualBox>
please help me if i am doing anything wrong , how can i specify storage
controller in xml file and any input on why it is aborting with segfault
sorry for the long post and xml
--
Madhu
14 years, 8 months
[libvirt-users] virsh domxml-to-native xen-xm request
by Mike Viau
Hello,
I was looking at http://libvirt.org/drvxen.html
And realized that "virsh
domxml-to-native" may be used to convert the libvirt xml formatted domU
configuration to native.
The configuration is for stubdom-dm Xen guests.
Syntax appears to be virsh domxml-to-native xen-xm new_vm1.xml > /etc/xen/new_vm1 but I get an error.
error: invalid argument in unsupported config type xen-xm
Can someone please post their output of the command: virsh domxml-to-native xen-xm new_vm1.xml
The working libvirt XML formatted Xen DomU config (new_vm1.xml)
<domain type='xen'>
<name>test</name>
<os>
<type>hvm</type>
<loader>/usr/lib/xen/boot/hvmloader</loader>
<boot dev='hd'/>
</os>
<memory>7340032</memory>
<vcpu>7</vcpu>
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
<on_crash>restart</on_crash>
<features>
<pae/>
<acpi/>
<apic/>
</features>
<clock offset='utc'/>
<devices>
<emulator>/usr/lib/xen/bin/stubdom-dm</emulator>
<interface type='bridge'>
<source bridge='eth0'/>
<mac address='00:50:56:0f:dd:02'/>
</interface>
<disk type='block' device='disk'>
<source dev='/dev/sys/lv0'/>
<target dev='hda'/>
</disk>
<disk type='block' device='disk'>
<source dev='/dev/sys/lv1'/>
<target dev='hdb'/>
</disk>
<disk type='block' device='disk'>
<source dev='/dev/sys/lv2'/>
<target dev='hdc'/>
</disk>
<!-- stub domains don't have access to dom0's ptys, so this is not
possible
<serial type='pty'>
</serial>
-->
<graphics type='vnc' autoport='yes'/>
</devices>
</domain>
-M
_________________________________________________________________
IM on the go with Messenger on your phone
http://go.microsoft.com/?linkid=9712960
14 years, 8 months
[libvirt-users] issues with Migrating a domain
by mawei
Hi everyone
i've been trying to migrate a domain from hostA to hostB.But everytime i did it with
"virsh --live migrate <Domain> xen+ssh://root@Destination",
it failed and told me something like
"Error Domain not found:xenUnifiedDomainLookupByName".
The same thing happened when i tried to do the same thing with libvirt API like virDomainMigrate & virDomainMigrateToURI.
i am confused about this.
So can anybody can tell me why?Thanks a lot.
BTW ,my OS is CentOS 5.4 and my hypervisor is xen3.1.2 which is installed with the OS.And the libvirt version is 0.7.7.
THANKS A LOT AGAIN.
_________________________________________________________________
约会说不清地方?来试试微软地图最新msn互动功能!
http://ditu.live.com/?form=TL&swm=1
14 years, 8 months
[libvirt-users] Pool, iSCSI and guest start
by Nicolas Greneche
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi,
Former user of Xen and newbie in kvm/qemu/libvirt stuff, I give it a try
on my network ;-)
I need to run a VM with iSCSI target attached.
I did it this way :
1) Creation of iscsi pool (equa.xml) :
<pool type="iscsi">
<name>equalog</name>
<source>
<host name="10.10.0.1"/>
<device
path="iqn.2001-05.com.equallogic:0-8a0906-4992c7f05-39c000000114b8fc-vglog"/>
</source>
<target>
<path>/dev/disk/by-path</path>
</target>
</pool>
This pool start smoothly (when open-iscsi started), no problems. An
entry is created in /dev/disk/by-path/ related to iscsi target.
2) I flagged it autostart :
root@sandi:~# virsh pool-autostart equalog
Pool equalog marked as autostarted
root@sandi:~# virsh pool-list
Name State Autostart
- -----------------------------------------
equalog active yes
3) In my guest VM, I have following section :
<disk type='block' device='disk'>
<driver name='qemu'/>
<source
dev='/dev/disk/by-path/ip-10.10.0.1:3260-iscsi-iqn.2001-05.com.equallogic:0-8a0906-4992c7f05-39c000000114b8fc-vglog-lun-0'/>
<target dev='vdc' bus='virtio'/>
<alias name='virtio2'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x06'
function='0x0'/>
</disk>
When I start VM, iscsi target is availaible.
The snag is that when I reboot the host, the pool is not automatically
started (making it impossible to autostart VM relying on this iscsi volume).
I verified that open-iscsi is started first. Startup script is localised
in /etc/rcS.d which is prior to /etc/rc2.d (my default runlevel).
Libvirtd is started in rc2.d and not mentionned in rcS.d.
My questions are :
- - Is this the correct way to attach iscsi volume to a guest ?
- - Did I missed something to have iscsi pool autostart working at boot
time ?
My environement :
Debian Squeeze 64 bits
root@sandi:~# virsh -v
0.7.6
root@sandi:~# /usr/sbin/libvirtd --version
/usr/sbin/libvirtd (libvirt) 0.7.6
Thanks for your attention,
- --
Nicolas Greneche - RSSI et Sysadmin
Centre de Ressources Informatiques (CRI)
Doctorant au sein du projet SDS - www.sds-project.fr
Mail : nicolas.greneche_(at)_univ-orleans.fr
GPG : http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x5FEBD0EF
Universite d'Orleans Web : http://blog.garnett.fr
Batiment 3IA - 2e etage Tel : 02 38 49 25 26
6 rue Leonard de Vinci
BP 6102 45061 ORLEANS Cedex 2
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iEYEARECAAYFAkugsQsACgkQTx/Y+1/r0O90NACeMvgK2mA4EUaB+JzA7v6+xQxO
jNsAmwSIh428gtZRa2jVkekyYBTpVVJK
=ltP0
-----END PGP SIGNATURE-----
14 years, 8 months
[libvirt-users] virsh shutdown does not stop XP-Pro guest
by Don Morrison
I've been trying to get "virsh shutdown" to work against an XP-Pro guest
with no luck so far. It seems to have no effect - I have to run "virsh
destroy" instead which is less than desirable. I have enabled <acpi> in the
domain xml so I think the problem is on the guest side. A couple of
questions:
1) How can I confirm whether the XP guest has ACPI enabled. I actually
think it doesn't because when I look at the "ACPI Multiprocessor PC"
device driver name, it lists "hal.dll". This is NOT ACPI enabled according
to this site: http://technet.microsoft.com/en-us/library/bb457123.aspx. Am
I reading this correctly?
2) I tried to enable ACPI at install time by bringing up virt-viewer and
pressing F5 on the blue install screen as instructed here:
http://www.computing.net/answers/windows-xp/enable-acpi-in-xp-without-rei...
But F5 didn't have any effect. Has anybody else been able to get this to
work?
I'm running KVM 0.12.2-0.4.1 and Libvirt 0.7.6-1.2.3
Thanks.
Don Morrison
14 years, 8 months
[libvirt-users] migrate with libirt 0.7.0
by Daniel Bidwell
Using ubuntu 9.10 and libvir 0.7.0, when I do a migrate a domain from
machine A to B, the migration "completes" but remains in a frozen state
until I do a "suspend/resume" on it on B. Then it runs fully normally.
What do I do to skip the suspend/resume steps?
--
Daniel R. Bidwell | bidwell(a)andrews.edu
Andrews University | Information Technology Services
If two always agree, one of them is unnecessary
"Friends don't let friends do DOS"
"In theory, theory and practice are the same.
In practice, however, they are not."
14 years, 8 months
[libvirt-users] internal error cannot parse QEMU version number
by jeremy avnet
I've seen this error a couple of times over the past month, but it's
starting to happen more regularly now (perhaps since VM usage is
increasing). The last few times I've seen it when trying to start a VM
(virsh start domain):
$ virsh start goat
Connecting to uri: qemu:///system
error: Failed to start domain goat
error: internal error cannot parse QEMU version number in ' PC emulator
version 0.11.0 (qemu-kvm-0.11.0), Copyright (c) 2003-2008 Fabrice Bellard'
Running libvirt version 0.7.0-1ubuntu13.1 under Ubuntu 9.10 amd64.
$ kvm --version
QEMU PC emulator version 0.11.0 (qemu-kvm-0.11.0), Copyright (c) 2003-2008
Fabrice Bellard
I saw this message, but it's for an older version:
http://osdir.com/ml/libvir-list/2009-05/msg00192.html
Any ideas on how to prevent this error?
Thank you.
.:. jeremy
14 years, 8 months