[libvirt-users] ntpd in VM
by Mauricio Tavares
I was taught in kitty school that running a ntp server in a vm
was a bad idea. Is that still the case?
10 years, 2 months
[libvirt-users] trying but failing - pass-through scsi/sata
by lejeczek
hi everybody
I'd imagine this topic must have been covered, yet I've
failed to find any really helpful and a solid howto/examples
of how to pass-through a sata disks.
currently I'm having this in my xml:
<hostdev mode='subsystem' type='scsi' managed='no'>
<source>
<adapter name='scsi_host4'/>
<address bus='0' target='0' unit='0'/>
</source>
<address type='drive' controller='4' bus='0'
target='0' unit='0'/>
</hostdev>
I took it from
http://libvirt.org/formatdomain.html#elementsHostDevSubsys
yet a Linux guest (SL7) fails to find/detect any disks, if I
dumpxml I get this:
<device>
<name>block_sdb_OCZ_VERTEX4_OCZ_352C77TZVQF1Y3SX</name>
<path>/sys/devices/pci0000:00/0000:00:1f.2/ata5/host4/target4:0:0/4:0:0:0/block/sdb</path>
<parent>scsi_4_0_0_0</parent>
<capability type='storage'>
<block>/dev/sdb</block>
<bus>ata</bus>
<drive_type>disk</drive_type>
<model>OCZ-VERTEX4</model>
<vendor>ATA</vendor>
<serial>OCZ-VERTEX4_OCZ-352C77TZVQF1Y3SX</serial>
<size>128035676160</size>
<logical_block_size>512</logical_block_size>
<num_blocks>250069680</num_blocks>
</capability>
</device>
how do I pass-through sata drives?
any help much appreciated, thanks!
10 years, 2 months
[libvirt-users] QEMU disk migration not using entire connection throughput
by Joaquim Barrera
Hello everybody,
I've been observing that, during the disk migration usign
--copy-storage-inc, the data transfer hardly ever uses the entire
available connection bandwidth (in my case 1 Gb/s), and the migration is
at a non-constant speed. On the other hand, at the memory migration
step, everything goes perfect.
I am almost sure that this is not a nard disk throughput limitation,
because a 'scp' command between the two same machines performs perfectly
right.
Is libvirt (or maybe QEMU?) doing some extra work that may cause slowlyness?
Thanks!
10 years, 2 months
[libvirt-users] Default lib/include dirs location in OS X
by Radek Simko
Hi,
I have installed libvirt via Homebrew = compiled from source
<https://github.com/Homebrew/homebrew/blob/master/Library/Formula/libvirt.rb>
.
Then I wanted to install *ruby-libvirt*
gem install ruby-libvirt
and end up with this error:
/usr/local/Cellar/ruby/2.1.2_3/bin/ruby extconf.rb
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers. Check the mkmf.log file for more details. You
may
need configuration options.
Provided configuration options:
--with-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/usr/local/Cellar/ruby/2.1.2_3/bin/ruby
--with-libvirt-include
--without-libvirt-include
--with-libvirt-lib
--without-libvirt-lib
--with-libvirt-config
--without-libvirt-config
--with-pkg-config
--without-pkg-config
extconf.rb:73:in `<main>': libvirt library not found in default locations
(RuntimeError)
extconf failed, exit code 1
so then I passed the locations of *include* & *lib* directories as the
configuration options:
gem install ruby-libvirt --
--with-libvirt-include=/usr/local/Cellar/libvirt/1.2.7/include
--with-libvirt-lib=/usr/local/Cellar/libvirt/1.2.7/lib
which *worked*, but it's not very clean and effective solution, especially
if you have *ruby-libvirt* as a requirement in your Gemfile and you need to
install it via Bundler.
I reckon that a possible solution would be to change Homebrew formula, so
that it either installs or symlinks both dirs into locations where
*ruby-libvirt* will look for it, but *what's the default location actually*?
--
*Radek Simko*
10 years, 2 months
[libvirt-users] Unable to find security driver for label selinux
by Qiang Guan
Hi experts,
I want to have a test on security driver for libvirt lxc on my debian
system.
What I do is as the following steps:
1) download the source code from git://libvirt.org/libvirt.git
2) compile and install with the source code as following:
./autogen.sh --system
./configure --with-selinux=yes --with-secdriver-selinux=yes
make -j8 & make install
root@debian:~/github/libvirt.git/tools# ./virsh --version=long
Virsh command line tool of libvirt 1.2.8
See web site at http://libvirt.org/
Compiled with support for:
Hypervisors: QEMU/KVM LXC UML OpenVZ VMWare VirtualBox Test
Networking: Remote Network Bridging Interface udev Nwfilter VirtualPort
Storage: Dir Filesystem SCSI Multipath LVM
Miscellaneous: Daemon Nodedev SELinux Secrets Debug Modular
3) then I define a lxc vm with the seclabel :
root@debian:~/images# vir dumpxml lxc
<domain type='lxc'>
<name>lxc</name>
<uuid>b1b787a1-d20e-48bd-938b-16ba61d22405</uuid>
<memory unit='KiB'>419404</memory>
<currentMemory unit='KiB'>419404</currentMemory>
<vcpu placement='static'>1</vcpu>
<resource>
<partition>/machine</partition>
</resource>
<os>
<type arch='x86_64'>exe</type>
<init>/sbin/init</init>
<cmdline>console=tty0 console=ttyS0</cmdline>
</os>
<clock offset='utc'/>
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
<on_crash>destroy</on_crash>
<devices>
<emulator>/usr/local/libexec/libvirt_lxc</emulator>
<filesystem type='mount' accessmode='passthrough'>
<source dir='/tmp/rootfs'/>
<target dir='/'/>
</filesystem>
<console type='pty'>
<target type='lxc' port='0'/>
</console>
</devices>
<seclabel type='dynamic' relabel='yes'/>
</domain
4) When I start the vm, It output an error:
root@debian:~/images# vir start lxc
error: Failed to start domain lxc
error: unsupported configuration: Unable to find security driver for
label selinux
What's the problem?
Really appreciate for any help.
--
------------
Jackie
Best Regards
10 years, 2 months
[libvirt-users] Fwd: Does virsh actually work?
by Gary Hook
On Wed, Sep 3, 2014 at 2:12 PM, Eric Blake <eblake(a)redhat.com> wrote:
> On 09/03/2014 01:05 PM, Gary Hook wrote:
>
> >
> > root@huey:/tmp# virsh migrate --live --p2p
>
> This command does not default to migrating storage,...
>
Oh, you mean like this?
root@huey:/tmp# virsh migrate --live --p2p --copy-storage-all
e7f75b9b-9ed4-4f7e-aa86-e481ab911d6f qemu+ssh://10.10.11.204/system
--verbose
error: Failed to open file
'/mnt/store01/virt/e7f75b9b-9ed4-4f7e-aa86-e481ab911d6f.qcow2': No such
file or directory
Apologies; I should have used this one in the first place. Too many
attempts in the command history....
I'm guessing I"m still missing something...
>
>
> > (huey is 10.10.11.203, dewey is 10.10.11.204; DNS works, but I thought to
> > eliminate that as a source of this problem.) As can be seen, the .qcow2
> > files exists on the source system, and does not exist on the target
> system.
>
> ...therefore, this error message is expected if the storage is not
> already present on the destination.
>
> Migration requires either that you have shared storage (both source and
> destination can see THE SAME FILE, and if one side sees the file via
> NFS, then both sides must see the file via NFS [you can't mix local and
> NFS]). OR, you have to tell migration that you want to migrate storage
> as well as machine state, by adding the --copy-storage-all flag to your
> command line.
>
Understood; perfectly sensible. See above.
> http://libvirt.org/migration.html should document useful information
> such as this; would you like to submit a patch to help improve that web
> page? The sources are in libvirt.git under docs/migration.html.in.
>
Yep, read that page (several times). At such point I have anything of
substance to add, absolutely, yes, I very much want to contribute. I am
just starting out building my skills on KVM and libvirt (background is with
PHYP on Power) but fully intend to become conversant with the packages.
10 years, 2 months
[libvirt-users] Fwd: Does virsh actually work?
by Gary Hook
On Wed, Sep 3, 2014 at 2:12 PM, Brian Rak <brak(a)gameservers.com> wrote:
> Try creating a blank file on the target system at
> /mnt/store01/virt/e7f75b9b-9ed4-4f7e-aa86-e481ab911d6f.qcow2 on 'dewey'.
>
Yes, tried that before posting. At least, with a simple "touch" command.
> Migrations really don't go well when the target disk doesn't exist. I'm
> not certain why this is, I think the migration feature was mainly built
> with shared storage in mind.
>
I appreciate that, but unless it's a documented and designed restriction,
it seems it oughta work. And I know for a fact that it does (details which
I will not include here).
Thank you for your time; much appreciated.
> On 9/3/2014 3:05 PM, Gary Hook wrote:
>
> I have been beating my head against a wall attempting to get virsh to
> migrate a simple VM from one host to another.
>
> I have two systems running Ubuntu 14.04 with libvirt 1.2.2. Yes, they
> are bridged. Non-shared storage. Modest guest VM that only requires 100G of
> disk space; there is far more available.
>
> In trying to accomplish even the simplest migration (per every page I
> can find from both the Fedore Project and Red Hat) I consistently get the
> following results:
>
> root@huey:/tmp# virsh list --all
> Id Name State
> ----------------------------------------------------
> 9 e7f75b9b-9ed4-4f7e-aa86-e481ab911d6f running
> - 81c50b5a-24ef-47d5-88ae-16ee7f4f9537 shut off
> - acd06610-c919-450b-97c8-8e49b9a0d45c shut off
>
> root@huey:/tmp# virsh migrate --live --p2p
> e7f75b9b-9ed4-4f7e-aa86-e481ab911d6f qemu+ssh://10.10.11.204/system
> error: Failed to open file
> '/mnt/store01/virt/e7f75b9b-9ed4-4f7e-aa86-e481ab911d6f.qcow2': No such
> file or directory
>
> root@huey:/tmp# ls -al /mnt/store01/virt
> total 9140768
> drwxr-xr-x 2 libvirt-qemu kvm 4096 Sep 3 10:17 .
> drwxr-xr-x 13 root root 4096 Aug 28 10:39 ..
> -rw-r--r-- 1 libvirt-qemu kvm 3271688192 Aug 29 14:39
> 81c50b5a-24ef-47d5-88ae-16ee7f4f9537.qcow2
> -rw-r--r-- 1 libvirt-qemu kvm 2523136000 Aug 29 14:47
> acd06610-c919-450b-97c8-8e49b9a0d45c.qcow2
> -rw-r--r-- 1 libvirt-qemu kvm 3565486080 Sep 3 13:52
> e7f75b9b-9ed4-4f7e-aa86-e481ab911d6f.qcow2
>
> root@dewey:~ >ls -al /mnt/store01/virt
> total 8
> drwxrwxrwx 2 libvirt-qemu kvm 4096 Sep 3 12:30 .
> drwxr-xr-x 13 root root 4096 Aug 29 16:36 ..
> root@dewey:~ >
>
> (huey is 10.10.11.203, dewey is 10.10.11.204; DNS works, but I thought
> to eliminate that as a source of this problem.) As can be seen, the .qcow2
> files exists on the source system, and does not exist on the target system.
> The directory shown is where images are to be stored. There is no problem
> starting and stopping VMs on the systems. It is not at all clear where the
> failure is occurring; there is no documentation that discusses this
> failure, of course.
>
> I believe that I am invoking a basic migration per every page I can find
> in a web search. Please correct any errors.
>
> I am working as root on both systems, and use ssh to get from one system
> to another, no passwords, no authentication required. All works well.
>
> Any observations, or suggestions as to what configuration parameters I
> should check, would be greatly appreciated.
>
> Thank you.
>
> Gary
>
>
10 years, 2 months
[libvirt-users] Does virsh actually work?
by Gary Hook
I have been beating my head against a wall attempting to get virsh to
migrate a simple VM from one host to another.
I have two systems running Ubuntu 14.04 with libvirt 1.2.2. Yes, they are
bridged. Non-shared storage. Modest guest VM that only requires 100G of
disk space; there is far more available.
In trying to accomplish even the simplest migration (per every page I can
find from both the Fedore Project and Red Hat) I consistently get the
following results:
root@huey:/tmp# virsh list --all
Id Name State
----------------------------------------------------
9 e7f75b9b-9ed4-4f7e-aa86-e481ab911d6f running
- 81c50b5a-24ef-47d5-88ae-16ee7f4f9537 shut off
- acd06610-c919-450b-97c8-8e49b9a0d45c shut off
root@huey:/tmp# virsh migrate --live --p2p
e7f75b9b-9ed4-4f7e-aa86-e481ab911d6f qemu+ssh://10.10.11.204/system
error: Failed to open file
'/mnt/store01/virt/e7f75b9b-9ed4-4f7e-aa86-e481ab911d6f.qcow2': No such
file or directory
root@huey:/tmp# ls -al /mnt/store01/virt
total 9140768
drwxr-xr-x 2 libvirt-qemu kvm 4096 Sep 3 10:17 .
drwxr-xr-x 13 root root 4096 Aug 28 10:39 ..
-rw-r--r-- 1 libvirt-qemu kvm 3271688192 Aug 29 14:39
81c50b5a-24ef-47d5-88ae-16ee7f4f9537.qcow2
-rw-r--r-- 1 libvirt-qemu kvm 2523136000 Aug 29 14:47
acd06610-c919-450b-97c8-8e49b9a0d45c.qcow2
-rw-r--r-- 1 libvirt-qemu kvm 3565486080 Sep 3 13:52
e7f75b9b-9ed4-4f7e-aa86-e481ab911d6f.qcow2
root@dewey:~ >ls -al /mnt/store01/virt
total 8
drwxrwxrwx 2 libvirt-qemu kvm 4096 Sep 3 12:30 .
drwxr-xr-x 13 root root 4096 Aug 29 16:36 ..
root@dewey:~ >
(huey is 10.10.11.203, dewey is 10.10.11.204; DNS works, but I thought to
eliminate that as a source of this problem.) As can be seen, the .qcow2
files exists on the source system, and does not exist on the target system.
The directory shown is where images are to be stored. There is no problem
starting and stopping VMs on the systems. It is not at all clear where the
failure is occurring; there is no documentation that discusses this
failure, of course.
I believe that I am invoking a basic migration per every page I can find in
a web search. Please correct any errors.
I am working as root on both systems, and use ssh to get from one system to
another, no passwords, no authentication required. All works well.
Any observations, or suggestions as to what configuration parameters I
should check, would be greatly appreciated.
Thank you.
Gary
10 years, 2 months