Commit Graph

17222 Commits

Author SHA1 Message Date
Taowei
40b733e7e2 vbox: Rewrite vboxDomainDestroy 2014-08-15 09:25:11 +02:00
Taowei
25d807d42a vbox: Rewrite vboxDomainDestroyFlags 2014-08-15 09:25:11 +02:00
Taowei
14babb4981 vbox: Rewrite vboxDomainReboot 2014-08-15 09:25:11 +02:00
Taowei
502c43ee44 vbox: Rewrite vboxDomainShutdown 2014-08-15 09:25:11 +02:00
Taowei
67533a8148 vbox: Rewrite vboxDomainShutdownFlags 2014-08-15 09:25:11 +02:00
Taowei
395ecc456e vbox: Rewrite vboxDomainResume 2014-08-15 09:25:11 +02:00
Taowei
8b89505a20 vbox: Rewrite vboxDomainSuspend 2014-08-15 09:25:10 +02:00
Taowei
caba5247fd vbox: Rewrite vboxDomainIsUpdated 2014-08-15 09:25:10 +02:00
Taowei
c9537d13b0 vbox: Rewrite vboxDomainIsPersistent 2014-08-15 09:25:10 +02:00
Taowei
fa2f9abcc1 vbox: Rewrite vboxDomainIsActive 2014-08-15 09:25:10 +02:00
Taowei
2ba3ccbb88 vbox: Rewrite vboxDomainLookupByName 2014-08-15 09:25:10 +02:00
Taowei
856ceb8cb3 vbox: Rewrite vboxDomainCreateXML 2014-08-15 09:25:10 +02:00
Taowei
e979ad3991 vbox: Rewrite vboxDomainCreate 2014-08-15 09:25:10 +02:00
Taowei
815d17398c vbox: Rewrite vboxDomainCreateWithFlags 2014-08-15 09:25:10 +02:00
Taowei
34364df3c6 vbox: Rewrite vboxDomainDefineXML 2014-08-15 09:25:10 +02:00
Taowei
e60e8da4cb vbox: Rewrite vboxDomainUndefineFlags 2014-08-15 09:25:10 +02:00
Taowei
e89a93c071 vbox: Rewrite vboxDomainLookupByUUID 2014-08-15 09:25:10 +02:00
Taowei
9dd4f8eded vbox: Rewrite vboxDomainLookupById 2014-08-15 09:25:10 +02:00
Taowei
5f15b511e9 vbox: Rewrite vboxConnectNumOfDomains 2014-08-15 09:25:10 +02:00
Taowei
0958334ac0 vbox: Rewrite vboxConnectListDomains 2014-08-15 09:25:10 +02:00
Taowei
30a95f30ef vbox: Rewrite vboxConnectGetCapabilities 2014-08-15 09:25:10 +02:00
Taowei
82513be8ba vbox: Rewrite vboxConnectGetMaxVcpus 2014-08-15 09:25:10 +02:00
Taowei
427931ae0c vbox: Rewrite vboxConnectIsAlive 2014-08-15 09:25:10 +02:00
Taowei
16dcbaf09b vbox: Rewrite vboxConnectIsEncrypted 2014-08-15 09:25:10 +02:00
Taowei
3a959b36fd vbox: Rewrite vboxConnectIsSecure 2014-08-15 09:25:10 +02:00
Taowei
86142d8e9a vbox: Rewrite vboxConnectGetHostname 2014-08-15 09:25:09 +02:00
Taowei
6e906ffa91 vbox: Rewrite vboxConnectGetVersion 2014-08-15 09:25:09 +02:00
Taowei
7e052265c9 vbox: Rewrite vboxDomainSave
All vbox objects are child objects from the nsISupports in vbox's
C++ API version. Since the CAPI is generated from the C++ API, I
kept their relationship here, by the definitations below:

typedef struct nsISupports nsISupports;
typedef nsISupports IVirtualBox;
typedef nsISupports ISession;
and so on...

So, when calling the API from nsISupports, we don't need to do
typecasting, and things work still work well.
2014-08-15 09:25:09 +02:00
Taowei
c6084f19d0 vbox: Rewrite vboxConnectClose 2014-08-15 09:25:09 +02:00
Taowei
7f0f415b87 vbox: Begin to rewrite, vboxConnectOpen
Introduce vbox_uniformed_api to deal with version conflicts. Use
vbox_install_api to register the currect vboxUniformedAPI with
vbox version.

vboxConnectOpen has been rewritten.
2014-08-15 09:25:09 +02:00
Laine Stump
7809615056 network: fix crash when starting a network with no <pf> element
Martin Kletzander pointed out in email that my commit 2a193f64
introduced a crash in networkCreateInterfacePool() during startup of
any network that doesn't have a <pf> subelement of its <forward>
element. He also supplied a patch.

 http://www.redhat.com/archives/libvir-list/2014-August/msg00655.html

I expanded on that patch by cleaning up now-extraneous checks in the
callers of networkCreateInterfacePool().

Fortunately the offending patch hasn't been in any release, and hasn't
been (to my knowledge) backported to any other branch.
2014-08-15 02:42:52 -04:00
Jim Fehlig
62c817e516 src/xenxs: Refactor code formating vif device config
Handle formating of VIF config in a new function xenFormatXMVif().

Signed-off-by: Kiarie Kahurani <davidkiarie4@gmail.com>
2014-08-14 11:49:53 -06:00
Kiarie Kahurani
2e2ac1ed4a src/xenxs: Refactor code formating peripheral device config
introduce functions
  xenFormatXMSound
  xenFormatXMInputDevs(virConfPtr conf,....);
which formats peripheral device config instead

Signed-off-by: Kiarie Kahurani <davidkiarie4@gmail.com>
2014-08-14 11:49:53 -06:00
Kiarie Kahurani
a54b4144fb src/xenxs: Refactor code formating Vfb config
introduce function
   xenFormatXMVfb(virConfPtr conf,.........);
which formats Vfb config instead

Signed-off-by: Kiarie Kahurani <davidkiarie4@gmail.com>
2014-08-14 11:49:53 -06:00
Kiarie Kahurani
5c5cac8ced src/xenxs: Refactor code formating OS config
introduce functions
   xenFormatXMEmulator(virConfPtr conf,........);
   xenFormatXMCDROM(virConfPtr conf, .......);
   xenFormatXMOS(virConfPtr conf,........);
which formats OS and associated config instead

Signed-off-by: Kiarie Kahurani <davidkiarie4@gmail.com>
Signed-off-by: Jim Fehlig <jfehlig@suse.com>
2014-08-14 11:49:53 -06:00
Kiarie Kahurani
208660e046 src/xenxs: Refactor code formating CPU config
introduce functions
  xenFormatXMCPUAllocation(virConfPtr conf, ......);
  xenFormatXMCPUFeatures(virConfPtr conf, ......);
which formats CPU allocation and features config

Signed-off-by: Kiarie Kahurani <davidkiarie4@gmail.com>
Signed-off-by: Jim Fehlig <jfehlig@suse.com>
2014-08-14 11:49:53 -06:00
Kiarie Kahurani
f8ad0198a1 src/xenxs: Refactor code formating xm disk config
introduce function
  xenFormatXMDisks(virConfPtr conf,.........);
which formats domain disks config instead

Signed-off-by: Kiarie Kahurani <davidkiarie4@gmail.com>
Signed-off-by: Jim Fehlig <jfehlig@suse.com>
2014-08-14 11:49:53 -06:00
Kiarie Kahurani
5dde1629fb src/xenxs: Refactor code formating Char devices config
introduce function
   xenFormatXMCharDev(virConfPtr conf,........);
which formats Char devices config instead

Signed-off-by: Kiarie Kahurani <davidkiarie4@gmail.com>
Signed-off-by: Jim Fehlig <jfehlig@suse.com>
2014-08-14 11:49:53 -06:00
Kiarie Kahurani
c849d01c5e src/xenxs: Refactor code formating event actions config
introduce function
   xenFormatXMEventActions(virConfPtr conf,.........);
which formats event actions instead

Signed-off-by: Kiarie Kahurani <davidkiarie4@gmail.com>
2014-08-14 11:49:53 -06:00
Kiarie Kahurani
a7de003a94 src/xenxs: Refactor code formating virtual time config
introduce function
  xenFormatXMTimeOffset(virConfPtr conf,........);
which formats time config instead

Signed-off-by: Kiarie Kahurani <davidkiarie4@gmail.com>
Signed-off-by: Jim Fehlig <jfehlig@suse.com>
2014-08-14 11:49:53 -06:00
Kiarie Kahurani
8faab08c14 src/xenxs: Refactor code formating memory config
introduce function
   xenFormatXMMem(virConfPtr conf,...........);
which parses memory config instead

Signed-off-by: Kiarie Kahurani <davidkiarie4@gmail.com>
2014-08-14 11:49:52 -06:00
Kiarie Kahurani
44650e91b9 src/xenxs: Refactor code formating general VM config
introduce function
  xenFormatXMGeneralMeta(virConfPtr conf,......);
which parses uuid and name instead

Signed-off-by: Kiarie Kahurani <davidkiarie4@gmail.com>
Signed-off-by: Jim Fehlig <jfehlig@suse.com>
2014-08-14 11:49:52 -06:00
Pavel Hrdina
0c35a415f7 qemu_process: fix memleak found by coverity
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2014-08-14 19:33:06 +02:00
Jianwei Hu
2a8fabba18 Maximum vlanid should be 4095 in interface.rng
The correct vlanid range is 0~4095.

After merging this patch, we can not validate a interface xml with vlanid >= 4096.
[root@localhost ~]# cat vlan.xml
<interface type='vlan' name='eno1.4096'>
   <start mode='onboot'/>
   <protocol family='ipv4'>
    <dhcp/>
   </protocol>
   <vlan tag='4096'>
     <interface name='eno1'/>
   </vlan>
</interface>
[root@localhost ~]# virt-xml-validate vlan.xml
vlan.xml:1: element interface: Relax-NG validity error : Invalid sequence in interleave
vlan.xml:6: element vlan: Relax-NG validity error : Element interface failed to validate content
vlan.xml:6: element vlan: Relax-NG validity error : Element vlan failed to validate attributes
vlan.xml fails to validate
[root@localhost ~]#

Here is a ip command help on this.
[root@localhost /]# ip link add link eno1 name eno1.90 type vlan help
Usage: ... vlan [ protocol VLANPROTO ] id VLANID                [ FLAG-LIST ]
                [ ingress-qos-map QOS-MAP ] [ egress-qos-map QOS-MAP ]

VLANPROTO: [ 802.1Q / 802.1ad ]
VLANID := 0-4095
FLAG-LIST := [ FLAG-LIST ] FLAG
FLAG := [ reorder_hdr { on | off } ] [ gvrp { on | off } ] [ mvrp { on | off } ]
        [ loose_binding { on | off } ]
QOS-MAP := [ QOS-MAP ] QOS-MAPPING
QOS-MAPPING := FROM:TO
2014-08-14 15:04:11 +02:00
Richard Weinberger
41885a0224 LXC: Fix virLXCControllerSetupDevPTS() wrt user namespaces
The gid value passed to devpts has to be translated by hand as
virLXCControllerSetupDevPTS() is called before setting up the user
and group mappings.
Otherwise devpts will use an unmapped gid and openpty()
will fail within containers.
Linux kernel commit 23adbe12
("fs,userns: Change inode_capable to capable_wrt_inode_uidgid")
uncovered that issue.

Signed-off-by: Richard Weinberger <richard@nod.at>
Signed-off-by: Ján Tomko <jtomko@redhat.com>
2014-08-14 14:32:49 +02:00
Jianwei Hu
49cd6815d6 docs: fix missing forward slash
Should like below:
    <interface type='server'>
      <mac address='52:54:00:22:c9:42'/>
      <source address='192.168.0.1' port='5558'/>
    </interface>
    ...
    <interface type='client'>
      <mac address='52:54:00:8b:c9:51'/>
      <source address='192.168.0.1' port='5558'/>
    </interface>
2014-08-14 12:22:30 +02:00
Sam Bobroff
f0f9eed843 qemu: Tidy up job handling during live migration
During a QEMU live migration several warning messages about job
handling could be written to syslog on the destination host:

"entering monitor without asking for a nested job is dangerous"

The messages are written because the job handling during migration
uses hard coded asyncJob values in several places that are incorrect.

This patch passes the required asyncJob value around and prevents
the warnings as well as any issues that the warnings may be referring
to.

https://bugzilla.redhat.com/show_bug.cgi?id=1130089

Signed-off-by: Sam Bobroff <sam.bobroff@au1.ibm.com>
Signed-off-by: Ján Tomko <jtomko@redhat.com>
2014-08-14 12:12:42 +02:00
Jincheng Miao
3f03398dbe build: force configure failed when perl is missing
Perl is necessary to our build processing, it will invoke a lot of
generating script, like: gendispatch.pl. If perl is missing, it's
ok for build from git checkout, because autogen.sh will tell you.
But for compiling from a release tarball, configure will just record
a missing message, and continue, then build failed, like:
https://www.redhat.com/archives/libvirt-users/2014-August/msg00050.html

So need to enhance configure script to handle this negative case.

Reported-by: Hongbin Lu <hongbin@savinetwork.ca>
Signed-off-by: Jincheng Miao <jmiao@redhat.com>
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
2014-08-14 11:28:18 +02:00
Mo yuxiang
ca8ef1df3b conf: fix parsing 'cmd_per_lun' and 'max_sectors'
commit d9504941 introduces two new attributes "cmd_per_lun" and
"max_sectors" same with the names QEMU uses for virtio-scsi.
But the case of parsing them is not exact. Change to parse
them if controller has "driver" element.

Signed-off-by: Mo yuxiang <moyuxiang@huawei.com>
2014-08-14 10:25:57 +02:00
Chen Hanxiao
bd3b76e355 LXC: resolve issues in lxcDomainSetMaxMemory
This patch changes the setmaxmem function to support the '--live',
'--config', and '--current' flags by revectoring the code through
the setmem function using the VIR_DOMAIN_MEM_MAXIMUM flag. The
setmem code is refactored to handle both cases depending on the flag.

The changed maxmem code for the MEM_MAXIMUM path will not allow
modification to the memory values of an active guest unless the --config
switch is used.

Signed-off-by: Chen Hanxiao <chenhanxiao@cn.fujitsu.com>
2014-08-13 17:40:28 -04:00