[libvirt-users] How to use ext transport?
by Christian Schmidt
Hi,
I would like to use the ext transport mode to migrate VMs between two
hosts, but I didn't find any documentation about the ext interface.
I have successfully migrate a vm with a programm that passes it's
incomming messages through the network to libvirts socket on the target
server. But the external program on the source side didn't get the
connection URI or the server address or port.
Is is possible to pass some arguments to the external programm or how
can the external programm get the connection URI?
My migration command looks like:
virsh migrate --live --verbose myvm
qemu+ext://targethost:7866/system?command=/root/dev/bin/trans
At the moment I've written the target host and the port in the transport
programm, but I think there have to be a better solution...
--
Christian
12 years, 4 months
[libvirt-users] Which functions call qemu_driver API?
by He Xin
Hi,
Excuse me, I have watched qemu_driver.c where most of the libvirt
API is overrided in order to connect qemu. But I am confused which functions
then call those qemu_driver API? I mean where is the qemu_driver
implementation? Libvirt.c? But how does the qemu_driver connect and control
qemu?
Thanks a lot!
Regards,
Corey
12 years, 4 months
[libvirt-users] quickest way to stop VM
by Harish Patil
Hello
Which is the quickest way to stop KVM guest VM. I am not interested in
saving anything; I just have to make sure that VM apps are ended quickly.
i) virsh shutdown
ii) virsh suspend
iii) virsh destroy
>From little descriptions I have, looks like destroy is the fastest way and
acts like a removal of a power plug.
Pls let me know.
Thanks
>Harish
12 years, 4 months
[libvirt-users] iptables: cannot port forward
by Mauricio Tavares
Easy question here: I have a test network that looks like this
(apologies for my lack of ascii skills):
[hostc]---------------[Firewall]192.168.42.1 (EXTIF: eth0) /10.0.0.1
(INTIF: eth1)
192.168.42.10 (wan) |(lan)
|
+-------------[hosta] 10.0.0.10 (port 4242)
|
+-------------[hostb] 10.0.0.20 (port 2424)
All of those machines are vms I created using virsh/libvirt. In fact,
the "wan" is a network that exists only inside virsh. "lan" is a vlan
my desktop also belongs to; I did that so I could always connect even
when I screwed the firewall up. So, using iptables I created a little
set of rules to forward port 2424 in 192.168.42.1 to 10.0.0.20:2424 :
$IPTABLES -A FORWARD -o $INTIF -i $EXTIF -j ACCEPT
$IPTABLES -t nat -A PREROUTING --dst 192.168.42.1 -p tcp --dport 2424
-m comment --comment "test" -j DNAT --to-destination 10.0.0.20:2424
cat >> /etc/sysctl.conf << 'EOF'
# Custom Settings for Forwarding and OpenSwan
net.ipv4.ip_forward=1
net.ipv4.conf.all.accept_redirects = 0
net.ipv4.conf.default.accept_redirects = 0
net.ipv4.conf.all.send_redirects = 0
net.ipv4.conf.default.send_redirects = 0
EOF
sysctl -p
So, in 10.0.0.20 I do "nc -l 2424". But when I go to hostc and then
try to do "nc -v 192.168.41.1 2424", connection does not take place.
Thinking I've done something wrong, I replicated the very same setup
in virtualbox down to the network layout. It works. So, I went to the
firewall vm and replaced the network interface from virtio to e1000.
Still did not work. What am I missing here?
12 years, 4 months
[libvirt-users] virsh dump
by Harish Patil
Hi
I have both host and KVM/QEMU guest VM running linux.
Questions:
What are the constituents of the virsh dump?
- What all areas does it dumps?
- Is it same as taking guest VM's core dump via kexec/kdump?
- Does it include QEMU's info to debug qemu-level issues?
Thanks much in advance.
>harish
12 years, 4 months
[libvirt-users] virDomainMigrate() leads to SASL error
by Olivier Doucet
Hello,
I'm trying to use virDomainMigrate() function through libvirt-php but
I have this error coming from libvirt (this is an error raised by
virDomainMigrate(), not by php binding) :
Failed to step SASL negotiation: -7 (SASL(-7): invalid parameter
supplied: Unexpectedly missing a prompt result)
My two connections are over TCP with login/password provided (URL is
qemu+tcp://X.X.X.X/system)
Connection to both hosts independently is working (listing domains, etc.)
Migration through virsh is working too !
On destination host, I have this in log file :
2012-08-09 14:29:23.628+0000: 17179: error : virNetSocketReadWire:1003
: End of file while reading data: Input/output error
Can someone tell me if I'm doing anything wrong ?
Thanks !
Olivier
12 years, 4 months
[libvirt-users] error deploying a vm: Operation not permitted
by Michael Rebstock
Dear Ladies and Gentleman,
I am trying to deploy a virtual machine on a KVM host. I created a
deployment file (see beneath) and a disk for this VM.
As root I executed the following command:
virsh create deployment.0
but then I get the following error message:
error: Failed to create domain from deployment.0
error: cannot set ownership on /var/lib/one/datastores/0/15/disk.0:
Operation not permitted
What am I doing wrong?
Thanks in advance.
Best regards
Michael Rebstock
#########################
Content of the deployment file:
<domain type='kvm' xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'>
<name>one-15</name>
<memory>2097152</memory>
<os>
<type arch='i686'>hvm</type>
<boot dev='hd'/>
</os>
<devices>
<emulator>/usr/bin/kvm</emulator>
<disk type='file' device='disk'>
<source file='/var/lib/one/datastores/0/15/disk.0'/>
<target dev='hda' bus='ide'/>
<driver name='qemu' type='raw' cache='default'/>
</disk>
<interface type='bridge'>
<source bridge='319er-vlan'/>
<mac address='22:00:c0:ba:2a:64'/>
</interface>
</devices>
<features>
<acpi/>
</features>
</domain>
12 years, 4 months