[libvirt-users] [libvirt] [LXC] Tyring to locate livbvirt operations for LXC relocation
by Avi Weit
Hello,
I am searching for the libvirt operations for relocating LXC (system or
application) containers. LXC relocation mechanism is done by checkpoint /
restart. I went over libvirt API documentation and found the following
methods:
virDomainSave that receives a domain and path to state file. The method
saves domain's memory contents into a disk file.
virDomainRestore that receives a domain and path to state file. The method
restores the domain from the state file created by save operation.
Are these the proper methods to use for LXC relocation? I assume I can also
use the corresponding operations via virsh (save / restore)..
>From looking into lxcDriver object (defined under /src/lxc/xlc_driver.c in
libvirt server source) I can see that NULLs are set in save and restore
methods. Does that mean that there is no support for saving and restoring
Linux containers? Is there a libvirt patch beyond the kernel patch that
needs to be applied?
I am using libvirt 0.7.5 and kernel 2.6.31
/* Function Tables */
static virDriver lxcDriver = {
VIR_DRV_LXC, /* the number virDrvNo */
"LXC", /* the name of the driver */
lxcOpen, /* open */
lxcClose, /* close */
NULL, /* supports_feature */
NULL, /* type */
lxcVersion, /* version */
NULL, /* libvirtVersion (impl. in libvirt.c) */
virGetHostname, /* getHostname */
NULL, /* getMaxVcpus */
nodeGetInfo, /* nodeGetInfo */
lxcGetCapabilities, /* getCapabilities */
lxcListDomains, /* listDomains */
lxcNumDomains, /* numOfDomains */
lxcDomainCreateAndStart, /* domainCreateXML */
lxcDomainLookupByID, /* domainLookupByID */
lxcDomainLookupByUUID, /* domainLookupByUUID */
lxcDomainLookupByName, /* domainLookupByName */
lxcDomainSuspend, /* domainSuspend */
lxcDomainResume, /* domainResume */
lxcDomainShutdown, /* domainShutdown */
NULL, /* domainSave */
NULL, /* domainRestore */
NULL, /* domainMigratePrepare */
NULL, /* domainMigratePerform */
NULL, /* domainMigrateFinish */
...
...
Thanks,
- Avi
14 years, 7 months
[libvirt-users] location of network xml files
by carlos campderrós
Hello,
On Ubuntu 9.04 (libvirt 0.6.1-0ubuntu5.1) I have 2 different network files:
root@sauron:~# ls -l `locate default.xml`
lrwxrwxrwx 1 root root 14 2010-02-13 12:34
/etc/libvirt/qemu/networks/autostart/default.xml -> ../default.xml
-rw-r--r-- 1 root root 373 2010-03-01 00:02
/etc/libvirt/qemu/networks/default.xml
-rw------- 1 root root 319 2010-03-01 00:04
/var/lib/libvirt/network/default.xml
Modifications I do on the /etc file are ignored (I'd like to modify the dhcp
range and set fixed ips to VM mac addresses). I don't understand why this
file is there, as it seems ignored by everything, and why the autostart
symlink points to it instead of the /var/lib/libvirt one.
Is it reasonable to symlink (or hardlink if possible) one file to the other?
Or to remove the /etc file and point the autostart to the /var file? Also,
does the autostart do something? because it's pointing to the ignored file.
thanks,
carlos.
--
Si no puedes deslumbrar con tu sabiduría,
desconcierta con tus gilipolleces
14 years, 8 months
[libvirt-users] Migration error
by zorgman
Hi,
I'm trying to migrate a VM from one libvirt 0.7.6-1 (qemu-kvm
0.11.1+dfsg-1) to another libvirt 0.7.6-2 (qemu-kvm 0.11.1+dfsg-1)
connected with SSH , i have followed pre requite (same shared, same
path, same network conf ...) . But when i migrate , i have following
error : operation failed:
/migration to 'tcp:x.x.x.x:49157' failed: migration failed
DETAIL :
Unable to migrate guest:
Traceback (most recent call last):
File "/usr/share/virt-manager/virtManager/migrate.py", line 457, in
_async_migrate
vm.migrate(dstconn, migrate_uri, rate, live, secure)
File "/usr/share/virt-manager/virtManager/domain.py", line 1272, in
migrate
self._backend.migrate(destconn.vmm, flags, newname, interface, rate)
File "/usr/lib/python2.5/site-packages/libvirt.py", line 429, in migrate
if ret is None:raise libvirtError('virDomainMigrate() failed', dom=self)
libvirtError: operation failed: migration to
'tcp:portable.artis.int:49157' failed: migration failed
/on the destination libvirt i can see in syslog :
/Feb 26 11:16:25 portable libvirtd: 11:16:25.281: error :
qemudDomainGetInfo:3744 : Domain not found: no domain with matching uuid
'71c22b3b-4c93-80bd-8387-2b502887c2aa'
Feb 26 11:16:25 portable libvirtd: 11:16:25.283: error :
qemudDomainGetInfo:3744 : Domain not found: no domain with matching uuid
'71c22b3b-4c93-80bd-8387-2b502887c2aa'
Feb 26 11:16:25 portable kernel: [ 3022.213730] virbr0: port 1(vnet0)
entering disabled state
Feb 26 11:16:25 portable kernel: [ 3022.228917] device vnet0 left
promiscuous mode
Feb 26 11:16:25 portable kernel: [ 3022.228925] virbr0: port 1(vnet0)
entering disabled state
Feb 26 11:16:25 portable NetworkManager: SCPlugin-Ifupdown: devices
removed (path: /sys/devices/virtual/net/vnet0, iface: vnet0)
Feb 26 11:17:01 portable /USR/SBIN/CRON[2606]: (root) CMD ( cd / &&
run-parts --report /etc/cron.hourly)
Feb 26 11:24:47 portable NetworkManager: <WARN> nm_signal_handler():
Caught signal 15, shutting down normally.
Feb 26 11:24:47 portable NetworkManager: <info> (wlan0): taking down
device.
Feb 26 11:24:47 portable NetworkManager: <info> exiting (success)
/in the destination libvirt vm log i can see the cmd running by migration:
/LC_ALL=C
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin HOME=/
QEMU_AUDIO_DRV=none /usr/bin/kvm -S -M pc-0.11 -enable-kvm -m 256 -smp 1
-name testmigration -uuid 71c22b3b-4c93-80bd-8387-2b502887c2aa -monitor
unix:/var/lib/libvirt/qemu/testmigration.monitor,server,nowait -boot c
-drive file=/mnt/testmigration.img,if=virtio,boot=on,format=qcow2 -drive
if=ide,media=cdrom,bus=1,unit=0,format=raw -net
nic,macaddr=52:54:00:7a:a4:98,vlan=0,model=virtio,name=net0 -net
tap,fd=50,vlan=0,name=hostnet0 -serial pty -parallel none -usb -vnc
127.0.0.1:0 -k fr -vga cirrus -incoming tcp:0.0.0.0:49156 -balloon virtio/
I'm using Debian.
The problem occure online as offline mod.
14 years, 8 months
[libvirt-users] /dev/pts linking option?
by Jon Masters
Folks,
Does anyone know whether libvirt provides a means for me to guarantee a
persistent link for my guest's virtual serial console? I need to have a
consistent mapping (for example, a symlink that always points to the
correct /dev/pts entry) so I can automate kgdb hookup on boot.
Jon.
14 years, 8 months
[libvirt-users] live migration not working correctly
by Daniel Bidwell
I have two servers running Ubuntu 9.10, with shared disk from ISCSI SAN
and OCFS2, identical network configurations, shared ssh keys, and pki
keys. My vm will boot from either machine and run correctly. When I
attempt to do a live migration with "migrate --live base32 qemu
+[ssh/tcp]://vm1/system" it initiates the vm on the other server, but
leaves the vm on the current server in the "running" state and the vm on
the other server in the "paused" state. It never finishes the
migration. I get the same results for doing a migration via ssh as I do
with tcp/pki. I have turned up the logging to debug, but don't see
anything in the log to indicate an error or any reason for it to not
complete. At least not anything obvious. The Ubuntu server software is
using kvm/qemu version 84.
I have been through the ubuntu and qemu forums/wiki/documentation.
Anyone have any suggestions of other things to look for?
--
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] Digium TDM410 passthrought to KVM VM trixbox
by raincatsdogs@me.com
Hello, my name is Paul.
I need to map a PCI device for a virtual machine.
The Linux distribution is Ubuntu server 9.10, infrastructure
virtualization is "KVM". The virtual machine will install trixbox. To
map the PCI card is a "Digium TDM410p.
There currently, KVM hosts a virtual machine that runs smoothly
without any problems. In fact, this virtual machine is running
Openfiler and has direct access to 2 physical disks installed on the
server.
Creating a new virtual machine can not connect the Digium card,
directly to the virtual machine.I tried in 2 ways.
1. Directly editing the XML file for the virtual machine with the
parameters indicated in the documentation:
...
<devices>
<hostdev mode='subsystem' type='pci'>
<source>
<address bus='0x01' slot='0x00' function='0x0'/> <-----
this is my personal configuration
</ source>
</ hostdev>
</ devices>
...
2. Adding the PCI card via virt-manager
In both cases, the virtual machine will not start. Virt-manager
returns this error:
"Error starting domain/ monitor socket did not show up./ Connection
refused"
"Traceback (most recent call last):
File "/usr/share/virt-manager/virtManager/engine.py", line 493, in
run_domain
vm.startup()
File "/usr/share/virt-manager/virtManager/domain.py", line 558, in
startup
self.vm.create()
File "/usr/lib/python2.6/dist-packages/libvirt.py", line 293, in
create
if ret == -1: raise libvirtError ('virDomainCreate() failed',
dom=self)
libvirtError: monitor socket did not show up.: Connection refused"
Can someone kindly help me?
Thanks
14 years, 9 months