[libvirt] Re: libvirt and bios image file selection

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Sorry, there were a wrong patch.

This one is correct.

В Tue, 1 Sep 2009 12:08:02 +0400
"Scaldov M.V." <scaldov@xxxxxxxxx> пишет:

> libvirt xml config does not have possibility to select another bios
> file for qemu or kvm.
> 
> As to XEN and other hypervisors, I dont know how it is realized. But
> for kvm/qemu here is a patch.
> 
> Now it can be controlled via xml domain config:
> 
> <biosfile>bios-alternative.bin</biosfile>
> 
> Miroslav Scaldov
diff -drc libvirt-0.6.5.old/NEWS libvirt-0.6.5/NEWS
*** libvirt-0.6.5.old/NEWS	2009-05-29 20:38:48.000000000 +0400
--- libvirt-0.6.5/NEWS	2009-09-01 12:23:08.000000000 +0400
***************
*** 5,10 ****
--- 5,66 ----
         http://libvirt.org/news.html
  
  
+ 0.6.5: Jul  3 2009:
+    - New features: create storage columes on disk backend (Henrik Persson),
+           drop of capabilities based on libcap-ng when possible (Daniel
+           Berrange)
+    - Portability: fix build on non-Linux targets (Daniel Berrange)
+    - Documentation: typo and english fixes (Runa Bhattacharjee and
+           Garry Dolley), Docs on extending APIs (Dave Allan), cleanup
+           of debug and logging documentation (Amy Griffis), add
+           HACKING doc to the website (Daniel Berrange),
+           documentation for OpenNebula driver (Abel Miguez Rodriguez)
+    - Bug fixes: forbid autostart on transcient networks,
+           xen device removal crash (Daniel Berrange), re-detection of
+           transient VMs after libvirtd restart(Daniel Berrange),
+           bug in virFindFileInPath (Daniel Berrange), handle new
+           availheap sysctl in Xen (Daniel Berrange), allow USB hostdev
+           product 0 (Cole Robinson), cleanup when creating a storage pool
+           fails (Henrik Persson), domain id fix on redefinition in
+           test driver (Cole Robinson), fix raw storage allocation (Cole
+           Robinson), memory reporting for inactive qemu drivers (Cole
+           Robinson), segfault if storage pool has no type attribute (Cole
+           Robinson), OpenNebula compilation issues (Javier Fontan),
+           dominfo command without security driver (Daniel Berrange),
+           domain state problems after migration or destroy (Federico
+           Simoncelli), leak in node device parsing (Dave Allan),
+           storage pool definitions reading at startup (Cole Robinson),
+           bogus WWN in NPIV support (David Allan), avoid a segfault with
+           recent Xen (Sascha), cope with libnuma failures on weird
+           topologies (Dan Berrange), crash in QEMU driver with bad capabilities
+           data (Dan Berrange), trying to re-create a pool should not destroy
+           it (Dave Allan), endless loop in node device XML dump (Cole Robinson),
+           Re-label shared and readonly images (Dan Berrange)
+    - Improvements: create and destroy NPIV support (David Allan),
+           networking in UML driver (Daniel Berrange), HAL driver restart
+           thread safety (Daniel Berrange), capabilities and nodeinfo
+           APIs for LXC (Daniel Berrange), iNUMA API for VBox (Daniel Berrange),
+           dynamically search and use kvm-img qemu-img or qcow-create (Doug
+           Goldstein), fix qemu and kvm version parsing (Mark McLoughlin),
+           serial number for HAL storage (Dave Allan), improve error reporting
+           for virConnectOpen URIs (Daniel Berrange), include OS driver name
+           in device XML (Daniel Berrange), fix qemu command flags fetching
+           (Cole Robinson), check that qemu support -drive format= (Cole
+           Robinson), improve emulator detection (Cole Robinson), changes
+           to config parser to accomodate VMX syntax (Matthias Bolte),
+           update network schemas and driver for missing elements (Satoru SATOH),
+           avoid changing file context if not needed (Tim Waugh),
+           skip labelling if no src path (Cole Robinson), add arm emulation
+           if qemu-system-arm is present (C.J. Adams-Collier)
+    - Cleanups: daemon check logging env variables (Daniel Berrange),
+           User Mode Linux start and stop cleanups (Daniel Berrange),
+           share the NUMA api implementations (Daniel Berrange), storage
+           module dependancies (Dave Allan), refactor storage XML parsing
+           (Cole Robinson), big cleanup of logging code (Amy Griffis),
+           superfluous % on format (Matthias Bolte), cleanups and updates
+           on OpenNebula driver (Daniel Berrange and Abel Miguez Rodriguez)
+ 
+ 
  0.6.4: May 29 2009:
     - New features: new API virStorageVolCreateXMLFrom (Cole Robinson),
            full VBox graphic capabilities (Pritesh Kothari), Interface config
diff -drc libvirt-0.6.5.old/src/domain_conf.c libvirt-0.6.5/src/domain_conf.c
*** libvirt-0.6.5.old/src/domain_conf.c	2009-06-25 17:45:54.000000000 +0400
--- libvirt-0.6.5/src/domain_conf.c	2009-09-01 12:23:08.000000000 +0400
***************
*** 2222,2227 ****
--- 2222,2230 ----
      if (virXPathULong(conn, "string(./currentMemory[1])", ctxt, &def->memory) < 0)
          def->memory = def->maxmem;
  
+     def->cpumodel = virXPathString(conn, "string(./cpumodel[1])", ctxt);
+     def->biosfile = virXPathString(conn, "string(./biosfile[1])", ctxt);
+ 
      if (virXPathULong(conn, "string(./vcpu[1])", ctxt, &def->vcpus) < 0)
          def->vcpus = 1;
  
diff -drc libvirt-0.6.5.old/src/domain_conf.h libvirt-0.6.5/src/domain_conf.h
*** libvirt-0.6.5.old/src/domain_conf.h	2009-06-17 12:30:44.000000000 +0400
--- libvirt-0.6.5/src/domain_conf.h	2009-09-01 12:23:08.000000000 +0400
***************
*** 459,464 ****
--- 459,466 ----
  
      unsigned long memory;
      unsigned long maxmem;
+     char *cpumodel;
+     char *biosfile;
      unsigned long vcpus;
      int cpumasklen;
      char *cpumask;
diff -drc libvirt-0.6.5.old/src/qemu_conf.c libvirt-0.6.5/src/qemu_conf.c
*** libvirt-0.6.5.old/src/qemu_conf.c	2009-07-03 17:07:21.000000000 +0400
--- libvirt-0.6.5/src/qemu_conf.c	2009-09-01 12:23:08.000000000 +0400
***************
*** 973,978 ****
--- 973,980 ----
           strstr(emulator, "x86_64")))
          cpu = "qemu32";
  
+     if(def->cpumodel) cpu = def->cpumodel;
+ 
  #define ADD_ARG_SPACE                                                   \
      do { \
          if (qargc == qarga) {                                           \
***************
*** 1065,1070 ****
--- 1067,1078 ----
      ADD_ARG_LIT(emulator);
      ADD_ARG_LIT("-S");
  
+     if(def->biosfile)
+     {
+         ADD_ARG_LIT("-bios");
+         ADD_ARG_LIT(def->biosfile);
+     }
+ 
      /* This should *never* be NULL, since we always provide
       * a machine in the capabilities data for QEMU. So this
       * check is just here as a safety in case the unexpected

Attachment: signature.asc
Description: PGP signature

--
Libvir-list mailing list
Libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]