[libvirt-users] some problem with snapshot by libvirt
by xingxing gao
Hi,all,i am using libvirt to manage my vm,in these days i am testing
the libvirt snapshot ,but meet some problem:
the snapshot was created from this command:
snapshot-create-as win7 --disk-only --diskspec
vda,snapshot=external --diskspec hda,snapshot=no
but when i tried to revert from the snapshot which created from the
above command ,i got error below:
virsh # snapshot-revert win7 1338041515 --force
error: unsupported configuration: revert to external disk snapshot not
supported yet
version:
virsh # version
Compiled against library: libvir 0.9.4
Using library: libvir 0.9.4
Using API: QEMU 0.9.4
Running hypervisor: QEMU 1.0.93
10 years, 1 month
[libvirt-users] How to use xl (in place of xm) with libvirt 1.0.2 and Xen 4.2.1 in Ubuntu 13.04?
by Gizmo Chicken
QUESTION: What, if anything, can I do so that I can use xl (in place of
xm) with libvirt 1.0.2 and Xen 4.2.1 in Ubuntu 13.04?
BACKGROUND: I am testing a fully updated (as of March 27) installation of
Ubuntu 13.04 that includes the following packages:
libvirt - version 1.0.2-0ubuntu9
xen-hypervisor-4.2-amd64 - version 4.2.1-0ubuntu1
Upon setting TOOLSTACK=xm in /etc/default/xen (as well as making a few
needed tweaks to /etc/xen/xend-config.sxp), libvirt and virt-manager worked
great. Yippee!
I guess that I should be happy that the xm toolstack still works with Xen
4.2.1 and quit while I'm ahead, but...
According to libvirt's documentation:
"libxl: Starting with Xen 4.2, the legacy XenD/xm toolstack is deprecated
in favor of libxl, also commonly called libxenlight. libvirt supports this
new Xen toolstack via the libxl driver. If XenD is enabled, the legacy xen
driver consisting of the above mentioned channels will be used. If XenD is
disabled, the libxl driver will be used."
See http://libvirt.org/drvxen.html.
In view of the above, I attempted to use xl in place xm by setting
TOOLSTACK=xl in /etc/default/xen. And after doing so (both with and
without, the above mentioned tweaks to /etc/xen/xend-config.sxp), I
recieved the following error when attempting to start virt-manager:
Unable to connect to libvirt.
unable to connect to 'localhost:8000': Connection refused
Verify that:
- A Xen host kernel was booted
- The Xen service has been started
Libvirt URI is: xen:///
Traceback (most recent call last):
File "/usr/share/virt-manager/virtManager/connection.py", line 1027, in
_open_thread
self.vmm = self._try_open()
File "/usr/share/virt-manager/virtManager/connection.py", line 1009, in
_try_open
flags)
File "/usr/lib/python2.7/dist-packages/libvirt.py", line 102, in openAuth
if ret is None:raise libvirtError('virConnectOpenAuth() failed')
libvirtError: unable to connect to 'localhost:8000': Connection refused
11 years, 7 months
[libvirt-users] remote connection issue 'virsh -c qemu+ssh:///root@localhost/system list'
by Yin Olivia-R63875
Hi,
I'm trying remote connection with qemu hypervisor on FSL PPC board.
The libvirt server is the PPC board.
root@ppc:~# ifconfig eth0 10.193.20.109
root@ppc:~# libvirtd -d
root@ppc:~# virsh -c qemu:///system define test.xml
root@ppc:~# virsh -c qemu:///system start test
root@ppc:~# virsh -c qemu:///system list --all
Id Name State
----------------------------------------------------
2 test running
Connect from an X86 PC (Ubuntu 10.04) to the PPC board.
user@x86:~$ virsh -c qemu+ssh://root@10.193.20.109/system list --all
The authenticity of host '10.193.20.109 (10.193.20.109)' can't be established.
RSA key fingerprint is 2f:56:07:08:da:7d:ac:41:45:57:d2:12:15:19:67:e0.
Are you sure you want to continue connecting (yes/no)? yes
root(a)10.193.20.109's password:
error: failed to connect to the hypervisor
error: End of file while reading data: Warning: Permanently added '10.193.20.109' (RSA) to the list of known hosts.
nc: invalid option -- 'U'
BusyBox v1.19.4 (2013-03-08 13:08:18 CST) multi-call binary.
Usage: nc [-iN] [-wN] [-l] [-p PORT] [-f FILE|IPADDR PORT] [-e PROG]: Input/output error
I tried to verify the remote connection on localhost. But it also failed as below:
root@mpc8572ds:~# virsh -c qemu+ssh:///root@localhost/system list --all
root@localhost's password:
error: failed to connect to the hypervisor
error: End of file while reading data: nc: invalid option -- 'U'
BusyBox v1.19.4 (2013-03-08 13:08:18 CST) multi-call binary.
Usage: nc [-iN] [-wN] [-l] [-p PORT] [-f FILE|IPADDR PORT] [-e PROG]: Input/output error
Could anyone give suggestion on this issue?
Best Regards,
Olivia
11 years, 8 months
[libvirt-users] Host modifications
by Benoit Friry
Hello,
I test libvirt 0.9.12 on Debian.
I am disappointed by changes made on my host without any notice.
Examples:
- editing interfaces with virsh or virt-manager modifies my
/etc/network/interfaces. It's not clear at first glance that I can even
cut myself from the host when editing remotely. The initial file is not
even saved.
- starting default network (nat) adds rules in netfilter. I have not
seen how to create another network nat conf without calling
clean-traffic nwfilter (it is not explicit in network XML file). Is it
hardcoded ?
I think it would be nice:
- to be alerted before any host modification,
- to be able to change the templates, for instance:
- not including any nwfilter when creating a network,
- script called when adding a file in a dir pool,
- and so on.
Did I miss something?
Am I alone to disappointed by such behavior?
Thanks,
Benoit
11 years, 8 months
[libvirt-users] migrate qemu domains
by Yin Olivia-R63875
Hi,
I tried to migrate qemu domains between same two Freescale PPC platforms.
1) Migrate test domain from Host1(10.193.20.109) to Host2(10.193.20.181).
root@ppc-host1:~# virsh migrate test qemu+tls://10.193.20.181/system
or
root@ppc-host2:~# virsh -c qemu+tls://10.193.20.109/system migrate test qemu:///system
I waited for a while and finally got error message as below:
error: Unable to read from monitor: Connection reset by peer
Exactly, when waiting (I guess during migration), the migrated domain is pasued on
both source and destination nodes.
root@ppc-host1:~# virsh -c qemu:///system list --all
Id Name State
----------------------------------------------------
5 test paused
And meanwhile, the destination domain is also paused when waiting
root@ppc-host2:~# virsh -c qemu:///system list --all
Id Name State
----------------------------------------------------
2 test paused
Finally, the migrated domain on source node is shut off.
root@ppc-host1:~# virsh -c qemu:///system list --all
Id Name State
----------------------------------------------------
- test shut off
But can't find any domain on destination node any longer.
root@ppc-host2:~# virsh -c qemu:///system list --all
Id Name State
----------------------------------------------------
As I know qemu-system-ppc doesn't support live migration on Freescale PPC platform yet.
My question is whether it depends on qemu implementation to migrate qemu hypervisor with libvirt?
>From the above experiment, it seemed that migration happened but not succeeded finally.
Best Regards,
Olivia
11 years, 8 months
[libvirt-users] virt-manager connect remote KVM host and graphic control guest problem
by cochen
Hi developer, i got a problem and need your help!(my english not very good)
My KVM host in IDC, and there are some restrict in there lead to me connect to KVM host by port 22 or 16509 impossible. In generally If i want login my KVM host i must login in to a "stepping stones" first, then login to that KVM host.( Now assume that the KVM host ip is 1.1.1.1 and the "stepping stones" ip is 2.2.2.2).
So i use the "portforwarding" (i used the manner of "qemu+tcp" to connect KVM host, the default port is 16509), I visit the port 16509 in "stepping stones" machine 1.1.1.1 and then 1.1.1.1 port forwarding to 2.2.2.2:16509. And then my virt-manager connect KVM host successful!
But my trouble is comming too. I can't use virt-manager to control my guest by graphic. I "portforwarding" the port 5911(i had already defined my guest vnc port), but is unuseful. I used command "netstat -antl" in KVM host found that :
tcp 0 0 127.0.0.1:5911 0.0.0.0:* LISTEN
tcp 0 0 1.1.1.1:16509 2.2.2.2:63325 ESTABLISHED
tcp 0 0 0.0.0.0:16509 0.0.0.0:* LISTEN
As you see, 5911 listen into localhost(127.0.0.1), but 16509 listen into the 1.1.1.1 and 0.0.0.0. So I think if 5911 listen 0.0.0.0 or 1.1.1.1 everything is ok.
Here is my virt-manager.log:
[Thu, 28 Mar 2013 00:57:16 virt-manager 3242] DEBUG (engine:471) window counter incremented to 2
[Thu, 28 Mar 2013 00:57:16 virt-manager 3242] DEBUG (console:1078) Starting connect process for proto=vnc trans=tcp connhost=2.2.2.2 connuser=root connport=None gaddr=127.0.0.1 gport=5911 gsocket=None
[Thu, 28 Mar 2013 00:57:16 virt-manager 3242] DEBUG (console:374) VNC connecting to 2.2.2.2:5911
[Thu, 28 Mar 2013 00:57:18 virt-manager 3242] DEBUG (console:961) Viewer disconnected
How can i use virt-manager to control my guest by graphic?
thank you very much!!!
11 years, 8 months
[libvirt-users] How to give access to /dev/tty
by Guillaume Thouvenin
Hello,
First I apologize because I sent this email on the lxc-users mailing
by error. So sorry for the double message.
I'm trying to run an X server inside a container. I was able to
achieve this with lxc-tools (and that is why I mixed myself between the
2 lists) by setting the option lxc.tty = 4 that allows access to 4 tty.
Now I want to use libvirt because my final goal is to create a
container with GPU capabilities from Openstack (that uses libvirt).
When I start an X server with "startx -- :1" in a container I have the error:
Fatal server error:
xf86OpenConsole: Cannot open /dev/tty0 (No such file or directory)
I also tried with :2 and :3 but I still have the same error (except
that the name of the log file changed between Xorg.{1,2,3}.log. I
copied the xml file of my container at the end of the email.
Thus my question is how can I give an access to /dev/tty0 to the
container? Or maybe it is not the right way to start an X server in the
container. Best regards,
Guillaume
<domain type='lxc' id='28247'>
<name>lxcvm1</name>
<uuid>d4014dfc-f4db-5791-c0d2-817547921ce1</uuid>
<memory unit='KiB'>1048576</memory>
<currentMemory unit='KiB'>1048576</currentMemory>
<vcpu placement='static'>1</vcpu>
<os>
<type arch='x86_64'>exe</type>
<init>/sbin/init</init>
</os>
<clock offset='utc'/>
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
<on_crash>restart</on_crash>
<devices>
<emulator>/usr/lib/libvirt/libvirt_lxc</emulator>
<filesystem type='mount' accessmode='passthrough'>
<source dir='/home/thouveng/virtualization/lxc/lxcvm1/rootfs'/>
<target dir='/'/>
</filesystem>
<interface type='network'>
<mac address='00:16:3e:3e:06:4d'/>
<source network='default'/>
<target dev='veth0'/>
</interface>
<console type='pty' tty='/dev/pts/2'>
<source path='/dev/pts/2'/>
<target type='lxc' port='0'/>
<alias name='console0'/>
</console>
<console type='pty'>
<source path='/dev/pts/6'/>
<target type='lxc' port='1'/>
<alias name='console1'/>
</console>
<console type='pty'>
<source path='/dev/pts/7'/>
<target type='lxc' port='2'/>
<alias name='console2'/>
</console>
</devices>
<seclabel type='none'/>
</domain>
11 years, 8 months
[libvirt-users] question about vm management in libvirt
by Wangkai (Kevin,C)
Dear,
I am a beginner of using libvirt to manage the vm, and I checked the libvirt manual.
And I found the libvirt can creat, destroy, start and stop the vm, and it can manage
The resource of the vm, such as storage, cpus, memory, networking and so on.
And I have one doubt, Can It know the vm internal running state? Such as vm reboot,
Exception, hang up, or signals received by the vm processes.
I am using qemu driver.
Thanks and Regards,
Kevin
11 years, 8 months