David Robinson | 26 Jun 14:50

Invalid .treeinfo file causes an exception

Hi all,

I tried to install a VM from a tree that had an empty .treeinfo file
(not sure why/how it got there) and got the exception below.

Traceback (most recent call last):
  File "/usr/sbin/virt-install", line 780, in <module>
    main()
  File "/usr/sbin/virt-install", line 678, in main
    start_time, guest.start_install)
  File "/usr/sbin/virt-install", line 733, in do_install
    dom = install_func(conscb, progresscb, wait=(not wait))
  File "/usr/lib/python2.6/site-packages/virtinst/Guest.py", line 539,
in start_install
    self._prepare_install(meter)
  File "/usr/lib/python2.6/site-packages/virtinst/Guest.py", line 594,
in _prepare_install
    meter = meter)
  File "/usr/lib/python2.6/site-packages/virtinst/DistroInstaller.py",
line 233, in prepare
    self._prepare_kernel_and_initrd(guest, distro, meter)
  File "/usr/lib/python2.6/site-packages/virtinst/DistroInstaller.py",
line 182, in _prepare_kernel_and_initrd
    type=self.os_type, distro=distro)
  File "/usr/lib/python2.6/site-packages/virtinst/OSDistro.py", line
133, in acquireKernel
    scratchdir, type, distro)
  File "/usr/lib/python2.6/site-packages/virtinst/OSDistro.py", line
114, in _acquireMedia
    scratchdir=scratchdir, arch=arch)
(Continue reading)

Craig Miskell | 26 Jun 01:49
Favicon

Xen, New VM wizard, paravirt vs full virt

Hi,
   I'm running virt-manager 0.7.0 on Ubuntu, connecting using SSH to libvirt 
running on Debian Lenny Xen-3.2.1 (please, no flames :))

The trouble is, when I go to create a new VM using the wizard, no install 
options are available because:
1) "Network install" is not available unless the connection is local, and
2) Local install media and  Network boot (PXE) are not available because of the 
following line in create.py (around line 340):
is_pv = (self.capsguest.os_type == "xen")

I changed that line to:
is_pv = False
because Xen can do Full Virtualisation these days.  And I'm then able to create 
local CD install of a full virtualisation VM, which boots and works perfectly.

Three questions:

1) Am I missing something, or is the is_pv definition just historical?
2) What's wrong with doing a "Network install" when you're not local; I thought 
(please correct me if wrong) that a Network Install involved passing a URL to 
some sort of install repository; why would that need local access.
3) Why is it not possible to do a Local Install media or PXE boot with a 
para-virtualised guest?

Thanks,

--

-- 
Craig Miskell
Senior Systems Administrator - Linux
(Continue reading)

Guido Günther | 24 Jun 19:57

[PATCH] virt-viewer: start virt-viewer fullscreen mode

Hi,
this is straight from the "showing a vm at Linuxtag in non-fullscreen
mode looks bad" department. It's against 0.0.3 so not appliable as is
but maybe helpful to somebody else.
 -- Guido
_______________________________________________
et-mgmt-tools mailing list
et-mgmt-tools@...
https://www.redhat.com/mailman/listinfo/et-mgmt-tools
Kaspar Brand | 22 Jun 08:38

[PATCH] virtinst: fix canonical OUI for QEMU/KVM MAC addresses

When support for QEMU/KVM MAC addresses was added to virtinst/util.py
last August [1], the first two bytes were inadvertently swapped, AFAICT.

Instead of 54-52-00, the "canonical" prefix for QEMU/KVM addresses
should be 52-54-00, as can be determined from

  http://git.savannah.gnu.org/cgit/qemu.git/tree/net.c#n2124

The attached patch changes all occurrences I found in the virtinst tree
(hopefully I caught them all).

Kaspar

[1] https://www.redhat.com/archives/et-mgmt-tools/2008-August/msg00079.html

diff --git a/man/en/virt-clone.1 b/man/en/virt-clone.1
--- a/man/en/virt-clone.1
+++ b/man/en/virt-clone.1
@@ -257,17 +257,17 @@ Clone a guest to a physical device which
 original guests disks. If the destination device is bigger, the
 new guest can do a filesystem resize when it boots.
 .PP
 .Vb 5
 \&  # virt\-clone \e
 \&       \-\-connect qemu:///system \e
 \&       \-\-name demo \e
 \&       \-\-file /dev/HostVG/DemoVM \e
-\&       \-\-mac 54:52:00:34:11:54
(Continue reading)

Vivek Ayer | 21 Jun 19:55

Can't add Sparc guest under Fedora 11 using virt-manager

Hey guys,

I'm having trouble adding a sparc guest (using qemu-system-sparc)
under virt-manager. I get the following error which choosing sparc for
my architecture:

Unable to complete install '<class 'libvirt.libvirtError'> internal
error Domain Debian_SPARC didn't show up

Traceback (most recent call last):
  File "/usr/share/virt-manager/virtManager/create.py", line 1501, in do_install
    dom = guest.start_install(False, meter = meter)
  File "/usr/lib/python2.6/site-packages/virtinst/Guest.py", line 541,
in start_install
    return self._do_install(consolecb, meter, removeOld, wait)
  File "/usr/lib/python2.6/site-packages/virtinst/Guest.py", line 633,
in _do_install
    self.domain = self.conn.createLinux(install_xml, 0)
  File "/usr/lib/python2.6/site-packages/libvirt.py", line 974, in createLinux
    if ret is None:raise libvirtError('virDomainCreateLinux() failed',
conn=self)
libvirtError: internal error Domain Debian_SPARC didn't show up

My /var/log/libvirt/Debian_SPARC.log file shows:

LC_ALL=C PATH=/sbin:/usr/sbin:/bin:/usr/bin /usr/bin/qemu-system-sparc
-S -M sun4m -m 128 -smp 1 -name Debian_SPARC -uuid
49e1fc31-3630-8921-8be4-6a924224ca9a -monitor pty -pidfile
/var/run/libvirt/qemu//Debian_SPARC.pid -no-reboot -boot d -drive
file=/var/lib/libvirt/images/Debian_SPARC.img,if=ide,index=0 -drive
(Continue reading)

Michal Novotny | 17 Jun 11:01
Favicon

Re: Features request

On 06/17/2009 10:41 AM, Emre Erenoglu wrote:
On Wed, Jun 17, 2009 at 8:28 AM, Michal Novotny <minovotn-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> wrote:
Well, in my opinion you have to consider that virt-manager supports both KVM and Xen so you can't simply give KVM only stuff there. It's like the ac97 card request - Xen doesn't support this card so virt-manager doesn't have a choice to select it at all. In fact, there should be one way for already existing and maybe even domain creation - the information about connection type is stored when we have domain already setup but also, in creating new domain we know (due to virt-manager.log) what hv type will be used - whether kvm or xen so theoretically this should work to compensate the differences between KVM/Xen but I don't know whether it's a right way.

Then why don't we just make an "advanced" field where a user can enter his own parameters to the qemu-kvm binary?
Sounds good, if a user knows the virtualization tool well, he could pass any parameter supported by HV itself so this idea is not bad I think. But like you said, it's the "advanced" feature so that somewhere in virt-manager user should choose or check the advanced interface mode or something similar. I don't think some people don't knowing the HV would like to investigate this so that this should be a new entry in the menu that have to be enabled first. Some item like "Advanced mode" in "View" menu or so...

To your requested features:
1. Bridged networking - yeah, this could be good to be added there not to have to setup the bridge manually

+1 for this one, but with a normal user account in kvm group (not root). Adding to this:

2. Snapshots - like I said, you're referring to KVM so see above, Xen can save the machine to a checkpoint file while not running (ie. this shuts the domain down) or even when running (not shutting the domain down) and I think nothing else is there about that. I don't know about KVM options.
3. Additional networking options - what options do you mean? What would you like to have there?

I would like to open an already created TAP interface. I have a script running at boot time which creates the bridge and as many TAP interfaces as you want, owned by group kvm. Any user who is a member of kvm group can use these tap interfaces to have bridged networking in their virtual machines, without needing privilate escalation or running as root. Therefore:

3.1. Ability to choose a pre-defined TAP interface. (ie, if the OS provides pre-cooked tapX devices read/write by kvm group that one can assign to his VMs). A config, such as:

Example Config Proposal:
<interface type='bridge'> <source bridge='br0'/> <target dev='your_precreated_tap_interface'/> <create dev='no'> <mac address="11:22:33:44:55:66"/> </interface> This is more or less the same thing as bridged networking of libvirt/virt-manager, just skipping the tap device creation part and using an existing tap instead.
Well, ability to use pre-defined TAP interface could be good, that's right.

4. Bridge wireless NIC cards - would this be useful?

It would be, but I think there are technical limitations for bridging a wireless and a wireline card.
I have never tried bridging the wireless cards so I don't know about that. This was just a thought...

Best Regards,
--
Emre
Best regards,
Michal
_______________________________________________ et-mgmt-tools mailing list et-mgmt-tools-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org https://www.redhat.com/mailman/listinfo/et-mgmt-tools

_______________________________________________
et-mgmt-tools mailing list
et-mgmt-tools@...
https://www.redhat.com/mailman/listinfo/et-mgmt-tools
bodhi zazen | 17 Jun 00:13

Features request

I normally run KVM from the command line and it work well.

I appreciate and am impressed with the work that has gone into virt-manager.

I am wondering what the process is to put in requests for additional features ?

I would like to suggest adding some of the command line options to virt-manager, or at least a way to specify options manually.

Options / features I use on a regular basis on the command line not available in virt-manager are :

1. Bridged networking. Yes I know this can be manually configured and once configured works with virt-manager, still would be nice to see this automated.

2. Snapshots. KVM has a rich set of options for snapshots. Boot a snapshot, save changes, save the machine state, etc. Any consideration being given to adding these options.

3. Additional networking options would be nice. Host only , virtual private network.

4. Bridge wireless network cards.

Thank you.

_______________________________________________
et-mgmt-tools mailing list
et-mgmt-tools@...
https://www.redhat.com/mailman/listinfo/et-mgmt-tools
Michal Novotny | 16 Jun 16:24
Favicon

[PATCH] virt-manager: Make virt-manager remember last image directory

Hi,
I've been working with virt-manager and I found out that it doesn't 
remember the last image directory at all so I created a patch that 
writes a configuration to file after the storagebrowse dialog is closed 
but only if user chooses file storage (no device storage). Really useful 
when you use one folder as a domain image storage path and you don't 
want to use default path for KVM/Xen...

If anything, just ask me,
Michal
# HG changeset patch
# User Michal Novotny <minovotn@...>
# Date 1245162093 -7200
# Node ID 73427fcfc222006d7f74ce79277f8432d74d7c52
# Parent  74f1f8309b139af9d84edfb1f0186c2306c0f332
Make virt-manager remember last chosen image directory

Virt-manager never remembers last image directory after choosing file an image
file to be appended to any domain. Since I am having all the domain image files
in the same directory that is not default, this patch saves the last image path
to gconf configuration file and offers it as startfolder next time.

diff -r 74f1f8309b13 -r 73427fcfc222 src/virtManager/addhardware.py
--- a/src/virtManager/addhardware.py	Mon Jun 15 15:54:56 2009 +0200
+++ b/src/virtManager/addhardware.py	Tue Jun 16 16:21:33 2009 +0200
@@ -674,7 +674,7 @@

     def browse_storage_file_address(self, src, ignore=None):
         textent = self.window.get_widget("storage-file-address")
-        folder = self.config.get_default_image_dir(self.vm.get_connection())
+        folder = self.config.get_user_default_image_dir(self.vm.get_connection())
         filename = self._browse_file(_("Locate or Create New Storage File"),
                                      textent, folder=folder,
                                      confirm_overwrite=True)
diff -r 74f1f8309b13 -r 73427fcfc222 src/virtManager/config.py
--- a/src/virtManager/config.py	Mon Jun 15 15:54:56 2009 +0200
+++ b/src/virtManager/config.py	Tue Jun 16 16:21:33 2009 +0200
@@ -237,7 +237,15 @@
     def is_vmlist_network_traffic_visible(self):
         return self.conf.get_bool(self.conf_dir + "/vmlist-fields/network_traffic")

+    def get_user_default_image_dir(self, conn):
+        try:
+            return self.conf.get_value(self.conf_dir + "/paths/default_image_path")
+        except ValueError:
+            return self.get_default_image_dir(conn)

+    def set_user_default_image_dir(self, dir):
+        self.conf.set_value(self.conf_dir + "/paths/default_image_path", dir)
+        logging.debug("Setting path to %s", dir)

     def set_vmlist_domain_id_visible(self, state):
         self.conf.set_bool(self.conf_dir + "/vmlist-fields/domain_id", state)
@@ -556,6 +564,14 @@

 
     def get_default_image_dir(self, connection):
+        # Exception for case connection argument is str (happens when
+        # creating new domains because we don't have connection object)
+        if str(connection) == connection:
+            if connection == "Xen":
+                return DEFAULT_XEN_IMAGE_DIR
+            else:
+                return DEFAULT_VIRT_IMAGE_DIR
+
         if connection.get_type() == "Xen":
             return DEFAULT_XEN_IMAGE_DIR

diff -r 74f1f8309b13 -r 73427fcfc222 src/virtManager/create.py
--- a/src/virtManager/create.py	Mon Jun 15 15:54:56 2009 +0200
+++ b/src/virtManager/create.py	Tue Jun 16 16:21:33 2009 +0200
@@ -1004,7 +1004,8 @@
         self.window.get_widget("config-storage-box").set_sensitive(src.get_active())

     def browse_storage(self, ignore1):
-        f = self._browse_file(_("Locate existing storage"))
+        folder = self.config.get_user_default_image_dir( self.capsdomain.hypervisor_type )
+        f = self._browse_file(_("Locate existing storage"), folder=folder)
         if f != None:
             self.window.get_widget("config-storage-entry").set_text(f)

@@ -1653,7 +1654,6 @@
             self.detectedDistro = (None, None)

     def _browse_file(self, dialog_name, folder=None, is_media=False):
-
         if self.conn.is_remote() or not is_media:
             if self.storage_browser == None:
                 self.storage_browser = vmmStorageBrowser(self.config,
diff -r 74f1f8309b13 -r 73427fcfc222 src/virtManager/storagebrowse.py
--- a/src/virtManager/storagebrowse.py	Mon Jun 15 15:54:56 2009 +0200
+++ b/src/virtManager/storagebrowse.py	Tue Jun 16 16:21:33 2009 +0200
@@ -20,6 +20,7 @@

 import gobject
 import gtk.glade
+import os.path

 import traceback
 import logging
@@ -242,6 +243,11 @@
     def _do_finish(self, path=None):
         if not path:
             path = self.current_vol().get_path()
+
+        # Save path to config if we use file as storage
+        if "/dev" not in path:
+            self.config.set_user_default_image_dir( os.path.dirname(path) )
+
         self.emit("storage-browse-finish", path)
         self.close()

_______________________________________________
et-mgmt-tools mailing list
et-mgmt-tools@...
https://www.redhat.com/mailman/listinfo/et-mgmt-tools
Gianluca Cecchi | 16 Jun 13:33

tftp config for virt-manager or virt-install

Hello,
already posted yesterday to fedora-virt but htis seems more correct
one. Excuse for duplicate.
I'm on a x86_64 F11 host.
I created with success CentOS 5.3 and Windows 2003 vms from iso images.
If I try to create a VM from virt-manager with pxe, I see from ps that
inside the qemu command (tried with both qemu and qemu/kvm)
there is the
-boot n
option, but there aren't any
-tftp dir
and/or
-bootp file
options....

Is there any default for qemu and/or virt-manager?
Also with virt-install I was not able to have it pick up these options....
(tried --extra-args but it doesn't seem the correct way)
ps output is:

root      3577     1 99 14:52 ?        02:37:30 /usr/bin/qemu-kvm -S
-M pc -m 768 -smp 1 -name slackware64 -uuid
4e3c9c56-695a-b5a5-ff87-ab0807b19d63 -monitor pty -pidfile
/var/run/libvirt/qemu//slackware64.pid -no-reboot -boot n -drive
file=/dev/vg_qemu01/slack64,if=ide,index=0 -net
nic,macaddr=54:52:00:56:19:31,vlan=0 -net
tap,fd=19,script=,vlan=0,ifname=vnet3 -serial pty -parallel none -usb
-vnc 127.0.0.1:3 -soundhw es1370

The installation remains in attemp to get the tftp file without
success (it give "no filename" and continues to loop)
It seems that the guest gets one of the available ip provided by
dhcpd, also it founds dhcpd and tftp server: both are set to
192.168.122.1 (the server itself with its virbr0 default bridge interface).
No particular configuration done by me for network.
I see /etc/libvirt/qemu/networks/default.xml with some parameters but
I don't know if and how I can put here also tftp settings....

I also see /var/lib/libvirt/images and tried to create here a pxeboot
dir with pxelinux.0, vmlinuz and initrd.img files but no way...
Is this implemented yet? Any way to pass the tftp parfameters to the
forked qemu command?
Thanks for any pointer to docs that can help.

Bye,
Gianluca
Richard W.M. Jones | 16 Jun 12:33
Favicon

F12 feature: Host information


I posted this page on the wiki last week, which is a feature we intend
to implement for Fedora 12:

http://fedoraproject.org/wiki/Features/Hostinfo

Any comments?

Rich.

  "Allow a virtual machine to see information and statistics from the
  host operating system, under narrow and strictly controlled conditions
  and only at the discretion of the host administrator.

  Detailed Description

  Allow a virtual machine to look at host information (such as number of
  physical, not just virtual CPUs), and statistics like the load on the
  host. Users have asked for this primarily as a diagnostic tool -- for
  example, poor performance of a virtual machine might be caused by
  excessive load on the host.

  Normally we try to isolate virtual machines from accessing any such
  details from the host, and there are very good reasons for that too,
  such as security of the host, commercial confidentiality, and the
  privacy of other virtual machines running on the host. As a result, at
  the moment there is no mechanism for accessing host information.

  We propose to add a feature which allows the host administrator, at
  their discretion, and only of limited data to limited virtual
  machines, to export host information and statistics to virtual
  machines.

  Administrators will need to:

    * explicitly enable this feature,
    * select the virtual machines and/or data they wish to be seen in guests,
    * select the frequency that guests can ask for data. 

  The mechanism will be a daemon running on the host which collects the
  statistics (see below for what). The information will be exported to
  guests over a spare (virtual) serial port or through the qemu/kvm
  vmchannel feature, whichever is available.

  Guests will request information by sending a plain text command to the
  serial port, and will receive information in the form of a simple,
  plain text message. No special drivers or software are required by the
  guest.

--

-- 
Richard Jones, Emerging Technologies, Red Hat  http://et.redhat.com/~rjones
New in Fedora 11: Fedora Windows cross-compiler. Compile Windows
programs, test, and build Windows installers. Over 70 libraries supprt'd
http://fedoraproject.org/wiki/MinGW http://www.annexia.org/fedora_mingw
Michal Novotny | 15 Jun 16:09
Favicon

[PATCH] virt-manager: Fix broken CPU details tab

Hi everybody,
I've recompiled and installed newest libvirt and virt-manager and I 
found out that revision 1135 introduced the exception on CPU details tab 
by renaming get_type() to get_hv_type() so that is the fix for that.

If anything, please let me know.

Thanks,
Michal
# HG changeset patch
# User Michal Novotny <minovotn@...>
# Date 1245074096 -7200
# Node ID 74f1f8309b139af9d84edfb1f0186c2306c0f332
# Parent  f9ad1d0c29d08bbb0ed94df9878d666904d018a2
Make Processor tab item in VM details show correctly

The Processor tab in VM details was not showing at all because of exception.
The exception occured everytime the tab was selected because of call to non
existing function get_type() that has been renamed to get_hv_type() in the
newest version of virt-manager's code by revision 1135.

diff -r f9ad1d0c29d0 -r 74f1f8309b13 src/virtManager/details.py
--- a/src/virtManager/details.py	Thu Jun 04 16:28:40 2009 -0400
+++ b/src/virtManager/details.py	Mon Jun 15 15:54:56 2009 +0200
@@ -945,7 +945,7 @@
         self.window.get_widget("state-host-cpus").set_text("%d" % self.vm.get_connection().host_active_processor_count())
         status = self.vm.status()
         if status in [ libvirt.VIR_DOMAIN_SHUTOFF, libvirt.VIR_DOMAIN_CRASHED ]:
-            cpu_max = self.vm.get_connection().get_max_vcpus(self.vm.get_type())
+            cpu_max = self.vm.get_connection().get_max_vcpus(self.vm.get_hv_type())
             self.window.get_widget("config-vcpus").get_adjustment().upper = cpu_max
             self.window.get_widget("state-vm-maxvcpus").set_text(str(cpu_max))
         else:
_______________________________________________
et-mgmt-tools mailing list
et-mgmt-tools@...
https://www.redhat.com/mailman/listinfo/et-mgmt-tools

Gmane