[libvirt-users] Bringing up a guest with network disabled
by James Gibbon
Hello all,
I have a KVM guest VM which is a clone of a production machine
running on a different physical server, incarnated from an
image backup.
I want to start up the clone, but obviously it has the same IP
address at the moment, and naturally I want to avoid an IP
conflict.
Normally I'd mount the clone image, go in and change the
network config to allocate a different IP, but because it's set
up with its whole disk as a LVM that's a bit painful.
Is there a simple way I can disable the networking for the
guest clone in the config file, so I can VNC into its console
and change its IP address config that way?
The devices section of the config looks like this:
<devices>
<emulator>/usr/libexec/qemu-kvm</emulator>
<disk type='file' device='disk'>
<driver name='qemu' type='raw' cache='writeback'/>
<source file='/var/lib/libvirt/images/sonic2.img'/>
<target dev='hda' bus='ide'/>
</disk>
<interface type='bridge'>
<mac address='0A:F7:B6:96:BF:85'/>
<source bridge='br0'/>
</interface>
<serial type='pty'>
<target port='0'/>
</serial>
<console type='pty'>
<target port='0'/>
</console>
<input type='mouse' bus='ps2'/>
<graphics type='vnc' port='5937' autoport='no' keymap='en-gb'/>
</devices>
.. can I change that 'interface type' value to disable its
interface?
Thanks,
James
11 years
[libvirt-users] Changing test_driver.c file
by Arun Viswanath
Hi All,
For some testing purpose I've changed some content in
src/test/test_driver.c and then used "make" command to compile and build
the code. Then I copied the "libvirt.so.0.9.10.so" file to the target
machine and restart the libvirtd daemon, but the changes I made in
test_driver.c is nothing reflected. I'm not sure whether I'm missing
something. Is it moving only the "libvirt.so.0.9.10.so" is enough or I need
to move some .a files ? , but I'm not seeing any ".a" in the kvm host
related to libvirt to replace. Please provide me sufficient info to proceed
further.
Thanks In Advance,
Arun V
11 years
[libvirt-users] passthrough shared dir with kvm: need to run as root?
by Raphael Bauduin
Hi,
I need to mount a directory from the host in a guest, with passthough (ie,
owner id and group set in the guest should be preserved and written on the
host).
I've read that for this to work, qemu needs to be run as root. Is there a
way to start qemu as root via libvirt?
Thanks
raph
11 years, 1 month
[libvirt-users] Snapshots: Where they are stored and how to use them?
by Roland Giesler
Firstly I'd like to learn where a snapshot is stored once it has been
made. I understand that the principle is that when changes occur in
the VM, the difference is written to the snapshot, thus recording the
differences between the date/time of the snapshot and the current
value of the VM. Is that a correct assessment of the process?
If that is indeed so, can I take regular snapshots and back then up
onto external storage to provide a sort of system restore point at
certain times in the past?
I have scanned the server hard disks for the snapshot images after
running "sudo virsh snapshot-create Windows /etc/libvirt/snapshot.xml"
and the system reports a snapshot was taken, yet I cannot find any
file that contains the snapshot.
$ sudo virsh snapshot-list Windows
Name Creation Time State
------------------------------------------------------------
Windows 2013-10-02 12:41:06 +0200 running
What will happen to the snapshot if the host server is restarted?
Some insight would be greatly appreciated.
regards
Roland
11 years, 1 month
[libvirt-users] Bridging Wireless Cards for KVM
by Joshua McKee
Hi,
I hope this is the right place to ask this question. I was wondering if
there is a way to set up a KVM VM using an XML document as input into Virsh
that uses bridged networking over a wireless card.
I understand that wireless cards to not natively support, but I was able to
find a working solution here:
http://blog.ericwhite.ca/articles/2011/04/creating-a-wireless-bridge/.
The issue is, I can use this bridge by calling KVM directly. However, I
cannot figure out how to get this same configuration on an XML file that I
input into Virsh for the creation of a VM.
My understanding is that libvirt calls KVM/QEMU at some point, but I may be
mistaken.
Thanks,
Joshua
11 years, 1 month
[libvirt-users] Accessing the host server's file system from a guest OS
by Roland Giesler
Is there no way in which one can access the host's filesystem from within a
guest OS.
Libvirt's virt-manager GUI seems to indicate that there is, by virtue of
the FileSystem Passthrough option as shown below
[image: Inline image 1]
The scenario I typically have is a Linux Server on a ext4 file system, with
a Windows 7 Guest OS running a KVM machine.
No matter what combination of options I choose, I can never "mount" the
host drive in Windows to be able to transfer files from one to the other.
Both VMWare Player and Virtualbox have this capability, yet I find this
sorely lacking in libvirt/virt-manager. What do I need to do to make this
work?
regards
Roland
11 years, 1 month
[libvirt-users] libvirt installtion.
by cooldharma06
hi,
i am facing some error i am not able to find how to solve this.
i just explain my whole things.
i installed libvirt 1.1.2 from source under /opt/ folder.
./configure --with-xen=yes, make , make install.
i faced some internal error so runned make clean , make distclean under
libvirt source folder.
then agian i tried to install libvirt 1.1.2
./configure --prefix=/usr --localstatedir=/var --sysconfdir=/etc
--with-xen=yes --with-libxl=yes
make
make install.
i faced some error. i mailed those error in my previous mail.
then i cleared
(removed by make clean) the libvirt 1.1.2 and i tried to install the
libvirt 1.1.1
with the following commands:
./configure --prefix=/usr --localstatedir=/var --sysconfdir=/etc
--with-xen=yes
make
make install
i am getting the below error.
root(a)boss[libvirt-1.1.1]#libvirtd -v
libvirtd: /usr/local/lib/libvirt.so.0: version `LIBVIRT_PRIVATE_1.1.1' not
found (required by libvirtd)
give me some solution to solve the above error..
regards,
cooldharma06.
11 years, 1 month
[libvirt-users] LXC, libvrt-1.1.2-r3 (Gentoo), "/dev/tty12", mount /dev with inverse of 'nodev'?
by Dennis Jenkins
Hello again,
TL;DR:
Today I noticed that my LXC container was out of space in "/dev". It
took me a few minutes to figure out why. There were only 23 files there.
The "/dev" fs quota was 64K, and all was taken up.
The problem was that "syslog-ng" was writing "console" messages to
"/dev/tty12". But "/dev/tty12" was not a device node, so the kernel
"(2)open"ed it as a file and dutifully wrote to it.
I have corrected my syslog-ng config, but I was wondering....
Is there any legitimate reason to EVER have a regular file in "/dev"?
If not, can libvirt or Linux be modified so that the filesystem can be
mounted in such a way to prevent a regular file from ever being created
there? Kind of like an inverse of the "nodev" mount option seen in various
filesystems (ext3, nfs). IMHO, I would rather have syslog-ng (or other
tool) fail to open a regular file in "/dev", than for it is succeed and
then fill up the small fs.
Thoughts?
Boring stuff:
Sep 30 14:06:47 localhost syslog-ng[440]: Error suspend timeout has
elapsed, attempting to write again; fd='16'
Sep 30 14:06:47 localhost syslog-ng[440]: I/O error occurred while writing;
fd='16', error='No space left on device (28)'
Sep 30 14:06:47 localhost syslog-ng[440]: Suspending write operation
because of an I/O error; fd='16', time_reopen='60'
This is what I see inside the container:
djenkins@dwj-hfax-dev ~/src/HylaFAX+ $ find /dev | wc -l
23
dwj-hfax-dev ~ # ls -l /dev/tty*
crw-rw-rw- 1 root root 5, 0 Sep 30 13:44 /dev/tty
lrwxrwxrwx 1 root root 10 Sep 30 13:03 /dev/tty1 -> /dev/pts/0
-rw------- 1 root root 65536 Sep 30 14:12 /dev/tty12
### AHHH!!! There is the problem. "syslog-ng" is writing to "/dev/tty12",
but it is a file and not a real device.
djenkins@dwj-hfax-dev ~/src/HylaFAX+ $ du -sh /dev
64K /dev
djenkins@dwj-hfax-dev ~/src/HylaFAX+ $ df -h /dev
Filesystem Size Used Avail Use% Mounted on
devfs 64K 64K 0 100% /dev
11 years, 1 month