[libvirt-users] Question about vport operation for FC HBA
by Dennis Chen
Hi,
When I want to use NPIV for a FC HBA in my Linux machine, I got the
below error msg in virsh:
virsh # nodedev-create /home/kvm/vHBA.xml
error: Failed to create node device from /home/kvm/vHBA.xml
error: internal error Parent device scsi_host20 is not capable of vport
operations
I checked the /sys/class folder for my HBA device that I want to use its
NPIV feature, it's there:
/sys/class/fc_host/host20/vport_create
I can create a vHBA by using "echo 'xxxx:xxxx' > ./vport_create", a new
fc host will be created after that.
But I can't find any FC host with:
#virsh nodedev-list --cap fc_host
SCSI hosts can be found for above "nodedev-list --cap scsi_host".
The libvirt I am working on is based ver 1.0.5, I checked the code and
found below function is seems related with this issue:
src/util/virutil.c:
int
virIsCapableVport(const char *sysfs_prefix,
int host)
This function looks up if there is "vport_create" file under
/sys/class/fc_host/host20, as the way to decide if a HBA device is
capable of vport operation.
But seems this file is not compiled and virsh doesn't call it in my
source code environment... is there any tips ?
BRs,
Dennis
11 years, 3 months
[libvirt-users] Would a DOS on dovecot running under a VM cause host to crash?
by Hugh Davenport
Hey All,
I'm just wondering whether this is what caused my server to crash.
Started last night in NZ land.
Jun 20 19:22:11 elm dovecot: imap-login: Disconnected (tried to use
disallowed plaintext auth): user=<>, rip=attackerip, lip=10.0.0.3,
session=<0C8LzpDfZQDINsQC>
occasionally get
Jun 20 19:22:52 elm dovecot: imap-login: Disconnected (no auth attempts
in 1 secs): user=<>, rip=attackerip, lip=10.0.0.3,
session=<bHdz0JDfpwDINsQC>
or in 0 secs
last at
Jun 20 19:26:24 elm dovecot: imap-login: Disconnected (tried to use
disallowed plaintext auth): user=<>, rip=attackerip, lip=10.0.0.3,
session=<1MUR3ZDfcwDINsQC>
and a minute later the server lost contact to the world. When I checked
a bit later,
the underlying host machine (dovecot runs on a VM (KVM)) had been
powered off.
Now, here in NZ land, there was also a crazy storm last night, and lots
of brown outs.
There could potentially of been a surge that killed it, but the UPS was
still running
fine when I started it again.
The "attack" lasted around 4 minutes, in which there was 1161 lines in
the log for a
single attacker ip, and no other similar logs previously.
Would this be enough to kill not only the VM running dovecot, but the
underlying host
machine?
All up to date with patches, running debian stable (wheezy).
dovecot-core debian package version 1:2.1.7-7
dovecot version 2.1.7
I notice there is a version 2.2.3 out, but not in debian yet. Could this
fix this
issue? I don't particularly want to have it happen again :D.
The host is running debian oldstable (squeeze), so could update more.
libvirt0 debian package version 0.8.3-5+squeeze5
libvirt version 0.8.3
I notice there is a version 1.0.6 out (debian stable only has
0.9.12-11+deb7u1, which
is 0.9.12), would either of these versions fix an issue like this?
qemu-kvm debian package version 0.12.5+dfsg-5+squeeze10
kernel is 2.6.32-5-amd64
Any thoughts?
Cheers,
Hugh
11 years, 3 months
[libvirt-users] libvirt hang on domain attemp to create domain
by Александр
good day, i am trying to create domain via virDomainDefineXML. and my program
hanging, also i failed to caonnect to libvirt daemon with virt-manager after
this, only killing libvirtd via SIGKILL and restarting it solveing hang (i
mean after restart i able to connect with virt-manager), i using following
domain xml
<?xml version="1.0" encoding="UTF-8"?>
<domain type="kvm">
<tittle>Automatically created domain with default configuration</tittle>
<name>vm1</name>
<description>no description</description>
<os>
<type>hvm</type>
<boot dev="cdrom"/>
<boot dev="hd"/>
</os>
<vcpu>1</vcpu>
<memory unit="MB">512</memory>
<cpu model="host-model">
<topology sockets="1" cores="1" threads="1"/>
</cpu>
<clock offset="localtime"/>
<devices>
<graphics type="vnc" autoport="yes" password="admin"/>
<channel type="unix">
<source mode="bind" path="/var/run/vm1.sock"/>
<target type="virtio" name="org.guest_agent.0"/>
</channel>
</devices>
</domain>
i have this calls on stack
0 0x00007ffff48c1750 __poll_nocancel
1 0x00007ffff649e5ca virNetClientIOEventLoop
2 0x00007ffff649ed96 virNetClientSendInternal
3 0x00007ffff64a0443 virNetClientSendWithReply
4 0x00007ffff64a0daa virNetClientProgramCall
5 0x00007ffff6478566 callFull.isra.2
6 0x00007ffff6487fa2 remoteDomainDefineXML
7 0x00007ffff6449d2f virDomainDefineXML
8 0x0000000000426941 virt_domain::create
/home/sss/install/git/work/avirt/vm_pool/vm_pool/libvirt.cpp 295
9 0x000000000040c1a9 main
/home/sss/install/git/work/avirt/vm_pool/vm_pool/main.cpp 40
what i am doing wrong ?
11 years, 3 months
[libvirt-users] Haswell 4770 misidentified as Sandy Bridge
by Michael Giardino
Hi,
I'm running libvert on a Debian 7 system. I have upgraded libvert and qemu
from source (v1.06 and 1.5.0 respectively) and the problem persists. The
guest OS is also a Debian 7 system running a non-SMP kernel. The error
message from virt-manager is
Error starting domain: unsupported configuration: guest and host CPU are
not compatible: Host CPU does not provide required features: rtm, invpcid,
erms, bmi2, smep, avx2, hle, bmi1, fsgsbase, pcid
Traceback (most recent call last):
File "/usr/share/virt-manager/virtManager/asyncjob.py", line 45, in
cb_wrapper
callback(asyncjob, *args, **kwargs)
File "/usr/share/virt-manager/virtManager/asyncjob.py", line 66, in tmpcb
callback(*args, **kwargs)
File "/usr/share/virt-manager/virtManager/domain.py", line 1114, in
startup
self._backend.create()
File "/usr/local/lib/python2.7/dist-packages/libvirt.py", line 698, in
create
if ret == -1: raise libvirtError ('virDomainCreate() failed', dom=self)
libvirtError: unsupported configuration: guest and host CPU are not
compatible: Host CPU does not provide required features: rtm, invpcid,
erms, bmi2, smep, avx2, hle, bmi1, fsgsbase, pcid
but the host /proc/cpuinfo gives the correct flags as
processor : 7
vendor_id : GenuineIntel
cpu family : 6
model : 60
model name : Intel(R) Core(TM) i7-4770 CPU @ 3.40GHz
stepping : 3
microcode : 0x7
cpu MHz : 800.000
cache size : 8192 KB
physical id : 0
siblings : 8
core id : 3
cpu cores : 4
apicid : 7
initial apicid : 7
fpu : yes
fpu_exception : yes
cpuid level : 13
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat
pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb
rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology
nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx smx
est tm2 ssse3 fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt
tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm ida arat epb
xsaveopt pln pts dtherm tpr_shadow vnmi flexpriority ept vpid fsgsbase
tsc_adjust bmi1 hle avx2 smep bmi2 erms invpcid rtm
bogomips : 6795.91
clflush size : 64
cache_alignment : 64
address sizes : 39 bits physical, 48 bits virtual
power management:
Is there a place in the code I can look where the CPU flags are checked? I
did create this VM on the Debian 7 versions of libvirt and qemu, but I
don't see that it should be much of a problem since you can swap CPUs in
virt-manager.
The end goal is to read Sandy Bridge+ RAPL MSRs from the guest OS.
perf_events are now being exported, which is great for my work, but if I
could read some of those RAPL MSRs, It would make my life orders of
magnitude easier.
Any help would be much appreciated.
Best,
Michael Giardino
<giardino(a)ece.gatech.edu>
<michael.giardino(a)gmail.com>
11 years, 3 months
[libvirt-users] Migration between 2 hosts
by Parakkal, Navin S
Hi ,
How does migration of VMs between 2 hosts work ? Say we want to migrate a VM from host A - > B , does it create a process on B, copy all the data of the process on A to B and then once done kill process on A. Is it how it happens ?
Can someone tell me how the copying of data between process on A and new process on B is done ?
Regards,
Navin
11 years, 3 months
[libvirt-users] Live Migration Without Shared Storage
by cmcc.dylan
I‘m very exited to hear that qemu has supported live migration without shared storage and I also have found some persons give their experiments, for example: (http://blog.allanglesit.com/2011/08/linux-kvm-management-live-migration-without-shared-storage/)
# virsh migrate --live vmname qemu+ssh://kvmnode02.allanglesit.net/system --copy-storage-all --verbose --persistent --undefinesource
I repeated the above experiment, but I failed. I want to know I need which version of qemu and libvirt and how the progress of the new feature.
11 years, 3 months
[libvirt-users] Not able to open Xen Connection using libvirt
by varun bhatnagar
Hi,
I am trying to create virtual machine through libvirt using xen hypervisor.
I was able to install xen successfully but when I tried connecting to the
hypervisor it gave an error. And while installing libvirt (libvirt-1.0.1) I
installed it with xen support.
I am pasting the snapshot of the error below:
[image: Inline image 1]
Can anyone tell me why I am getting this error?
//
Varun
11 years, 3 months
[libvirt-users] Using a Windows partition as libvirt media
by Roland Giesler
I'm running Ubuntu desktop 12.10 with libvirt and virt-manager (gui).
I have been led to believe that it is possible to use and existing
partition as the disk storage volume for a virtual machine.
The windows partition is /dev/sda2, but if I use fs: Pre-formatted Block
Device I can select the partion. What I can't figure out is how to tell
the vitual machine to use this volume.
I tried with virt-manager, but the only options I have are
* Local media
* Network install
* Network Boot
* Import Existing Disk Image
How can I do this?
regards
Roland Giesler
11 years, 3 months
[libvirt-users] Unable to setup qemu-guest-agent
by Nehal J. Wani
Could anyone please list out the steps required to run the command
$virsh qemu-agent-command
Steps that I followed:
1. Clone the latest source code of libvirt
2. Create a vm of f18 (source:liveCD)
3. Edit f18 domain xml and add this:
<channel type='unix'>
<source mode='bind' path='/var/lib/libvirt/qemu/f16x86_64.agent'/>
<target type='virtio' name='org.qemu.guest_agent.0'/>
</channel>
4. On host: #./tools/virsh start f18
5. On guest: #yum install qemu-guest-agent -y
6. On host: # ./tools/virsh qemu-agent-command f18
'{"execute":"guest-network-get-interfaces"}'
Expected Response:
{"return":[{"name":"lo","ip-
addresses":[{"ip-address-type":"ipv4","ip-address":"127.0.0.1","prefix":8},{"ip-address-type":"ipv6","ip-address":"::1","prefix":128}],"hardware-address":"00:00:00:00:00:00"},{"name":"eth0","ip-addresses":[{"ip-address-type":"ipv4","ip-address":"192.168.122.62","prefix":24},{"ip-address-type":"ipv6","ip-address":"fe80::5054:ff:fe14:9998","prefix":64}],"hardware-address":"52:54:00:14:99:98"}]}
Actual result:
(null)
Where am I going wrong?
--
Nehal J. Wani
UG2, BTech CS+MS(CL)
IIIT-Hyderabad
http://commanlinewani.blogspot.com
11 years, 3 months
[libvirt-users] Enabling route_localnet on private network
by McEvoy, James
I have an issue setting a persistent kernel option on a libvirt net device since that device does not exist early enough during the boot of the KVM host.
I am using the 127.0.0.0 local net for cluster communication between the KVM host and its guests as well as between KVM guests. In order to use addresses on the 127.0.0.0/8 network, which is reserved for local communication, two configuration changes must be made after the system is rebooted. First the default route of 127.0.0.1/0 to the loopback device must be deleted which I did by adding an "ip route delete" command to the ifcfg-br0 file that starts the bridged network that is used by the KVM guests. The second configuration change is where I am having trouble. For the second change I need to set the kernel boolean net.ipv4.conf.pvt0.route_localnet to be true to allow routing of the 127.0.0.0/8 on the libvirt net device that I have configured to use addresses on the 127.0.0.0/8 network. Normally I would do this by adding "net.ipv4.conf.pvt0.route_localnet = 1" to /etc/sysctl.conf but this does not work because the libvirt pvt0 device does not exist when the settings in the /etc/sysctl.conf are done.
My question is where can I add the command "/sbin/sysctl -w net.ipv4.conf.pvt0.route_localnet=1" to the start-up files so the command is run after the libvirt device pvt0 has been autostarted?
I am running on RHEL 6.4 x86_64.
--jim
11 years, 3 months