[libvirt] networking static ip address
by Francisco José Martín
Hi, we are using the 0.6.0 version and an Ubuntu guest os under KVM
virtualization.
We have tried several ways to assign a static ip address to the guest os
eth0 device on boot, but we didn't success. Is there any easy way to do it?
We are trying to have a guest with the ip 192.168.0.1 in the eth0 device,
enslaved to the br0 bridge on the host machine, which seems to be a pretty
easy setup to test.
When the guest OS is booted, the eth0 device exists, but is not up, and
doesn't have the IP.
Regards,
Francisco.
15 years, 9 months
[libvirt] [PATCH 1/5] Fix a typo in hostdev docs
by Mark McLoughlin
It's:
<address bus='0x06' slot='0x02' function='0x0'/>
not:
<address>bus='0x06' slot='0x02' function='0x0'</address>
Signed-off-by: Mark McLoughlin <markmc(a)redhat.com>
---
docs/formatdomain.html | 2 +-
docs/formatdomain.html.in | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/docs/formatdomain.html b/docs/formatdomain.html
index 17384b3..17dc0cd 100644
--- a/docs/formatdomain.html
+++ b/docs/formatdomain.html
@@ -485,7 +485,7 @@
...
<hostdev mode='subsystem' type='pci'>
<source>
- <address>bus='0x06' slot='0x02' function='0x0'</address>
+ <address bus='0x06' slot='0x02' function='0x0'/>
</source>
</hostdev>
...</pre>
diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in
index c1e6a16..ee32354 100644
--- a/docs/formatdomain.html.in
+++ b/docs/formatdomain.html.in
@@ -397,7 +397,7 @@
...
<hostdev mode='subsystem' type='pci'>
<source>
- <address>bus='0x06' slot='0x02' function='0x0'</address>
+ <address bus='0x06' slot='0x02' function='0x0'/>
</source>
</hostdev>
...</pre>
--
1.6.0.6
15 years, 9 months
[libvirt] networking with VMs on two nodes
by Andreas Rittershofer
I have two nodes and on each several virtual machines running under
KVM/qemu. I've set up the default-network on each node and so I can:
1.) ping from host do guest
2.) ping from guest to host
3.) ping from guest tu guest
But all this is only possibe on each node by itself.
What I need now is network connection between a VM on node 1 to
another VM on node 2. How to setup this?
When both nodes are fine every node runs a few guests. But when one
node goes down, all guests have to be run on the remaining node.
mfg ar
--
Hier könnte keine Signatur stehen.
15 years, 9 months
[libvirt] Re: [et-mgmt-tools] attach hot usb device
by Cole Robinson
cc-ing libvir-list (future libvirt questions should be directed there)
jmandawg wrote:
> Hi,
>
>
>
> Quick question, since I can’t get to the qemu monitor anymore, how do I
> hot add a usb device (smartphone)?
>
> Is it possible to do through virsh?
>
Sure:
- Use 'lsusb' to determine the bus and device. Example listing looks like:
Bus 001 Device 006: ID 0781:5151 SanDisk Corp. Cruzer Micro 256/512MB
Flash Drive
- Put hostdev xml in a file:
cat << __EOF__ > usb.xml
<hostdev mode='subsystem' type='usb'>
<source>
<address bus='1' device='6'/>
</source>
</hostdev>
__EOF__
- Run 'virsh attach-device {VMNAME} usb.xml' on a running VM.
Hope that helps,
Cole
15 years, 9 months
[libvirt] Networking with libvirt
by Andreas Rittershofer
I want to setup networking under KVM and with libvirt. I read a lot
the last two days, but it is not working as desired. I don't want
bridging, I want it with a tap-device created via vde_switch. I cannot
figure out what to put in /etc/libvirt/qemu/machine.xml and /etc/
libvirt/qemu/networks/network.xml - there is no really good
documentation. /var/log/libvirt/qemu/maschine.log shows a lot of
parameters when I start the VM with virsh start machine, but I cannot
figure out where to set these values or where to set the defaults.
mfg ar
--
Hier könnte keine Signatur stehen.
15 years, 9 months
[libvirt] update documentation
by jesse lauren farinacci
I hit a small snag when following the documentation, specifically
the doc says to use <clock sync='localtime'/> when it should say
<clock offset='localtime'/>.
15 years, 9 months
[libvirt] [PATCH] Fix bugzilla link in virsh man page
by Mark McLoughlin
Note, I haven't generated a new virsh.1 because Pod::Man 2.16
gives a bunch of warnings even with the existing version.
Signed-off-by: Mark McLoughlin <markmc(a)redhat.com>
---
docs/virsh.pod | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/docs/virsh.pod b/docs/virsh.pod
index 8b42ea0..58bba6b 100644
--- a/docs/virsh.pod
+++ b/docs/virsh.pod
@@ -540,9 +540,9 @@ L<virt-install(1)>, L<xm(1)>, L<virt-top(1)>, L<virt-mem(1)>, L<virt-df(1)>, L<h
=head1 BUGS
-Bugs can be view on the RedHat bugzilla page under the libvirt
+Bugs can be filed in Red Hat bugzilla under the Virtualization Tools/libvirt
L<https://bugzilla.redhat.com/>
-L<https://bugzilla.redhat.com/bugzilla/buglist.cgi?product=Fedora+Core&comp...>
+L<https://bugzilla.redhat.com/buglist.cgi?product=Virtualization+Tools&comp...>
=end
--
1.6.0.6
15 years, 9 months
[libvirt] restore as init script
by Matthias Pfafferodt
Hello,
first i'm using kvm-84 and libvirt 0.6.0 on opensuse 11.1.
I try to use the attached script to save some domains on shutdown and restore
them on host boot. The script also tries to cleanly shutdown all other
domains. The save and shutdown part is working as expected but on system boot
the restore of the saved domains fails. If I manually run 'rclibvirtdomains
start' after a boot it needs 1 to 3 tries to restore the domain. After that I
can run a stop/start cycle of libvirtdomains without problems.
How can I debug this problem? After the system boot libvirt seems to have
problems to connect to qemu/kvm. The log messages are for a failed start:
--- start log ---
LC_ALL=C PATH=/bin:/sbin:/usr/bin:/usr/sbin HOME=/ /usr/bin/qemu-kvm -S -M
pc -m 1024 -smp 1 -name kvm-virt03 -uuid
864c0b59-705e-5d78-dc3e-1a9de7dd305f -monitor
pty -pidfile /var/run/libvirt/qemu//kvm-virt03.pid -boot c -drive
file=/dev/virtual/kvm_virt03,if=ide,index=0,boot=on -net
nic,macaddr=00:16:3e:00:01:05,vlan=0,model=e1000 -net
tap,fd=15,script=,vlan=0,ifname=vnet0 -serial none -parallel none -usb -vnc
192.168.110.78:0 -k de -soundhw es1370 -incoming exec:cat
char device redirected to /dev/pts/6
qemu_popen: returning result of qemu_fopen_ops
cat: write error: Broken pipe
--- end log ---
and for a successful start:
--- start log ---
LC_ALL=C PATH=/bin:/sbin:/usr/bin:/usr/sbin HOME=/ /usr/bin/qemu-kvm -S -M
pc -m 1024 -smp 1 -name kvm-virt03 -uuid
864c0b59-705e-5d78-dc3e-1a9de7dd305f -monitor
pty -pidfile /var/run/libvirt/qemu//kvm-virt03.pid -boot c -drive
file=/dev/virtual/kvm_virt03,if=ide,index=0,boot=on -net
nic,macaddr=00:16:3e:00:01:05,vlan=0,model=e1000 -net
tap,fd=15,script=,vlan=0,ifname=vnet0 -serial none -parallel none -usb -vnc
192.168.110.78:0 -k de -soundhw es1370 -incoming exec:cat
char device redirected to /dev/pts/6
qemu_popen: returning result of qemu_fopen_ops
info cpus
* CPU #0: pc=0xffffffff80221f1d thread_id=7398
cont
--- end log ---
Kind regards
Matthias Pfafferodt
--
Matthias Pfafferodt - http://www.mapfa.de
Matthias.Pfafferodt <at> mapfa.de
## Path: System/Virtualization
## Description: libvirtd stop configuration
## Type: yesno
## Default: yes
#
# On 'libvirtd stop' all running domains are killed. If
# LIBVIRTDOMAINS_SHUTDOWN is set to 'yes' all running vm's are given time
# for a gracefully shutdown.
#
LIBVIRTDOMAINS_SHUTDOWN="yes"
## Path: System/Virtualization
## Description: libvirtd timeout
## Type: integer
## Default: 300
#
# On 'libvirtd stop' the vm's are ask to shutdown. This optine gives the
# maximum number of seconds the script will wait until libvirt is stopped.
#
LIBVIRTDOMAINS_SHUTDOWN_MAXWAIT=300
## Path: System/Virtualization
## Description: should domains be saved
## Type: yesno
## Default: yes
#
# If set to yes domains are saved on shutdown and restored on boot.
#
LIBVIRTDOMAINS_SAVE="yes"
## Path: System/Virtualization
## Description: domains which should be save and restored
## Type: string
## Default:
#
# The listed vms are saved on shutdown and restored at boot time
#
LIBVIRTDOMAINS_SAVE_VM="kvm-virt03"
## Path: System/Virtualization
## Description: save path for domains
## Type: string
## Default: /var/lib/libvirtdomains/save
#
# Path there the domains should be saved
#
LIBVIRTDOMAINS_SAVE_DIR="/var/lib/libvirtdomains/save"
15 years, 9 months
[libvirt] bridge-to-lan interfaces with network type
by Zhengang Li
Hi All,
The documentation on the libvirt website explains the way to define a
bridge to LAN network interfaces with a 'bridge' type. E.g.:
<interface type='bridge'>
<source bridge='br0'/>
<mac address='52:54:00:00:00:11'/>
</interface>
I'm working in a limited environment. Only 'network' type interfaces can
be defined for a guest. Is it possible to define a bridge-to-lan
interfaces with a 'network' type? The question actually goes to: How to
write a network definition xml for libvirt to use as bridge to LAN type
NIC in guest?
I tried with 'nat' and 'route' forward in network xml, neither works for me.
Regards,
Zhengang
15 years, 9 months
[libvirt] can't install fedora guest
by Farkas Levente
hi,
while i try to install fedora-10 guest on centos-5 host i've got the
error bellow virt-manager. our setup:
virt-manager-0.6.1-1
libvirt-0.6.0-1
kvm-83-1
-----------------------------------------------
Unable to complete install 'libvirt.libvirtError internal error unable
to start guest:
Traceback (most recent call last):
File "/usr/share/virt-manager/virtManager/create.py", line 717, in
do_install
dom = guest.start_install(False, meter = meter)
File "/usr/lib/python2.4/site-packages/virtinst/Guest.py", line 926,
in start_install
return self._do_install(consolecb, meter, removeOld, wait)
File "/usr/lib/python2.4/site-packages/virtinst/Guest.py", line 966,
in _do_install
self.domain = self.conn.createLinux(install_xml, 0)
File "/usr/lib64/python2.4/site-packages/libvirt.py", line 973, in
createLinux
if ret is None:raise libvirtError('virDomainCreateLinux() failed',
conn=self)
libvirtError: internal error unable to start guest:
-----------------------------------------------
while this is in virt-manager's log:
-----------------------------------------------
[Fri, 06 Feb 2009 10:27:15 virt-manager 31523] DEBUG (Storage:908)
Storage volume 'fedora-i386.img' install complete.
[Fri, 06 Feb 2009 10:27:15 virt-manager 31523] DEBUG (Guest:964)
Creating guest from:
<domain type='kvm'>
<name>fedora-i386</name>
<currentMemory>524288</currentMemory>
<memory>524288</memory>
<uuid>75330b36-f8e3-8459-2d71-fb47245d7203</uuid>
<os>
<type arch='x86_64'>hvm</type>
<boot dev='cdrom'/>
</os>
<features>
<acpi/><apic/>
</features>
<clock offset="utc"/>
<on_poweroff>destroy</on_poweroff>
<on_reboot>destroy</on_reboot>
<on_crash>destroy</on_crash>
<vcpu>1</vcpu>
<devices>
<emulator>/usr/bin/qemu-kvm</emulator>
<console type='pty'/>
<disk type='file' device='disk'>
<source file='/var/lib/libvirt/images/fedora-i386.img'/>
<target dev='vda' bus='virtio'/>
</disk>
<disk type='block' device='cdrom'>
<source dev='/dev/hda'/>
<target dev='hdc' bus='ide'/>
<readonly/>
</disk>
<interface type='bridge'>
<source bridge='eth0'/>
<mac address='54:52:00:5d:99:c0'/>
<model type='virtio'/>
</interface>
<input type='mouse' bus='ps2'/>
<graphics type='vnc' port='-1' keymap='en-us'/>
<sound model='es1370'/>
</devices>
</domain>
[Fri, 06 Feb 2009 10:27:16 virt-manager 31523] ERROR (create:735) Unable
to complete install 'libvirt.libvirtError internal error unable to start
guest:
Traceback (most recent call last):
File "/usr/share/virt-manager/virtManager/create.py", line 717, in
do_install
dom = guest.start_install(False, meter = meter)
File "/usr/lib/python2.4/site-packages/virtinst/Guest.py", line 926,
in start_install
return self._do_install(consolecb, meter, removeOld, wait)
File "/usr/lib/python2.4/site-packages/virtinst/Guest.py", line 966,
in _do_install
self.domain = self.conn.createLinux(install_xml, 0)
File "/usr/lib64/python2.4/site-packages/libvirt.py", line 973, in
createLinux
if ret is None:raise libvirtError('virDomainCreateLinux() failed',
conn=self)
libvirtError: internal error unable to start guest:
'
[Fri, 06 Feb 2009 10:27:16 virt-manager 31523] DEBUG (error:76) Uncaught
Error: Unable to complete install: 'internal error unable to start
guest: ' : Unable to complete install 'libvirt.libvirtError interna
l error unable to start guest:
Traceback (most recent call last):
File "/usr/share/virt-manager/virtManager/create.py", line 717, in
do_install
dom = guest.start_install(False, meter = meter)
File "/usr/lib/python2.4/site-packages/virtinst/Guest.py", line 926,
in start_install
return self._do_install(consolecb, meter, removeOld, wait)
File "/usr/lib/python2.4/site-packages/virtinst/Guest.py", line 966,
in _do_install
self.domain = self.conn.createLinux(install_xml, 0)
File "/usr/lib64/python2.4/site-packages/libvirt.py", line 973, in
createLinux
if ret is None:raise libvirtError('virDomainCreateLinux() failed',
conn=self)
libvirtError: internal error unable to start guest:
'
-----------------------------------------------
--
Levente "Si vis pacem para bellum!"
15 years, 9 months