From wangjihai at huawei.com Mon Jun 1 07:16:21 2009 From: wangjihai at huawei.com (Arthur Wang) Date: Mon, 01 Jun 2009 15:16:21 +0800 Subject: [fedora-virt] how to build iso from virt-p2v References: <200905250921375077225@huawei.com> <200905270944249344637@huawei.com> <20090527071802.GG1267@amd.home.annexia.org> Message-ID: <200906011516196835414@huawei.com> Thank you for your advice, i have solved the proxy problem after set as you say. but i meet a new error, the error log is as follows: Retrieving http://download.fedora.redhat.com/pub/fedora/linux/releases/10/Everything/i386/os/Packages/strace-4.5.18-1.fc10.i386.rpm ...OK Retrieving http://download.fedora.redhat.com/pub/fedora/linux/releases/10/Everything/i386/os/Packages/slang-2.1.4-1.fc10.i386.rpm ...OK Retrieving http://download.fedora.redhat.com/pub/fedora/linux/releases/10/Everything/i386/os/Packages/cyrus-sasl-lib-2.1.22-19.fc10.i386.rpm ...OK Retrieving http://download.fedora.redhat.com/pub/fedora/linux/releases/10/Everything/i386/os/Packages/libx86-1.1-3.fc10.i386.rpm ...OK Traceback (most recent call last): File "/usr/share/yum-cli/callback.py", line 124, in callback fd = os.open(rpmloc, os.O_RDONLY) OSError: [Errno 2] No such file or directory: '/var/tmp/imgcreate-FmND9q/install_root/var/cache/yum/updates/packages/setup-2.7.4-4.fc10.noarch.rpm' error: python callback > failed, aborting! make: *** [build] error 1 My build entironment is fedora 10. 2009-06-01 Sender? Richard W.M. Jones Send time? 2009-05-27 15:20:27 Receiver? Arthur Wang Copyto? Fedora-virt Topic? Re: [fedora-virt] how to build iso from virt-p2v On Wed, May 27, 2009 at 09:44:25AM +0800, Arthur Wang wrote: > And i guess it is the repo command to cause this error, for the two line as follows > repo --name=released --baseurl=http://download.fedora.redhat.com/pub/fedora/linux/releases/9/Everything/i386/os/ > repo --name=updates --baseurl=http://download.fedora.redhat.com/pub/fedora/linux/updates/9/i386/ > the reason is that in my company i have to use proxy for network access , but i don't know which tools repo command comes from , and how to set its proxy. Could you give me some suggestion? thank you. This is a kickstart script, and the 'repo' command is part of kickstart. See: http://www.redhat.com/docs/en-US/Red_Hat_Enterprise_Linux/5/html/Installation_Guide/ch-kickstart2.html http://www.redhat.com/docs/en-US/Red_Hat_Enterprise_Linux/5/html/Installation_Guide/s1-kickstart2-options.html I actually have no idea how to specify a proxy for kickstart - it doesn't seem to be covered in the manual. However you might try setting the environment variables $http_proxy and/or $ftp_proxy to point to your internal proxy. eg: export http_proxy=http://11.22.33.44:3128/ Rich. -- Richard Jones, Emerging Technologies, Red Hat http://et.redhat.com/~rjones virt-top is 'top' for virtual machines. Tiny program with many powerful monitoring features, net stats, disk stats, logging, etc. http://et.redhat.com/~rjones/virt-top -------------- next part -------------- An HTML attachment was scrubbed... URL: From rjones at redhat.com Mon Jun 1 12:58:22 2009 From: rjones at redhat.com (Richard W.M. Jones) Date: Mon, 1 Jun 2009 13:58:22 +0100 Subject: [fedora-virt] how to build iso from virt-p2v In-Reply-To: <200906011516196835414@huawei.com> References: <200905250921375077225@huawei.com> <200905270944249344637@huawei.com> <20090527071802.GG1267@amd.home.annexia.org> <200906011516196835414@huawei.com> Message-ID: <20090601125822.GB3413@amd.home.annexia.org> On Mon, Jun 01, 2009 at 03:16:21PM +0800, Arthur Wang wrote: > Thank you for your advice, i have solved the proxy problem after set as you say. but i meet a new error, the error log is as follows: > Retrieving http://download.fedora.redhat.com/pub/fedora/linux/releases/10/Everything/i386/os/Packages/strace-4.5.18-1.fc10.i386.rpm ...OK > Retrieving http://download.fedora.redhat.com/pub/fedora/linux/releases/10/Everything/i386/os/Packages/slang-2.1.4-1.fc10.i386.rpm ...OK > Retrieving http://download.fedora.redhat.com/pub/fedora/linux/releases/10/Everything/i386/os/Packages/cyrus-sasl-lib-2.1.22-19.fc10.i386.rpm ...OK > Retrieving http://download.fedora.redhat.com/pub/fedora/linux/releases/10/Everything/i386/os/Packages/libx86-1.1-3.fc10.i386.rpm ...OK > Traceback (most recent call last): > File "/usr/share/yum-cli/callback.py", line 124, in callback > fd = os.open(rpmloc, os.O_RDONLY) > OSError: [Errno 2] No such file or directory: '/var/tmp/imgcreate-FmND9q/install_root/var/cache/yum/updates/packages/setup-2.7.4-4.fc10.noarch.rpm' > error: python callback > failed, aborting! > make: *** [build] error 1 > My build entironment is fedora 10. This looks a lot like a livecd-creator problem / bug. One suggestion is to make sure /var/tmp and any other directories that livecd-creator might have are on the local machine (eg. not NFS mounted etc). But apart from that I don't know. You'll have to ask the livecd devs: http://www.redhat.com/mailman/listinfo/fedora-livecd-list Rich. -- Richard Jones, Emerging Technologies, Red Hat http://et.redhat.com/~rjones virt-top is 'top' for virtual machines. Tiny program with many powerful monitoring features, net stats, disk stats, logging, etc. http://et.redhat.com/~rjones/virt-top From flaks at bnl.gov Mon Jun 1 21:01:48 2009 From: flaks at bnl.gov (Leonid Flaks) Date: Mon, 01 Jun 2009 17:01:48 -0400 Subject: [fedora-virt] Problem installing KVM gueast on LMV Message-ID: <4A2441BC.6060102@bnl.gov> Hi! I am trying to install KVM guest on fedora 10 host system using virt-install command: virt-install \ --connect qemu:///system \ --accelerate \ --vnc \ --ram 512 \ --name test \ --mac 00:16:3E:70:8C:D0 \ --network bridge:br0 \ --disk path=/dev/vg-virt/LV1 \ --os-type=linux \ --os-variant=fedora10 \ --location http://mycompany.local.mirror/fedora/releases/10/Fedora/x86_64/os \ -x "ip=dhcp kssendmac ksdevice=bootif noipv6 ks=http://myweb.server/ks/virt-system/ks-test-bnl-f10-64.cfg" All goes well to the point when anaconda is trying to do partitioning. At this moment I see error on the screen - "Error allocating requested partitions. Partitioning failed. Could not allocate partitions as primary partitions. Not enough space left to create partition /boot. Press OK to exit the installer." kickstart has the following partitions information: part /boot --asprimary --fstype="ext3" --size=100 part / --fstype="ext3" --size=2000 part swap --fstype="swap" --size=500 part /var/log --fstype="ext3" --size=250 part /usr --fstype="ext3" --size=1 --grow /dev/vg-virt/LV1 is 9G - should be plenty of space. I think the LVM information is not being passed to anaconda for some reason. I had very similar setup on fedora 8 with Xen and it works fine. Is there anything specific to KVM on fedora 10 that I missed? Thanks, Leon From cochranb at speakeasy.net Mon Jun 1 21:14:22 2009 From: cochranb at speakeasy.net (Robert L Cochran) Date: Mon, 01 Jun 2009 17:14:22 -0400 Subject: [Fwd: Re: [fedora-virt] Hostdev XML Not Working (Libvirt)] Message-ID: <4A2444AE.7050709@speakeasy.net> Well, I do understand that virt-install and libguestfs are very important, but I hope there can be some attention focused on my tiny problem. Or perhaps I should file a bug? Bob -------- Original Message -------- Subject: Re: [fedora-virt] Hostdev XML Not Working (Libvirt) Date: Wed, 27 May 2009 17:28:36 -0400 From: Robert L Cochran To: Cole Robinson CC: fedora-virt at redhat.com On 05/27/2009 10:23 AM, Cole Robinson wrote: > Robert L Cochran wrote: > >> Why doesn't the hostdev xml shown below for a USB device work? I've >> shown the entire block for context. >> >> >> /usr/bin/qemu-kvm >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> The USB device of interest to me is an FTDI FT232RL chip. When I plug >> the board into a USB port on the host, I want it to be passed through to >> my Ubuntu guest so that it can be seen as /dev/ttyUSB0. The guest >> doesn't see it. I took the product and vendor id numbers from the >> /var/log/messages output, and these might be in hexadecimal (and I >> should be writing e.g.. I might also be getting the >> physical handling of the device wrong: maybe it needs to be already >> plugged in at the time the Ubuntu guest is started up, or maybe I should >> start the guest first and then plug in the device? >> >> Advice appreciated. >> >> Bob Cochran >> >> > > For future reference, easiest way to get device product + vendor info is > to use 'lsusb'. > > I think you need to use the hex format you mention above to get this to > work correctly ( ...). Also, make sure that the > device is still listed in the domain xml when you use 'virsh > dumpxml': this will guarantee that libvirt is at least > recognizing the new xml. > > You can also check /var/log/libvirt/qemu/.log to see what QEMU > command line libvirt is generating, which helps debugging these issues. > > - Cole > > > Cole, Thanks for your response. I modified the file /etc/libvirt/qemu/Ubuntu9.xml so that it looks like this: Ubuntu9 cb8c3d15-fe92-1bf2-5676-03370743e815 1572864 1572864 1 hvm destroy restart restart /usr/bin/qemu-kvm My interest is getting the Ubuntu machine to recognize the FTDI device indicated in the entry you see above. I did not start the virtual machine or actually plug the USB device of interest into an available port at this point. Instead I ran 'virsh' as you suggested above. Here is the output: [root at deafeng3 qemu]# virsh dumpxml Ubuntu9 Ubuntu9 cb8c3d15-fe92-1bf2-5676-03370743e815 1572864 1572864 1 hvm destroy restart restart /usr/bin/qemu-kvm At this point, I plugged in the USB device I am interested in and again ran 'virsh', repeating the command above. Here is the output: [root at deafeng3 qemu]# virsh dumpxml Ubuntu9 Ubuntu9 cb8c3d15-fe92-1bf2-5676-03370743e815 1572864 1572864 1 hvm destroy restart restart /usr/bin/qemu-kvm I'm not sure what device 0103:1771 is. Here is the output of lsusb. Notice the device on bus 007 device 003. This is what I want the Ubuntu machine to see and manage. [root at deafeng3 qemu]# lsusb Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub Bus 007 Device 002: ID 0403:6001 Future Technology Devices International, Ltd FT232 USB-Serial (UART) IC Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub Bus 001 Device 006: ID 0c45:63f8 Microdia Bus 001 Device 011: ID 045e:0084 Microsoft Corp. Basic Optical Mouse Bus 001 Device 010: ID 046d:c315 Logitech, Inc. Classic New Touch Keyboard Bus 001 Device 009: ID 051d:0002 American Power Conversion Uninterruptible Power Supply Bus 001 Device 012: ID 413c:8153 Dell Computer Corp. Bus 001 Device 013: ID 413c:8154 Dell Computer Corp. Bus 001 Device 003: ID 413c:2513 Dell Computer Corp. Bus 001 Device 008: ID 0a5c:4500 Broadcom Corp. Bus 001 Device 007: ID 413c:8149 Dell Computer Corp. Bus 001 Device 004: ID 413c:2513 Dell Computer Corp. Bus 001 Device 002: ID 0424:2512 Standard Microsystems Corp. Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 005 Device 002: ID 0a5c:5800 Broadcom Corp. Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub Bus 008 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub Lastly, you wondered what command line qemu is using. I checked /var/log/libvirt/qemu and at the very start of the file I see this: LC_ALL=C PATH=/sbin:/usr/sbin:/bin:/usr/bin /usr/bin/qemu-kvm -S -M pc -m 1536 -smp 1 -name Ubuntu9 -uuid cb8c3d15-fe92-1bf2-5676-03370743e815 -monitor pty -pidfile /var/run/libvirt/qemu//Ubuntu9.pid -no-reboot -boot d -drive file=/home/rlc/Download/ubuntu-9.04-desktop-i386.iso,if=ide,media=cdrom,index=2 -drive file=/var/lib/libvirt/images/Ubuntu9.img,if=virtio,index=0 -net nic,macaddr=54:52:00:74:32:2f,vlan=0,model=virtio -net tap,fd=18,script=,vlan=0,ifname=vnet0 -serial pty -parallel none -usb -vnc 127.0.0.1:0 char device redirected to /dev/pts/1 char device redirected to /dev/pts/2 info cpus * CPU #0: pc=0x00000000000ffff0 thread_id=3476 cont balloon 1536 info balloon balloon: actual=1536 info balloon balloon: actual=1536 info balloon balloon: actual=1536 info balloon balloon: actual=1536 info balloon balloon: actual=1536 [above two lines repeat for a few thousand lines] Advice appreciated. How can I get the USB device to work? By the way, I thought I have an installed virtual machine on my hard drive, so I'm a little puzzled that the reference -drive file=/home/rlc/Download/ubuntu-9.04-desktop-i386.iso still exists in the qemu-kvm command line. Am I still starting up from the iso image? I'm confused. Bob -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: Attached Message Part URL: From redhat-lists at anselcomputers.com Tue Jun 2 02:06:56 2009 From: redhat-lists at anselcomputers.com (Michael Ansel) Date: Mon, 1 Jun 2009 22:06:56 -0400 Subject: [fedora-virt] Problem installing KVM gueast on LMV In-Reply-To: <4A2441BC.6060102@bnl.gov> References: <4A2441BC.6060102@bnl.gov> Message-ID: <98eec0f70906011906o78ef5169y95c76cf803407c25@mail.gmail.com> Did you check to see if SELinux is blocking something? I know I've had problems loading ISOs sometimes, and I'm not sure what the policy module for libvirt allows and denies regarding direct block device access. Though, under F10, SETroubleshoot should be running and pop up a window if there is something being blocked, so I have a feeling it might be something more complex. :-/ Michael On Mon, Jun 1, 2009 at 5:01 PM, Leonid Flaks wrote: > Hi! > I am trying to install KVM guest on fedora 10 host system using virt-install > command: > > virt-install \ > ? ? ? ?--connect qemu:///system \ > ? ? ? ?--accelerate \ > ? ? ? ?--vnc \ > ? ? ? ?--ram 512 \ > ? ? ? ?--name test \ > ? ? ? ?--mac 00:16:3E:70:8C:D0 \ > ? ? ? ?--network bridge:br0 \ > ? ? ? ?--disk path=/dev/vg-virt/LV1 \ > ? ? ? ?--os-type=linux \ > ? ? ? ?--os-variant=fedora10 \ > ? ? ? ?--location > http://mycompany.local.mirror/fedora/releases/10/Fedora/x86_64/os \ > ? ? ? ?-x "ip=dhcp kssendmac ksdevice=bootif noipv6 > ks=http://myweb.server/ks/virt-system/ks-test-bnl-f10-64.cfg" > > All goes well to the point when anaconda is trying to do partitioning. At > this moment I see error on the screen - "Error allocating requested > partitions. Partitioning failed. Could not allocate partitions as primary > partitions. Not enough space left to create partition /boot. Press OK to > exit the installer." > > kickstart has the following partitions information: > > part /boot --asprimary --fstype="ext3" --size=100 > part / --fstype="ext3" --size=2000 > part swap --fstype="swap" --size=500 > part /var/log --fstype="ext3" --size=250 > part /usr --fstype="ext3" --size=1 --grow > > /dev/vg-virt/LV1 is 9G - should be plenty of space. > > I think the LVM information is not being passed to anaconda for some reason. > > I had very similar setup on fedora 8 with Xen and it works fine. Is there > anything specific to KVM on fedora 10 that I missed? > > Thanks, > > Leon > > _______________________________________________ > Fedora-virt mailing list > Fedora-virt at redhat.com > https://www.redhat.com/mailman/listinfo/fedora-virt > From rjones at redhat.com Tue Jun 2 09:18:56 2009 From: rjones at redhat.com (Richard W.M. Jones) Date: Tue, 2 Jun 2009 10:18:56 +0100 Subject: [Fwd: Re: [fedora-virt] Hostdev XML Not Working (Libvirt)] In-Reply-To: <4A2444AE.7050709@speakeasy.net> References: <4A2444AE.7050709@speakeasy.net> Message-ID: <20090602091856.GA23876@amd.home.annexia.org> On Mon, Jun 01, 2009 at 05:14:22PM -0400, Robert L Cochran wrote: > Well, I do understand that virt-install and libguestfs are very > important, but I hope there can be some attention focused on my tiny > problem. Or perhaps I should file a bug? Yes - also try on libvir-list since it's a libvirt problem. Rich. -- Richard Jones, Emerging Technologies, Red Hat http://et.redhat.com/~rjones virt-df lists disk usage of guests without needing to install any software inside the virtual machine. Supports Linux and Windows. http://et.redhat.com/~rjones/virt-df/ From rjones at redhat.com Tue Jun 2 09:21:36 2009 From: rjones at redhat.com (Richard W.M. Jones) Date: Tue, 2 Jun 2009 10:21:36 +0100 Subject: [fedora-virt] Problem installing KVM gueast on LMV In-Reply-To: <4A2441BC.6060102@bnl.gov> References: <4A2441BC.6060102@bnl.gov> Message-ID: <20090602092136.GB23876@amd.home.annexia.org> On Mon, Jun 01, 2009 at 05:01:48PM -0400, Leonid Flaks wrote: > I think the LVM information is not being passed to anaconda for some reason. The command looks OK, but I can tell you it's unlikely to be the above reason that's causing it to fail. Have you tried using the shell ([Alt]+[F2]) during the install to see how large the disk is? I think it's far more likely to be a plain bug in anaconda. Rich. -- Richard Jones, Emerging Technologies, Red Hat http://et.redhat.com/~rjones virt-df lists disk usage of guests without needing to install any software inside the virtual machine. Supports Linux and Windows. http://et.redhat.com/~rjones/virt-df/ From rjones at redhat.com Tue Jun 2 13:37:35 2009 From: rjones at redhat.com (Richard W.M. Jones) Date: Tue, 2 Jun 2009 14:37:35 +0100 Subject: [fedora-virt] Re: virt-inspector calling guestfs_umount_all() before launch()? In-Reply-To: <20090528215320.GB16996@amd.home.annexia.org> References: <4A1DBA10.90601@dyfis.net> <4A1DBBC8.5060805@dyfis.net> <20090528083930.GA13154@amd.home.annexia.org> <20090528085733.GA13234@amd.home.annexia.org> <4A1EFC3D.700@dyfis.net> <20090528211353.GA16996@amd.home.annexia.org> <4A1EFFD9.1090309@dyfis.net> <20090528215320.GB16996@amd.home.annexia.org> Message-ID: <20090602133735.GA24882@amd.home.annexia.org> On Thu, May 28, 2009 at 10:53:20PM +0100, Richard W.M. Jones wrote: > On Thu, May 28, 2009 at 04:19:21PM -0500, Charles Duffy wrote: > > Just curious -- do you intend to push the patch ("-snapshot" in > > virt-inspector) into the tree? > > I guess we can, but is there a better way? Right, had a think about this over the weekend, found and read the qemu documentation, and I have added this patch: http://git.et.redhat.com/?p=libguestfs.git;a=commitdiff;h=bfdc03be234d6d95f18450846433bce4f97e184c It adds a 'guestfs_add_drive_ro' call, which is equivalent to the qemu parameter: -drive file=,snapshot=on I've also updated virt-inspector so that it mounts all drives using this flag. That copes with the simple/common case. For more complex cases, use the guestfs_config function. I'm not intending to map the entire qemu parameter space into the libguestfs API. For a start, they keep changing it, and we're tied to qemu anyhow. Rich. -- Richard Jones, Emerging Technologies, Red Hat http://et.redhat.com/~rjones Read my programming blog: http://rwmj.wordpress.com Fedora now supports 75 OCaml packages (the OPEN alternative to F#) http://cocan.org/getting_started_with_ocaml_on_red_hat_and_fedora From charles at dyfis.net Tue Jun 2 13:51:53 2009 From: charles at dyfis.net (Charles Duffy) Date: Tue, 2 Jun 2009 08:51:53 -0500 Subject: [fedora-virt] Re: virt-inspector calling guestfs_umount_all() before launch()? In-Reply-To: <20090602133735.GA24882@amd.home.annexia.org> References: <4A1DBA10.90601@dyfis.net> <4A1DBBC8.5060805@dyfis.net> <20090528083930.GA13154@amd.home.annexia.org> <20090528085733.GA13234@amd.home.annexia.org> <4A1EFC3D.700@dyfis.net> <20090528211353.GA16996@amd.home.annexia.org> <4A1EFFD9.1090309@dyfis.net> <20090528215320.GB16996@amd.home.annexia.org> <20090602133735.GA24882@amd.home.annexia.org> Message-ID: On Tue, Jun 2, 2009 at 8:37 AM, Richard W.M. Jones wrote: > On Thu, May 28, 2009 at 10:53:20PM +0100, Richard W.M. Jones wrote: > > On Thu, May 28, 2009 at 04:19:21PM -0500, Charles Duffy wrote: > > > Just curious -- do you intend to push the patch ("-snapshot" in > > > virt-inspector) into the tree? > > > > I guess we can, but is there a better way? > > Right, had a think about this over the weekend, found and read the > qemu documentation, and I have added this patch: > > > http://git.et.redhat.com/?p=libguestfs.git;a=commitdiff;h=bfdc03be234d6d95f18450846433bce4f97e184c > > It adds a 'guestfs_add_drive_ro' call, which is equivalent to the qemu > parameter: -drive file=,snapshot=on Yay! That said -- might I suggest that guestfish use add_drive_ro() for all --add options if --ro is specified on the command line at startup? I'll happily work up a patch myself once I get into the office in a few hours, if you'd prefer. -------------- next part -------------- An HTML attachment was scrubbed... URL: From m.a.young at durham.ac.uk Tue Jun 2 14:00:55 2009 From: m.a.young at durham.ac.uk (M A Young) Date: Tue, 2 Jun 2009 15:00:55 +0100 (BST) Subject: [fedora-virt] Problem installing KVM gueast on LMV In-Reply-To: <4A2441BC.6060102@bnl.gov> References: <4A2441BC.6060102@bnl.gov> Message-ID: On Mon, 1 Jun 2009, Leonid Flaks wrote: > All goes well to the point when anaconda is trying to do partitioning. At > this moment I see error on the screen - "Error allocating requested > partitions. Partitioning failed. Could not allocate partitions as primary > partitions. Not enough space left to create partition /boot. Press OK to exit > the installer." > > kickstart has the following partitions information: > > part /boot --asprimary --fstype="ext3" --size=100 > part / --fstype="ext3" --size=2000 > part swap --fstype="swap" --size=500 > part /var/log --fstype="ext3" --size=250 > part /usr --fstype="ext3" --size=1 --grow > > /dev/vg-virt/LV1 is 9G - should be plenty of space. Is it empty? Do you have a line like clearpart --linux in your kickstart file? This might be a kickstart problem, not a virtualization one. Michael Young From rjones at redhat.com Tue Jun 2 14:11:36 2009 From: rjones at redhat.com (Richard W.M. Jones) Date: Tue, 2 Jun 2009 15:11:36 +0100 Subject: [fedora-virt] Re: virt-inspector calling guestfs_umount_all() before launch()? In-Reply-To: References: <4A1DBA10.90601@dyfis.net> <4A1DBBC8.5060805@dyfis.net> <20090528083930.GA13154@amd.home.annexia.org> <20090528085733.GA13234@amd.home.annexia.org> <4A1EFC3D.700@dyfis.net> <20090528211353.GA16996@amd.home.annexia.org> <4A1EFFD9.1090309@dyfis.net> <20090528215320.GB16996@amd.home.annexia.org> <20090602133735.GA24882@amd.home.annexia.org> Message-ID: <20090602141136.GA25368@amd.home.annexia.org> On Tue, Jun 02, 2009 at 08:51:53AM -0500, Charles Duffy wrote: > On Tue, Jun 2, 2009 at 8:37 AM, Richard W.M. Jones wrote: > > > On Thu, May 28, 2009 at 10:53:20PM +0100, Richard W.M. Jones wrote: > > > On Thu, May 28, 2009 at 04:19:21PM -0500, Charles Duffy wrote: > > > > Just curious -- do you intend to push the patch ("-snapshot" in > > > > virt-inspector) into the tree? > > > > > > I guess we can, but is there a better way? > > > > Right, had a think about this over the weekend, found and read the > > qemu documentation, and I have added this patch: > > > > > > http://git.et.redhat.com/?p=libguestfs.git;a=commitdiff;h=bfdc03be234d6d95f18450846433bce4f97e184c > > > > It adds a 'guestfs_add_drive_ro' call, which is equivalent to the qemu > > parameter: -drive file=,snapshot=on > > > Yay! > > That said -- might I suggest that guestfish use add_drive_ro() for all --add > options if --ro is specified on the command line at startup? > > I'll happily work up a patch myself once I get into the office in a few > hours, if you'd prefer. Yes, good idea, please send a patch. Rich. -- Richard Jones, Emerging Technologies, Red Hat http://et.redhat.com/~rjones virt-p2v converts physical machines to virtual machines. Boot with a live CD or over the network (PXE) and turn machines into Xen guests. http://et.redhat.com/~rjones/virt-p2v From flaks at bnl.gov Tue Jun 2 14:52:05 2009 From: flaks at bnl.gov (Leonid Flaks) Date: Tue, 02 Jun 2009 10:52:05 -0400 Subject: [fedora-virt] Problem installing KVM gueast on LMV In-Reply-To: References: <4A2441BC.6060102@bnl.gov> Message-ID: <4A253C95.4060302@bnl.gov> M A Young wrote: > On Mon, 1 Jun 2009, Leonid Flaks wrote: > >> All goes well to the point when anaconda is trying to do >> partitioning. At this moment I see error on the screen - "Error >> allocating requested partitions. Partitioning failed. Could not >> allocate partitions as primary partitions. Not enough space left to >> create partition /boot. Press OK to exit the installer." >> >> kickstart has the following partitions information: >> >> part /boot --asprimary --fstype="ext3" --size=100 >> part / --fstype="ext3" --size=2000 >> part swap --fstype="swap" --size=500 >> part /var/log --fstype="ext3" --size=250 >> part /usr --fstype="ext3" --size=1 --grow >> >> /dev/vg-virt/LV1 is 9G - should be plenty of space. > > Is it empty? Do you have a line like > clearpart --linux > in your kickstart file? This might be a kickstart problem, not a > virtualization one. > > Michael Young Michael, It was empty, but I never had this 'clearpart --linux' line in kickstart. I just added it and it seems to do the trick! Interestingly enough I did not use it before for kickstarting fedora 10 xen guest on fedora 8 xen host. Thanks for help! Leon From m.a.young at durham.ac.uk Tue Jun 2 15:02:48 2009 From: m.a.young at durham.ac.uk (M A Young) Date: Tue, 2 Jun 2009 16:02:48 +0100 (BST) Subject: [fedora-virt] Problem installing KVM gueast on LMV In-Reply-To: <4A253C95.4060302@bnl.gov> References: <4A2441BC.6060102@bnl.gov> <4A253C95.4060302@bnl.gov> Message-ID: On Tue, 2 Jun 2009, Leonid Flaks wrote: > It was empty, but I never had this 'clearpart --linux' line in kickstart. > I just added it and it seems to do the trick! > > Interestingly enough I did not use it before for kickstarting fedora 10 xen > guest on fedora 8 xen host. It depends (or should depend) on what is already in the disk area you are using. If you have used that disk area before, even if it is with a newly created LV, then the installer would see partitions so try to fit the install into the (possibly empty) space that was still free. clearpart --linux tells it to throw away any existing linux partitions. If the area really was blank then it looks like there was an anaconda bug. Michael Young From charles at dyfis.net Tue Jun 2 17:05:51 2009 From: charles at dyfis.net (Charles Duffy) Date: Tue, 02 Jun 2009 12:05:51 -0500 Subject: [fedora-virt] Re: virt-inspector calling guestfs_umount_all() before launch()? In-Reply-To: <20090602141136.GA25368@amd.home.annexia.org> References: <4A1DBA10.90601@dyfis.net> <4A1DBBC8.5060805@dyfis.net> <20090528083930.GA13154@amd.home.annexia.org> <20090528085733.GA13234@amd.home.annexia.org> <4A1EFC3D.700@dyfis.net> <20090528211353.GA16996@amd.home.annexia.org> <4A1EFFD9.1090309@dyfis.net> <20090528215320.GB16996@amd.home.annexia.org> <20090602133735.GA24882@amd.home.annexia.org> <20090602141136.GA25368@amd.home.annexia.org> Message-ID: <4A255BEF.20203@dyfis.net> Richard W.M. Jones wrote: > On Tue, Jun 02, 2009 at 08:51:53AM -0500, Charles Duffy wrote: > >> That said -- might I suggest that guestfish use add_drive_ro() for all --add >> options if --ro is specified on the command line at startup? >> > Yes, good idea, please send a patch. > Attached. -------------- next part -------------- A non-text attachment was scrubbed... Name: libguestfs-guestfish_add_ro.patch Type: text/x-patch Size: 2446 bytes Desc: not available URL: From rjones at redhat.com Tue Jun 2 18:18:58 2009 From: rjones at redhat.com (Richard W.M. Jones) Date: Tue, 2 Jun 2009 19:18:58 +0100 Subject: [fedora-virt] Re: virt-inspector calling guestfs_umount_all() before launch()? In-Reply-To: <4A255BEF.20203@dyfis.net> References: <20090528083930.GA13154@amd.home.annexia.org> <20090528085733.GA13234@amd.home.annexia.org> <4A1EFC3D.700@dyfis.net> <20090528211353.GA16996@amd.home.annexia.org> <4A1EFFD9.1090309@dyfis.net> <20090528215320.GB16996@amd.home.annexia.org> <20090602133735.GA24882@amd.home.annexia.org> <20090602141136.GA25368@amd.home.annexia.org> <4A255BEF.20203@dyfis.net> Message-ID: <20090602181858.GA27050@amd.home.annexia.org> On Tue, Jun 02, 2009 at 12:05:51PM -0500, Charles Duffy wrote: > Richard W.M. Jones wrote: >> On Tue, Jun 02, 2009 at 08:51:53AM -0500, Charles Duffy wrote: >> >>> That said -- might I suggest that guestfish use add_drive_ro() for all --add >>> options if --ro is specified on the command line at startup? >>> >> Yes, good idea, please send a patch. >> > Attached. Thanks - I've applied it. Rich. -- Richard Jones, Emerging Technologies, Red Hat http://et.redhat.com/~rjones virt-top is 'top' for virtual machines. Tiny program with many powerful monitoring features, net stats, disk stats, logging, etc. http://et.redhat.com/~rjones/virt-top From flaks at bnl.gov Tue Jun 2 20:23:57 2009 From: flaks at bnl.gov (Leonid Flaks) Date: Tue, 02 Jun 2009 16:23:57 -0400 Subject: [fedora-virt] Problem installing KVM gueast on LMV In-Reply-To: References: <4A2441BC.6060102@bnl.gov> <4A253C95.4060302@bnl.gov> Message-ID: <4A258A5D.4070301@bnl.gov> M A Young wrote: > On Tue, 2 Jun 2009, Leonid Flaks wrote: > >> It was empty, but I never had this 'clearpart --linux' line in >> kickstart. >> I just added it and it seems to do the trick! >> >> Interestingly enough I did not use it before for kickstarting fedora >> 10 xen guest on fedora 8 xen host. > > It depends (or should depend) on what is already in the disk area you > are using. If you have used that disk area before, even if it is with > a newly created LV, then the installer would see partitions so try to > fit the install into the (possibly empty) space that was still free. > clearpart --linux tells it to throw away any existing linux > partitions. If the area really was blank then it looks like there was > an anaconda bug. > > Michael Young Disk area was not empty (most likely). I used the same system for xen host/guest systems and never needed this anaconda statement although I re-installed different guests there many times. I do not use it in kickstarts of real (not virtual) systems neither - I preserve some non-system partitions over re-installations and in both cases anaconda works just fine. I'll take it as KVM specific feature, which is fine as long as I know about it. Again, thanks for help, Leon From markmc at redhat.com Wed Jun 3 13:11:24 2009 From: markmc at redhat.com (Mark McLoughlin) Date: Wed, 03 Jun 2009 14:11:24 +0100 Subject: [fedora-virt] ANNOUNCE: Rawhide virt repo for F11 users In-Reply-To: <1242913633.28844.46.camel@blaa> References: <1242754355.9151.8.camel@blaa> <1242913633.28844.46.camel@blaa> Message-ID: <1244034684.5001.134.camel@blaa> On Thu, 2009-05-21 at 14:47 +0100, Mark McLoughlin wrote: > On Tue, 2009-05-19 at 18:32 +0100, Mark McLoughlin wrote: > > Hey, > > The idea[1] was discussed here before, so I'll keep this short. > > > > We've set up a repository for people running Fedora 11 who would like > > to test the rawhide/F12 virt packages. To use it, do e.g. > > > > $> cat > /etc/yum.repos.d/fedora-virt-preview.repo << EOF > > [rawvirt] > > name=Virtualization Rawhide for Fedora 11 > > baseurl=http://markmc.fedorapeople.org/virt-preview/f11/$basearch/ > > enabled=1 > > gpgcheck=0 > > EOF > > $> yum update > > > > At the moment, it contains the F-12 versions of libvirt and qemu, but > > as F-12 development continues, it will contain more. I'll send periodic > > mails to the list detailing the latest updates. > > Latest updates: Just pushed latest libvirt: * Fri May 29 2009 Daniel Veillard - 0.6.4-1.fc12 - Upstream release of 0.6.4 - new APIs - fixes for latests QEmu/KVM versions - various assorted fixes * Mon May 25 2009 Mark McLoughlin - 0.6.3-11.fc12 - Bring up the bridge, even if it doesn't have an IP address (bug #501912) Cheers, Mark. From markmc at redhat.com Wed Jun 3 16:28:03 2009 From: markmc at redhat.com (Mark McLoughlin) Date: Wed, 03 Jun 2009 17:28:03 +0100 Subject: [fedora-virt] ANNOUNCE: Rawhide virt repo for F11 users In-Reply-To: <1244034684.5001.134.camel@blaa> References: <1242754355.9151.8.camel@blaa> <1242913633.28844.46.camel@blaa> <1244034684.5001.134.camel@blaa> Message-ID: <1244046483.5001.180.camel@blaa> On Wed, 2009-06-03 at 14:11 +0100, Mark McLoughlin wrote: > On Thu, 2009-05-21 at 14:47 +0100, Mark McLoughlin wrote: > > On Tue, 2009-05-19 at 18:32 +0100, Mark McLoughlin wrote: > > > Hey, > > > The idea[1] was discussed here before, so I'll keep this short. > > > > > > We've set up a repository for people running Fedora 11 who would like > > > to test the rawhide/F12 virt packages. To use it, do e.g. > > > > > > $> cat > /etc/yum.repos.d/fedora-virt-preview.repo << EOF > > > [rawvirt] > > > name=Virtualization Rawhide for Fedora 11 > > > baseurl=http://markmc.fedorapeople.org/virt-preview/f11/$basearch/ > > > enabled=1 > > > gpgcheck=0 > > > EOF > > > $> yum update > > > > > > At the moment, it contains the F-12 versions of libvirt and qemu, but > > > as F-12 development continues, it will contain more. I'll send periodic > > > mails to the list detailing the latest updates. > > > > Latest updates: > > Just pushed latest libvirt: And now this qemu update: * Wed Jun 3 2009 Mark McLoughlin - 2:0.10.50-5.kvm86 - Prevent locked cdrom eject - fixes hang at end of anaconda installs (#501412) - Avoid harmless 'unhandled wrmsr' warnings (#499712) Cheers, Mark. From charles at dyfis.net Wed Jun 3 23:43:07 2009 From: charles at dyfis.net (Charles Duffy) Date: Wed, 03 Jun 2009 18:43:07 -0500 Subject: [fedora-virt] Installing kernel packages under libguestfs In-Reply-To: <20090529111314.GB4185@thinkpad.fab.redhat.com> References: <4A1FBE07.9010405@dyfis.net> <20090529111314.GB4185@thinkpad.fab.redhat.com> Message-ID: <4A270A8B.1050105@dyfis.net> I've attached two patches to the bugzilla ticket, [https://bugzilla.redhat.com/attachment.cgi?id=346476] and [https://bugzilla.redhat.com/attachment.cgi?id=346475], which resolve the issue for me. Short story: initramfs can't be bind mounted. (I actually ran into this several months back on one of my own projects, but failed to remember it in this context until recently). As our /dev is on an initramfs filesystem, the attempt to bind mount it into /sysroot/dev was failing. Mounting a tmpfs filesystem on /dev before running MAKEDEV works around the core issue. Using --rbind rather than --bind for the bind mounts around --command is a relatively minor enhancement, making any other mounts under /dev, /sys and /proc (such as /dev/pts) visible to commands running in the guest. From rjones at redhat.com Thu Jun 4 07:41:54 2009 From: rjones at redhat.com (Richard W.M. Jones) Date: Thu, 4 Jun 2009 08:41:54 +0100 Subject: [fedora-virt] Installing kernel packages under libguestfs In-Reply-To: <4A270A8B.1050105@dyfis.net> References: <4A1FBE07.9010405@dyfis.net> <20090529111314.GB4185@thinkpad.fab.redhat.com> <4A270A8B.1050105@dyfis.net> Message-ID: <20090604074154.GA4207@amd.home.annexia.org> On Wed, Jun 03, 2009 at 06:43:07PM -0500, Charles Duffy wrote: > I've attached two patches to the bugzilla ticket, > [https://bugzilla.redhat.com/attachment.cgi?id=346476] and > [https://bugzilla.redhat.com/attachment.cgi?id=346475], which resolve > the issue for me. > > Short story: initramfs can't be bind mounted. (I actually ran into this > several months back on one of my own projects, but failed to remember it > in this context until recently). As our /dev is on an initramfs > filesystem, the attempt to bind mount it into /sysroot/dev was failing. Ugh ... Thanks for working this one out. I did some experiments locally here but I couldn't replicate why just the directories were being copied in the bind mount. Now I know why. > Mounting a tmpfs filesystem on /dev before running MAKEDEV works around > the core issue. > > Using --rbind rather than --bind for the bind mounts around --command is > a relatively minor enhancement, making any other mounts under /dev, /sys > and /proc (such as /dev/pts) visible to commands running in the guest. Yes, the patches both look good. I'll apply them shortly. Thanks again, Rich. -- Richard Jones, Emerging Technologies, Red Hat http://et.redhat.com/~rjones Read my programming blog: http://rwmj.wordpress.com Fedora now supports 75 OCaml packages (the OPEN alternative to F#) http://cocan.org/getting_started_with_ocaml_on_red_hat_and_fedora From rjones at redhat.com Thu Jun 4 16:04:02 2009 From: rjones at redhat.com (Richard W.M. Jones) Date: Thu, 4 Jun 2009 17:04:02 +0100 Subject: [fedora-virt] ANNOUNCE: libguestfs 1.0.41 released Message-ID: <20090604160217.GA6495@amd.home.annexia.org> [This is the only time I'll send this announcement to qemu-devel] I'm pleased to announce the release of a new stable version of libguestfs, the library for accessing and modifying virtual machine disk images. Based on around qemu and Linux kernel code, this can be used as a library or from scripts to make batch configuration changes to guests, view and edit config files inside guests, and much more. http://et.redhat.com/~rjones/libguestfs/ Source: http://et.redhat.com/~rjones/libguestfs/files/libguestfs-1.0.41.tar.gz Fedora 11+ packages: (Available soon in F11 updates-testing or directly from Koji: http://koji.fedoraproject.org/koji/buildinfo?buildID=104824) RHEL/CentOS 5 packages: (Being uploaded to EPEL now, available soon) Debian packages: http://www.annexia.org/tmp/debian/ Since the last announcement, many bugs have been fixed and features added. The main highlights are: - squashfs and cramfs support - better support for read-only access to drives - many problems with string handling in different language bindings have been fixed - internationalization support - ext4 support improved on RHEL 5 - improved support for running commands in the guest - support for skipping tests - lvresize and ext2/3 resize support - pvremove, vgremove, lvremove commands - sleep command - IRC channel #libguestfs on FreeNode Bugs fixed: 501761 - libguestfs requires qemu, not qemu-system-x86 or qemu-system-ppc 501878 - guestfish built-in commands like 'alloc' and 'help' don't autocomplete 501883 - javadoc messed up in libguestfs java documentation 501885 - Doesn't detect missing Java, --with-java-home=no should not be needed 501892 - OptString parameters not handled properly in bindings 502309 - libguestfs build failure - tests occasionally fail with 'ranlib: './libmlguestfs.a': No such file' 502533 - Polish translation of libguestfs 503133 - "mkdir-p" should not throw errors on preexisting directories 503135 - cramfs and squashfs modules should be available in libguestfs appliances 503169 - libguestfs /dev is too sparse for kernel installation/upgrade Thanks to Charles Duffy for a number of patches and suggestions. Rich. -- Richard Jones, Emerging Technologies, Red Hat http://et.redhat.com/~rjones libguestfs lets you edit virtual machines. Supports shell scripting, bindings from many languages. http://et.redhat.com/~rjones/libguestfs/ See what it can do: http://et.redhat.com/~rjones/libguestfs/recipes.html From markmc at redhat.com Fri Jun 5 10:24:19 2009 From: markmc at redhat.com (Mark McLoughlin) Date: Fri, 05 Jun 2009 11:24:19 +0100 Subject: [fedora-virt] ANNOUNCE: Rawhide virt repo for F11 users In-Reply-To: <1244046483.5001.180.camel@blaa> References: <1242754355.9151.8.camel@blaa> <1242913633.28844.46.camel@blaa> <1244034684.5001.134.camel@blaa> <1244046483.5001.180.camel@blaa> Message-ID: <1244197459.27876.0.camel@blaa> Hi, Latest update to virt-preview repo: * Fri Jun 5 2009 Mark McLoughlin - 2:0.10.50-6.kvm86 - Fix 'kernel requires an x86-64 CPU' error - BuildRequires ncurses-devel to enable '-curses' option (#504226) Cheers, Mark. From ondrejj at salstar.sk Fri Jun 5 11:21:40 2009 From: ondrejj at salstar.sk (=?utf-8?B?SsOhbiBPTkRSRUogKFNBTCk=?=) Date: Fri, 5 Jun 2009 13:21:40 +0200 Subject: [fedora-virt] GPG signatures for Rawhide virt repo Message-ID: <20090605112140.GA2687@salstar.sk> Hello, Mark, can you please add signatures to vire-preview packages? Installation of totally unsigned packages on my machine is not a good idea, because I don't know, if they was changed by an attacker on internet. Installation works with root privileges, so everything is possible. To add signatures, you can be inspired by my scripts. You can run "rpm --sign" command before createrepo on all packages safely. My script uses libskippass.so to do not require password for singning key. You need to create .rpmmacros, where signing key is defined: %_signature gpg %_gpg_path /home/YOURLOGIN/.gnupg %_gpg_name YOUR_KEY_NAME My libskippass.c, if you need it: ---------------------------- // compile with: gcc -shared -o libskippass.so skippass.c #include char *getpass(const char *prompt) { char *p = ""; printf("%s <<< SKIPPED! >>>\n", prompt); return p; } ---------------------------- And finally signing command: LD_PRELOAD=/lib/libskippass.so rpm --addsign /path/to/your/packages/*/*.rpm \ 2>&1 | grep -v -e 'was already signed by key' -e ':$' Output of this command is filtered to do not show already signed packages. Now you only need to create your new GPG key, distribute public key and start to sign with private key. I think signed packages with potentially insecure key is much better, like totally unsigned, but you also can use a key for your signing key. SAL From m.a.young at durham.ac.uk Fri Jun 5 13:00:20 2009 From: m.a.young at durham.ac.uk (M A Young) Date: Fri, 5 Jun 2009 14:00:20 +0100 (BST) Subject: [fedora-virt] Re: [Fedora-xen] Dom0 kernels In-Reply-To: References: <20090328163545.GM31725@salstar.sk> <20090414143618.GH351@redhat.com> Message-ID: This build http://koji.fedoraproject.org/koji/taskinfo?taskID=1394059 is just a resync with the current rawhide kernel. I don't think there are any significant xen changes. It is also available via the repository http://fedorapeople.org/~myoung/dom0/ Michael Young From markmc at redhat.com Fri Jun 5 13:40:04 2009 From: markmc at redhat.com (Mark McLoughlin) Date: Fri, 05 Jun 2009 14:40:04 +0100 Subject: [fedora-virt] GPG signatures for Rawhide virt repo In-Reply-To: <20090605112140.GA2687@salstar.sk> References: <20090605112140.GA2687@salstar.sk> Message-ID: <1244209204.27876.13.camel@blaa> Hi J?n, On Fri, 2009-06-05 at 13:21 +0200, J?n ONDREJ (SAL) wrote: > Hello, > > Mark, can you please add signatures to vire-preview packages? Installation > of totally unsigned packages on my machine is not a good idea, because I > don't know, if they was changed by an attacker on internet. I've added this to the TODO list[1], but I don't think it takes priority over the other items on the list since the repository is a subset of rawhide and rawhide is usually unsigned. If we do this, though, we should implement this in a relatively secure manner so as to not merely give the illusion of security e.g. 1) The key should be password protected and kept somewhere safe; I don't see why people should have confidence in packages signed with a password-less key stored on my laptop 2) Key distribution - putting the public key in a text file in the repo doesn't help; if the repo can be compromised, so can that text file - perhaps we could include the key in an F-11 RPM? Thanks, Mark. [1] - http://markmc.fedorapeople.org/virt-preview/README From ondrejj at salstar.sk Fri Jun 5 14:18:21 2009 From: ondrejj at salstar.sk (=?utf-8?B?SsOhbiBPTkRSRUogKFNBTCk=?=) Date: Fri, 5 Jun 2009 16:18:21 +0200 Subject: [fedora-virt] GPG signatures for Rawhide virt repo In-Reply-To: <1244209204.27876.13.camel@blaa> References: <20090605112140.GA2687@salstar.sk> <1244209204.27876.13.camel@blaa> Message-ID: <20090605141821.GD2687@salstar.sk> On Fri, Jun 05, 2009 at 02:40:04PM +0100, Mark McLoughlin wrote: > Hi J?n, > > On Fri, 2009-06-05 at 13:21 +0200, J?n ONDREJ (SAL) wrote: > > Hello, > > > > Mark, can you please add signatures to vire-preview packages? Installation > > of totally unsigned packages on my machine is not a good idea, because I > > don't know, if they was changed by an attacker on internet. > > I've added this to the TODO list[1], but I don't think it takes priority > over the other items on the list since the repository is a subset of > rawhide and rawhide is usually unsigned. > > If we do this, though, we should implement this in a relatively secure > manner so as to not merely give the illusion of security e.g. > > 1) The key should be password protected and kept somewhere safe; I > don't see why people should have confidence in packages signed with > a password-less key stored on my laptop Password-less key is better like nothing. Now there is no safe way, how to download your packages, because fedorapeople.org does not suport https and packages are not signed. Can you at least request https for repo URL? > 2) Key distribution - putting the public key in a text file in the repo > doesn't help; if the repo can be compromised, so can that text file > - perhaps we could include the key in an F-11 RPM? I think you can use gpgkey=http://.../... in vedora-virt-preview.repo. User can confirm import of this key first time, later this key will be used. This way user only need to check key once. SAL From dennisml at conversis.de Fri Jun 5 14:26:15 2009 From: dennisml at conversis.de (Dennis J.) Date: Fri, 05 Jun 2009 16:26:15 +0200 Subject: [fedora-virt] Adding VM to virt-manager Message-ID: <4A292B07.9020605@conversis.de> Hi, How do I add a custom-built vm to virt-manager? I basically created an empty image, untarred a template setup into it and made it boot using qemu-kvm from the shell. Now I'd like to make this vm visible in virt-manager so that I can manage it from there. I tried creating a domain xml file in /etc/libvirt/qemu but that doesn't seem to be enough. Regards, Dennis From bkearney at redhat.com Fri Jun 5 14:48:55 2009 From: bkearney at redhat.com (Bryan Kearney) Date: Fri, 05 Jun 2009 10:48:55 -0400 Subject: [fedora-virt] Adding VM to virt-manager In-Reply-To: <4A292B07.9020605@conversis.de> References: <4A292B07.9020605@conversis.de> Message-ID: <4A293057.9060207@redhat.com> Dennis J. wrote: > Hi, > How do I add a custom-built vm to virt-manager? I basically created an > empty image, untarred a template setup into it and made it boot using > qemu-kvm from the shell. Now I'd like to make this vm visible in > virt-manager so that I can manage it from there. I tried creating a > domain xml file in /etc/libvirt/qemu but that doesn't seem to be enough. > virt-image is the tool you want. Create an xml file in the format of [1] and then run virt-image against it. -- bk [1] http://people.redhat.com/dlutter/virt-image/virt-image-xml.html From markmc at redhat.com Fri Jun 5 15:11:40 2009 From: markmc at redhat.com (Mark McLoughlin) Date: Fri, 05 Jun 2009 16:11:40 +0100 Subject: [fedora-virt] F-11 xen-3.4.0 update ? [was Re: [fedora-virt-maint] rpms/xen/F-11 dom0-kernel.repo, NONE, 1.1 init.blktapctrl, NONE, 1.1 init.xenconsoled, NONE, 1.1 init.xend, NONE, 1.1 init.xenstored, NONE, 1.1 sysconfig.blktapctrl, NONE, 1.1 sysconfig.xenconsoled, NONE, 1.1 sysconfig.xenstored, NONE, 1.1 xen-configure-xend.patch, NONE, 1.1 .cvsignore, 1.39, 1.40 sources, 1.54, 1.55 xen-dumpdir.patch, 1.4, 1.5 xen-initscript.patch, 1.11, 1.12 xen-net-disable-iptables-on-bridge.patch, 1.3, 1.4 xen.spec, 1.236, 1.237 xen-3.0.2-config-allow-unix-server.patch, 1.3, NONE xen-3.0.2-config-disable-reloc.patch, 1.3, NONE xen-backport-hg18782.patch, 1.1, NONE xen-backport-hg19075.patch, 1.1, NONE xen-backport-hg19108.patch, 1.1, NONE xen-backport-hg19109.patch, 1.1, NONE xen-backport-hg19110.patch, 1.1, NONE xen-config-dom0-minmem.patch, 1.3, NONE xen-gcc44-buildfix.patch, 1.1, NONE xen-initscript-pvops.patch, 1.1, NONE xen-net-disable-bridge-by-default.patch, 1.3, NONE] In-Reply-To: <20090527200628.269E970110@cvs1.fedora.phx.redhat.com> References: <20090527200628.269E970110@cvs1.fedora.phx.redhat.com> Message-ID: <1244214700.27876.25.camel@blaa> Hi Gerd, On Wed, 2009-05-27 at 20:06 +0000, Gerd Hoffmann wrote: > Author: kraxel > > Update of /cvs/pkgs/rpms/xen/F-11 > In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv16320 > ... > %changelog > +* Wed May 27 2009 Gerd Hoffmann - 3.4.0-1 > +- update to version 3.4.0. Are you planning on pushing this to F-11 updates? Cheers, Mark. From dennisml at conversis.de Fri Jun 5 15:35:49 2009 From: dennisml at conversis.de (Dennis J.) Date: Fri, 05 Jun 2009 17:35:49 +0200 Subject: [fedora-virt] Adding VM to virt-manager In-Reply-To: <4A293057.9060207@redhat.com> References: <4A292B07.9020605@conversis.de> <4A293057.9060207@redhat.com> Message-ID: <4A293B55.3000903@conversis.de> On 06/05/2009 04:48 PM, Bryan Kearney wrote: > Dennis J. wrote: >> Hi, >> How do I add a custom-built vm to virt-manager? I basically created an >> empty image, untarred a template setup into it and made it boot using >> qemu-kvm from the shell. Now I'd like to make this vm visible in >> virt-manager so that I can manage it from there. I tried creating a >> domain xml file in /etc/libvirt/qemu but that doesn't seem to be enough. >> > > virt-image is the tool you want. Create an xml file in the format of [1] > and then run virt-image against it. Worked like a charm. Thanks! Regards, Dennis From markmc at redhat.com Fri Jun 5 15:37:41 2009 From: markmc at redhat.com (Mark McLoughlin) Date: Fri, 05 Jun 2009 16:37:41 +0100 Subject: [fedora-virt] Fedora virt status Message-ID: <1244216261.27876.26.camel@blaa> Okay, so F-11 is done and dusted. Onwards to F-12! Here's what the schedule looks like: 2009-07-28 Feature Freeze (53 days) 2009-08-04 Beta Freeze (60 days) 2009-09-22 Final Development Freeze (109 days) 2009-10-20 Compose & Stage Release Candidate (137 days) F11 Release =========== Another one week slip for the F11 release, this because of a late breaking anaconda storage problem: http://www.redhat.com/archives/fedora-devel-list/2009-May/msg02159.html A late discovered and just potentially fixed anaconda storage bug[1] has necessitated another week slip of our schedule. The change is important but invasive enough to require re-validating our storage tests. We were already late in producing the Release Candidate and there is not enough time to produce another one and validate it in time for next Tuesday's release date. However, the release is now complete and being queued up on the mirrors. Expect the release early next week! F11 Virt Interview ================== Dan Berrange was interviewed about virtualization in Fedora 11. Read the full interview here: http://jaboutboul.blogspot.com/2009/05/fedora-11-virtualization-reality.html F11 Updates =========== A number of zero-day updates are available for F-11 users. The following are available in stable: https://admin.fedoraproject.org/updates/qemu-0.10.5-2.fc11 https://admin.fedoraproject.org/updates/libvirt-0.6.2-11.fc11 https://admin.fedoraproject.org/updates/virt-manager-0.7.0-5.fc11 https://admin.fedoraproject.org/updates/libguestfs-1.0.21-3.fc11 https://admin.fedoraproject.org/updates/openbios-1.0-1.fc11 and these are in updates-testing: https://admin.fedoraproject.org/updates/libvirt-0.6.2-12.fc11 https://admin.fedoraproject.org/updates/virt-viewer-0.0.3-5.fc11 https://admin.fedoraproject.org/updates/libguestfs-1.0.41-1.fc11 https://admin.fedoraproject.org/updates/etherboot-5.4.4-14.fc11 Please help out with testing these latest updates and report any issues. Virt Preview Repository ======================= Updates are being pushed regularily to the virt-preview repository: http://markmc.fedorapeople.org/virt-preview/README Below are the updates which have been pushed lately - obviously these are also available in rawhide: == qemu == * Fri Jun 5 2009 Mark McLoughlin - 2:0.10.50-6.kvm86 - Fix 'kernel requires an x86-64 CPU' error - BuildRequires ncurses-devel to enable '-curses' option (#504226) * Wed Jun 3 2009 Mark McLoughlin - 2:0.10.50-5.kvm86 - Prevent locked cdrom eject - fixes hang at end of anaconda installs (#501412) - Avoid harmless 'unhandled wrmsr' warnings (#499712) * Thu May 21 2009 Mark McLoughlin - 2:0.10.50-4.kvm86 - Update to kvm-86 release - ChangeLog here: http://marc.info/?l=kvm&m=124282885729710 == libvirt == * Fri Jun 5 2009 Mark McLoughlin - 0.6.4-2.fc12 - Remove the qemu BuildRequires * Fri May 29 2009 Daniel Veillard - 0.6.4-1.fc12 - Upstream release of 0.6.4 - new APIs - fixes for latests QEmu/KVM versions - various assorted fixes * Mon May 25 2009 Mark McLoughlin - 0.6.3-11.fc12 - Bring up the bridge, even if it doesn't have an IP address (bug #501912) * Thu May 21 2009 Mark McLoughlin - 0.6.3-10.fc12 - Fix XML attribute escaping (bug #499791) - Fix serious event handling issues causing guests to be destroyed (bug #499698) * Thu May 21 2009 Mark McLoughlin - 0.6.3-9.fc12 - Fix qemu argv detection with latest qemu (bug #501923) Some discussion has also begun on how to sign the packages in the preview repo: http://www.redhat.com/archives/fedora-virt/2009-June/msg00024.html Xen Dom0 ======== Jeremy Fitzhardinge's latest submission of the Xen Dom0 patches for 2.6.31 has caused the kernel community to get themselves into a bit of a flap. LWN has a nice article on the 'discussion': http://lwn.net/Articles/335812/ But the stronger voice looks to be the one saying that the problems need to be fixed first. The deciding factors seem to be (1) the user-space ABI, and (2) the intrusion into the core x86 code; those issues make Xen different from yet another driver or filesystem. That, in turn, suggests that the Dom0 code is not destined for the mainline anytime soon. Instead, the Xen developers will be expected to go back and fix a list of problems - a lot of work with an uncertain result at the end. Will we have Dom0 support in the F-12 kernel? It's looking increasingly unlikely, isn't it? On a positive note, reading LKML threads like this are a good way of putting the supposed dire state of fedora-devel-list in perspective ;-) In other news Michael Young continues to push out RPM builds of the latest Dom0 patch set: http://www.redhat.com/archives/fedora-virt/2009-June/msg00023.html Oh yes - Gerd Hoffman has pushed a xen-3.4.0 update to F-11: Bugs ==== DOOM-O-METER: 236 open bugs 3 weeks ago, 238 now. It looks like 103 of these are F-11/F-12 bugs which aren't fixed by pending updates. The "short" list of particularily interesting F-11 bugs is here: https://bugzilla.redhat.com/showdependencytree.cgi?id=F11VirtTarget&hide_resolved=1 = New Bugs = == qemu == https://bugzilla.redhat.com/503236 qemu/tcg - boot hangs intermittently on cryptomgr_test at doublefault_fn Rich Jones discovered this TCG issue with libguestfs tests. There has been some discussion upstream analyzing the issue. https://bugzilla.redhat.com/503184 Add system_reboot to qemu Currently there is no way for libvirt to request qemu to reboot a guest. We really should get this done for F12. https://bugzilla.redhat.com/503156 qemu VNC :: xterm inside VM shows garbled text Looks like our vnc server has some issues with framebuffer updates. https://bugzilla.redhat.com/504273 qemu-system-ppc on ppc host fails with "no opcode defined" It looks like qemu-system-ppc on a ppc host is failing to initialize its opcode table. https://bugzilla.redhat.com/504294 qemu-system-ppc fails to boot ISO image Looks like qemu's ppc target can't currently boot from a cdrom. == libvirt == https://bugzilla.redhat.com/500968 virt-manager traceback on shutdown of qemu-kvm -no-acpi guest A guest with ACPI disabled will exit immediately when issued with the "system_powerdown" command and libvirt isn't handling this gracefully. == virtinst == https://bugzilla.redhat.com/502627 virtinst should always specify the disk image format in guest configuration This is a long standing known issue, which has been fixed upstream bu we should really pull the fix into F-11. == virt-manager == https://bugzilla.redhat.com/502110 virt-manager does not re-connect after libvirtd restart It seems that if you restart libvirtd while virt-manager is running, then virt-manager doesn't know how to re-connect to libvirtd. https://bugzilla.redhat.com/499547 virt-manager should restart linux guests after they have finished installing Discussion about the fact that virt-manager does not re-start a guest after it has been installed. https://bugzilla.redhat.com/502777 virt-manager does not recalculate free disk space on new VM creation In the 'New VM' wizard, we don't currently update the 'XXXGb available on the host' message if people go and delete files when they realize they don't have enough space. https://bugzilla.redhat.com/503001 RFE virt-manager: allow desktop switch with ctrl+alt+arrow_key Someone finally filed a bug on it :-) When you go to switch workspaces with Ctrl-Alt-Arrow, virt-manager grabs the keyboard, which is pretty annoying. https://bugzilla.redhat.com/503150 virt-manager window size bigger after returning from fullscreen It seems that going back and forth between fullscreen can cause the virt-manager window to be resized such that it is partially off-screen. https://bugzilla.redhat.com/503784 memory changes in virt-manager do not persist across libvirtd restart virt-manager is using a non-persistent libvirt API to adjust the guest memory configuration. https://bugzilla.redhat.com/503786 virt-manager refuses to increase guest memory until max memory change is first applied An annoying little problem where virt-manager appears to want to pick a fight with the user. == gnome-applet-vm == https://bugzilla.redhat.com/502748 gnome-applet-vm should use PolicyKit The applet currently uses consolehelper, it should use PolicyKit instead. = Resolved Bugs = == qemu == https://bugzilla.redhat.com/501412 f11 kvm guest install exits after package install completes qemu wasn't properly implementing cdrom door locking allowing anaconda to eject the cdrom while it was locked, killing the install. Fixed in qemu-0.10.5-2.fc11. https://bugzilla.redhat.com/501264 qemu segfaults for -net socket,listen=localhost:4567 Simple fix cherry-picked from upstream and included in qemu-0.10.5-2.fc11. https://bugzilla.redhat.com/499712 qemu-kvm: avoid harmless unhandled wrmsr 0xc0010117 messages These warnings were causing quite a bit of confusion so we've cherry-picked a fix from Marcelo to make them go away. Also in qemu-0.10.5-2.fc11. https://bugzilla.redhat.com/503575 LiveCD Installer hangs during guest VM install-to-virt-drive Apparently this has been fixed by the qemu-0.10.5 update. https://bugzilla.redhat.com/503807 kqemu is disabled in qemu Glauber lays down the law, we're not supporting kqemu. https://bugzilla.redhat.com/504226 qemu-kvm binary should support the '-curses' option A simple missing ncurses-devel BuildRequires was causing the '-curses' option to not be supported in qemu. Fixed in F-12. == libvirt == https://bugzilla.redhat.com/502862 libvirt runs qemu-system-ppc with wrong machine type - should be g3beige, not g3bw The ppc machine types have changed in upstream qemu; fixed in the libvirt-0.6.2-12.fc11 update. https://bugzilla.redhat.com/503066 libvirtd crashes on tls connection danpb fixed this upstream and the fix was included in libvirt-0.6.2-12.fc11. https://bugzilla.redhat.com/503406 F11: libvirt: cannot shutdown virtual machines booted to a console prompt It turns out that if acpid is not running in the guest, the qemu 'system_powerdown' command used by libvirt doesn't do anything. == virt-viewer == https://bugzilla.redhat.com/499362 virt-viewer prevents key combinations like alt-f from being sent to the guest https://bugzilla.redhat.com/499595 virt-viewer mixes up password and username credentials for VNC https://bugzilla.redhat.com/499594 virt-viewer doesn't know how to provide a username/password to libvirt connections danpb pushed a virt-viewer-0.0.3-5.fc11 update with fixes for all these issues. == libguestfs == https://bugzilla.redhat.com/503133 "mkdir-p" should not throw errors on preexisting directories https://bugzilla.redhat.com/503135 cramfs and squashfs modules should be available in libguestfs appliances https://bugzilla.redhat.com/503169 libguestfs /dev is too sparse for kernel installation/upgrade Rich Jones and Charles Duffy have been busily fixing libguestfs bugs. = Ongoing Bugs = == qemu == https://bugzilla.redhat.com/501935 qemu-kvm -kernel should parse "vga=" cmdline option Someone posted an implementation for this upstream. https://bugzilla.redhat.com/501131 qemu segfault when VNC client disconnects Enrico tried the test patch and it didn't help, but that could be down to the fact that there are many failure cases. A cleaner fix is required. From rpjday at crashcourse.ca Fri Jun 5 15:57:14 2009 From: rpjday at crashcourse.ca (Robert P. J. Day) Date: Fri, 5 Jun 2009 11:57:14 -0400 (EDT) Subject: [fedora-virt] intel vt versus amd-v? Message-ID: a friend wants to buy a server (probably dell) with HW virt support, and is wondering if there are any current clear advantages of intel over amd. the only observation i had time to make was that, if one checks out entry-level servers from dell (ballpark $1000 cdn), the amd opteron systems appear to be somewhat less expensive than equivalent intel-based systems. further thoughts? rday -- ======================================================================== Robert P. J. Day Waterloo, Ontario, CANADA Linux Consulting, Training and Annoying Kernel Pedantry. Web page: http://crashcourse.ca Linked In: http://www.linkedin.com/in/rpjday Twitter: http://twitter.com/rpjday ======================================================================== From markmc at redhat.com Fri Jun 5 16:58:00 2009 From: markmc at redhat.com (Mark McLoughlin) Date: Fri, 05 Jun 2009 17:58:00 +0100 Subject: [fedora-virt] F-11 xen-3.4.0 update ? In-Reply-To: <1244214700.27876.25.camel@blaa> References: <20090527200628.269E970110@cvs1.fedora.phx.redhat.com> <1244214700.27876.25.camel@blaa> Message-ID: <1244221080.27876.33.camel@blaa> On Fri, 2009-06-05 at 16:11 +0100, Mark McLoughlin wrote: > > %changelog > > +* Wed May 27 2009 Gerd Hoffmann - 3.4.0-1 > > +- update to version 3.4.0. > > Are you planning on pushing this to F-11 updates? Gah - I messed up the list address, so Gerd's very sensible reply went AWOL: Not yet. I wanna give it a bit more testing in rawhide. Also it looks like xensource wants to release 3.4.1 quickly to fix a bunch of important bugs. I think it is a good idea to wait until that one is out, then update F11 straight to xen-3.4.1. Also xen 3.4 bumps the shared library major for some libraries from 3.2 to 3.4, so I'll have to figure what breaks due to that and coordinate the update. I know xenner is affected. Libvirts seems to do fine as it needs libxenstore only which is still at 3.0. Didn't investigate yet what else might need a rebuild. Cheers, Mark. From rjones at redhat.com Fri Jun 5 17:47:55 2009 From: rjones at redhat.com (Richard W.M. Jones) Date: Fri, 5 Jun 2009 18:47:55 +0100 Subject: [fedora-virt] intel vt versus amd-v? In-Reply-To: References: Message-ID: <20090605174755.GA13886@amd.home.annexia.org> On Fri, Jun 05, 2009 at 11:57:14AM -0400, Robert P. J. Day wrote: > a friend wants to buy a server (probably dell) with HW virt support, > and is wondering if there are any current clear advantages of intel > over amd. the only observation i had time to make was that, if one > checks out entry-level servers from dell (ballpark $1000 cdn), the amd > opteron systems appear to be somewhat less expensive than equivalent > intel-based systems. > > further thoughts? The more recent Intel and AMD parts have extra virtualization features which make virtualization more efficient -- primarily Intel Extended Page Tables (EPT) and AMD Nested Page Tables (NPT). So your friend should look at the chips which support that, basically Intel Nehalem and the quad-core AMD Opterons (previously known as Barcelona). If he wants to assign devices directly to guests, maybe look at Intel VT-d / AMD IOMMU. Not used it myself. Rich. -- Richard Jones, Emerging Technologies, Red Hat http://et.redhat.com/~rjones Read my programming blog: http://rwmj.wordpress.com Fedora now supports 75 OCaml packages (the OPEN alternative to F#) http://cocan.org/getting_started_with_ocaml_on_red_hat_and_fedora From kraxel at redhat.com Fri Jun 5 20:21:21 2009 From: kraxel at redhat.com (Gerd Hoffmann) Date: Fri, 05 Jun 2009 22:21:21 +0200 Subject: [fedora-virt] Fedora virt status In-Reply-To: <1244216261.27876.26.camel@blaa> References: <1244216261.27876.26.camel@blaa> Message-ID: <4A297E41.3030709@redhat.com> > Xen Dom0 > ======== > > Jeremy Fitzhardinge's latest submission of the Xen Dom0 patches for > 2.6.31 has caused the kernel community to get themselves into a bit of > a flap. LWN has a nice article on the 'discussion': > > http://lwn.net/Articles/335812/ > > But the stronger voice looks to be the one saying that the problems > need to be fixed first. The deciding factors seem to be (1) the > user-space ABI, and (2) the intrusion into the core x86 code; those > issues make Xen different from yet another driver or > filesystem. That, in turn, suggests that the Dom0 code is not > destined for the mainline anytime soon. Instead, the Xen developers > will be expected to go back and fix a list of problems - a lot of > work with an uncertain result at the end. Some more details: The controversial bits are: (1) MTRR support. Not that a big deal, can be skipped for the initial merge. Might be PAT obsoletes this anyway ... (2) swiotlb hooks. Not *that* problematic I think. (3) lapic + ioapic. That is the big hot topic. Current code lacks sensible interfaces to the different apic types out there in the wild. The current dom0 patches hook just into that mess instead of cleaning it up. Right now it looks like Jeremy has to sort that mess to get the xen bits in, using the to-be-created apic interfaces. So it looks like Jeremy will again end up doing x86 arch code cleanups to get the xen bits in, like it happened before. Jeremy already did alot of x86 cleanup and unification work as part of the xen domU merge. > Will we have Dom0 support in the F-12 kernel? It's looking > increasingly unlikely, isn't it? No way the apic stuff will make it into the 2.6.31 merge window opening RSN, the work on that barely started. Thus we can expect functional dom0 support upstream in 2.6.32 earliest. And even that isn't a safe bet, the apic stuff has to go quite smooth for that, on a road full of quirks for bugs-in-silicon ... > Oh yes - Gerd Hoffman has pushed a xen-3.4.0 update to F-11: Pushed to rawhide. F-11 will follow, but most likely after the 3.4.1 bugfix release. Also noteworthy: There is a discussion on xen-devel regarding the future of the xen linux trees. Which one should be used & maintained and so on. The options / kernel trees are: (1) The old 2.6.18 tree. (2) The 2.6.27 tree (patches forward-ported by suse, i.e. jan beulich). (3) The 2.6.29 gentoo patches (the 2.6.27 suse patches forward-ported). (4) jeremys kernel.org tree (aka pv_ops/dom0). Looks like Keir seriously considers switching xen-unstable to the pv_ops kernel by default. YES! FINALLY! Well, it is probably to early to uncork the champagne, but I think we can at least put a bottle into the fridge ;) cheers, Gerd From rpjday at crashcourse.ca Fri Jun 5 20:21:00 2009 From: rpjday at crashcourse.ca (Robert P. J. Day) Date: Fri, 5 Jun 2009 16:21:00 -0400 (EDT) Subject: [fedora-virt] intel vt versus amd-v? In-Reply-To: <20090605174755.GA13886@amd.home.annexia.org> References: <20090605174755.GA13886@amd.home.annexia.org> Message-ID: On Fri, 5 Jun 2009, Richard W.M. Jones wrote: > On Fri, Jun 05, 2009 at 11:57:14AM -0400, Robert P. J. Day wrote: > > a friend wants to buy a server (probably dell) with HW virt support, > > and is wondering if there are any current clear advantages of intel > > over amd. the only observation i had time to make was that, if one > > checks out entry-level servers from dell (ballpark $1000 cdn), the amd > > opteron systems appear to be somewhat less expensive than equivalent > > intel-based systems. > > > > further thoughts? > > The more recent Intel and AMD parts have extra virtualization > features which make virtualization more efficient -- primarily Intel > Extended Page Tables (EPT) and AMD Nested Page Tables (NPT). So > your friend should look at the chips which support that, basically > Intel Nehalem and the quad-core AMD Opterons (previously known as > Barcelona). NPT is what AMD is now calling "Rapid Virtualization Indexing", yes? rday -- ======================================================================== Robert P. J. Day Waterloo, Ontario, CANADA Linux Consulting, Training and Annoying Kernel Pedantry. Web page: http://crashcourse.ca Linked In: http://www.linkedin.com/in/rpjday Twitter: http://twitter.com/rpjday ======================================================================== From rjones at redhat.com Fri Jun 5 20:41:54 2009 From: rjones at redhat.com (Richard W.M. Jones) Date: Fri, 5 Jun 2009 21:41:54 +0100 Subject: [fedora-virt] intel vt versus amd-v? In-Reply-To: References: <20090605174755.GA13886@amd.home.annexia.org> Message-ID: <20090605204154.GA14736@amd.home.annexia.org> On Fri, Jun 05, 2009 at 04:21:00PM -0400, Robert P. J. Day wrote: > On Fri, 5 Jun 2009, Richard W.M. Jones wrote: > > On Fri, Jun 05, 2009 at 11:57:14AM -0400, Robert P. J. Day wrote: > > > a friend wants to buy a server (probably dell) with HW virt support, > > > and is wondering if there are any current clear advantages of intel > > > over amd. the only observation i had time to make was that, if one > > > checks out entry-level servers from dell (ballpark $1000 cdn), the amd > > > opteron systems appear to be somewhat less expensive than equivalent > > > intel-based systems. > > > > > > further thoughts? > > > > The more recent Intel and AMD parts have extra virtualization > > features which make virtualization more efficient -- primarily Intel > > Extended Page Tables (EPT) and AMD Nested Page Tables (NPT). So > > your friend should look at the chips which support that, basically > > Intel Nehalem and the quad-core AMD Opterons (previously known as > > Barcelona). > > NPT is what AMD is now calling "Rapid Virtualization Indexing", yes? I haven't heard it called that til now, but it does look like their marketing name for NPT, yes. BTW(1) some AMD machines need to have virtualization enabled in the BIOS. BTW(2) to decode the /proc/cpuinfo flags, look here: http://lxr.linux.no/linux+v2.6.29/arch/x86/include/asm/cpufeature.h EPT is a flag, but NPT isn't (you have to look in the kernel messages when loading the KVM module to see if NPT is supported). Rich. -- Richard Jones, Emerging Technologies, Red Hat http://et.redhat.com/~rjones Read my programming blog: http://rwmj.wordpress.com Fedora now supports 75 OCaml packages (the OPEN alternative to F#) http://cocan.org/getting_started_with_ocaml_on_red_hat_and_fedora From ask at develooper.com Fri Jun 5 20:55:26 2009 From: ask at develooper.com (=?ISO-8859-1?Q?Ask_Bj=F8rn_Hansen?=) Date: Fri, 5 Jun 2009 13:55:26 -0700 Subject: [fedora-virt] intel vt versus amd-v? In-Reply-To: <20090605204154.GA14736@amd.home.annexia.org> References: <20090605174755.GA13886@amd.home.annexia.org> <20090605204154.GA14736@amd.home.annexia.org> Message-ID: <1E926233-78C4-4EA7-8EA6-A7D8F2B66BD7@develooper.com> On Jun 5, 2009, at 13:41, Richard W.M. Jones wrote: > BTW(1) some AMD machines need to have virtualization enabled in > the BIOS. Our SuperMicro/Intel BIOS'es come with it disabled by default, too. - ask -- Ask Bj?rn Hansen, Develooper LLC http://www.develooper.com/ From cochranb at speakeasy.net Fri Jun 5 20:56:41 2009 From: cochranb at speakeasy.net (Robert L Cochran) Date: Fri, 05 Jun 2009 16:56:41 -0400 Subject: [fedora-virt] intel vt versus amd-v? In-Reply-To: <20090605174755.GA13886@amd.home.annexia.org> References: <20090605174755.GA13886@amd.home.annexia.org> Message-ID: <4A298689.7090407@speakeasy.net> On 06/05/2009 01:47 PM, Richard W.M. Jones wrote: > On Fri, Jun 05, 2009 at 11:57:14AM -0400, Robert P. J. Day wrote: > >> a friend wants to buy a server (probably dell) with HW virt support, >> and is wondering if there are any current clear advantages of intel >> over amd. the only observation i had time to make was that, if one >> checks out entry-level servers from dell (ballpark $1000 cdn), the amd >> opteron systems appear to be somewhat less expensive than equivalent >> intel-based systems. >> >> further thoughts? >> > > The more recent Intel and AMD parts have extra virtualization features > which make virtualization more efficient -- primarily Intel Extended > Page Tables (EPT) and AMD Nested Page Tables (NPT). So your friend > should look at the chips which support that, basically Intel Nehalem > and the quad-core AMD Opterons (previously known as Barcelona). > > If he wants to assign devices directly to guests, maybe look at Intel VT-d > / AMD IOMMU. Not used it myself. > > Rich. > > What a shame...I don't have a Nehalem processor in my Dell Latitude E6400...I wonder if I can just buy the mobile version of a Nehalem chip and replace my P9500 with it... [root at deafeng3 ~]# exit logout [rlc at deafeng3 ~]$ cat /proc/cpuinfo processor : 0 vendor_id : GenuineIntel cpu family : 6 model : 23 model name : Intel(R) Core(TM)2 Duo CPU P9500 @ 2.53GHz stepping : 6 cpu MHz : 800.000 cache size : 6144 KB physical id : 0 siblings : 2 core id : 0 cpu cores : 2 apicid : 0 initial apicid : 0 fpu : yes fpu_exception : yes cpuid level : 10 wp : yes flags : fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx lm constant_tsc arch_perfmon pebs bts rep_good pni dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm sse4_1 lahf_lm tpr_shadow vnmi flexpriority bogomips : 5054.28 clflush size : 64 cache_alignment : 64 address sizes : 36 bits physical, 48 bits virtual power management: .... [processor 1 info duplicates above] .... Bob -------------- next part -------------- An HTML attachment was scrubbed... URL: From thatch45 at gmail.com Fri Jun 5 20:59:19 2009 From: thatch45 at gmail.com (Thomas S Hatch) Date: Fri, 5 Jun 2009 14:59:19 -0600 Subject: [fedora-virt] Too much ram for F10 Message-ID: <6172c17e0906051359w1b775126k3b2bb8a53747d4c8@mail.gmail.com> I already posted about this in the cobbler list and they sent me over here. It seems that whenever I try to install a new virtual machine(kvm) with koan, and the ram for the machine is higher than 2 gigs the machine fails to install. The domain and hard drive image are created, but they won't start up to do the install. My guess was that the arch was being set to i686 in the libvirt xml file, and that that was causing issues, but the vms with 2 gigs of ram and arch="i686" in the libvirt config install just fine with a 64 bit version of Fedora. I then decided to track down where the arch assignment was being made in the code, koan uses the default arch supplied by virtinst.FullVirtGuest. In that code the 2 lines that detect the host arch are commented out, I uncommented them, and tried again. The arch in the libvirt xml files became x86_64, but they still failled to install for vms with 4 gigs of ram! So I am stumpted! Anyone have any suggestions? Host machine: Fedora 10 64 bit, 8 3Ghz core, 32 Gigs of ram 1TB hdd It is also running on a node in a red hat cluster suite 2.99 Here is the log from one of my systems: LC_ALL=C PATH=/sbin:/usr/sbin:/bin:/usr/bin /usr/bin/qemu-kvm -S -M pc -m 4096 -smp 2 -name broker -uuid 60cec202-99dd-0f63-e198-f708c90a288b -monitor pty -no-reboot -boot c -kernel /var/lib/libvirt/boot/virtinst-vmlinuz.kmgRaG -initrd /var/lib/libvirt/boot/virtinst-initrd.img.W2X9jX -append ks= http://192.168.46.234/cblr/svc/op/ks/system/broker ksdevice=link kssendmac lang= text method=http://192.168.46.234:80/cblr/links/F10-x86_64/-drive file=/vm/images/broker-disk0,if=virtio,index=0,boot=on -net nic,macaddr=00:16:3e:38:81:65,vlan=0,model=virtio -net tap,fd=22,script=,vlan=0,ifname=vnet1 -serial pty -parallel none -usb -vnc 0.0.0.0:1 -k en-us char device redirected to /dev/pts/4 char device redirected to /dev/pts/5 i^[[K^[[Din^[[K^[[D^[[Dinf^[[K^[[D^[[D^[[Dinfo^[[K^[[D^[[D^[[D^[[Dinfo ^[[K^[[D^[[D^[[D^[[D^[[Dinfo c^[[K^[[D^[[D^[[D^[[D^[[D^[[Dinfo cp^[[K^[[D^[[D^[[D^[[D^[[D^[[D^[[Dinfo cpu^[[K^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[Dinfo cpus^[[K^M * CPU #0: pc=0x00000000000ffff0 thread_id=17984^M CPU #1: pc=0x00000000000ffff0 thread_id=17985^Mc^[[K^[[Dco^[[K^[[D^[[Dcon^[[K^[[D^[[D^[[Dcont^[[K^Mqemu: loading initrd (0x10efde0 bytes) at 0x000000007ef10000 kvm_cpu_register_physical_memory: failed create_userspace_phys_mem: Invalid argument And here is some host system info: /proc/cpuinfo: processor : 0 vendor_id : GenuineIntel cpu family : 6 model : 23 model name : Intel(R) Xeon(R) CPU E5450 @ 3.00GHz stepping : 6 cpu MHz : 3000.092 cache size : 6144 KB physical id : 0 siblings : 4 core id : 0 cpu cores : 4 apicid : 0 initial apicid : 0 fpu : yes fpu_exception : yes cpuid level : 10 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 lm constant_tsc arch_perfmon pebs bts rep_good nopl pni monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr dca sse4_1 lahf_lm bogomips : 6000.18 clflush size : 64 cache_alignment : 64 address sizes : 38 bits physical, 48 bits virtual power management: processor : 1 vendor_id : GenuineIntel cpu family : 6 model : 23 model name : Intel(R) Xeon(R) CPU E5450 @ 3.00GHz stepping : 6 cpu MHz : 3000.092 cache size : 6144 KB physical id : 1 siblings : 4 core id : 0 cpu cores : 4 apicid : 4 initial apicid : 4 fpu : yes fpu_exception : yes cpuid level : 10 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 lm constant_tsc arch_perfmon pebs bts rep_good nopl pni monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr dca sse4_1 lahf_lm bogomips : 6000.31 clflush size : 64 cache_alignment : 64 address sizes : 38 bits physical, 48 bits virtual power management: processor : 2 vendor_id : GenuineIntel cpu family : 6 model : 23 model name : Intel(R) Xeon(R) CPU E5450 @ 3.00GHz stepping : 6 cpu MHz : 3000.092 cache size : 6144 KB physical id : 0 siblings : 4 core id : 1 cpu cores : 4 apicid : 1 initial apicid : 1 fpu : yes fpu_exception : yes cpuid level : 10 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 lm constant_tsc arch_perfmon pebs bts rep_good nopl pni monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr dca sse4_1 lahf_lm bogomips : 6000.29 clflush size : 64 cache_alignment : 64 address sizes : 38 bits physical, 48 bits virtual power management: processor : 3 vendor_id : GenuineIntel cpu family : 6 model : 23 model name : Intel(R) Xeon(R) CPU E5450 @ 3.00GHz stepping : 6 cpu MHz : 3000.092 cache size : 6144 KB physical id : 0 siblings : 4 core id : 2 cpu cores : 4 apicid : 2 initial apicid : 2 fpu : yes fpu_exception : yes cpuid level : 10 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 lm constant_tsc arch_perfmon pebs bts rep_good nopl pni monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr dca sse4_1 lahf_lm bogomips : 6000.27 clflush size : 64 cache_alignment : 64 address sizes : 38 bits physical, 48 bits virtual power management: processor : 4 vendor_id : GenuineIntel cpu family : 6 model : 23 model name : Intel(R) Xeon(R) CPU E5450 @ 3.00GHz stepping : 6 cpu MHz : 3000.092 cache size : 6144 KB physical id : 0 siblings : 4 core id : 3 cpu cores : 4 apicid : 3 initial apicid : 3 fpu : yes fpu_exception : yes cpuid level : 10 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 lm constant_tsc arch_perfmon pebs bts rep_good nopl pni monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr dca sse4_1 lahf_lm bogomips : 6000.26 clflush size : 64 cache_alignment : 64 address sizes : 38 bits physical, 48 bits virtual power management: processor : 5 vendor_id : GenuineIntel cpu family : 6 model : 23 model name : Intel(R) Xeon(R) CPU E5450 @ 3.00GHz stepping : 6 cpu MHz : 3000.092 cache size : 6144 KB physical id : 1 siblings : 4 core id : 1 cpu cores : 4 apicid : 5 initial apicid : 5 fpu : yes fpu_exception : yes cpuid level : 10 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 lm constant_tsc arch_perfmon pebs bts rep_good nopl pni monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr dca sse4_1 lahf_lm bogomips : 6000.31 clflush size : 64 cache_alignment : 64 address sizes : 38 bits physical, 48 bits virtual power management: processor : 6 vendor_id : GenuineIntel cpu family : 6 model : 23 model name : Intel(R) Xeon(R) CPU E5450 @ 3.00GHz stepping : 6 cpu MHz : 3000.092 cache size : 6144 KB physical id : 1 siblings : 4 core id : 2 cpu cores : 4 apicid : 6 initial apicid : 6 fpu : yes fpu_exception : yes cpuid level : 10 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 lm constant_tsc arch_perfmon pebs bts rep_good nopl pni monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr dca sse4_1 lahf_lm bogomips : 6000.32 clflush size : 64 cache_alignment : 64 address sizes : 38 bits physical, 48 bits virtual power management: processor : 7 vendor_id : GenuineIntel cpu family : 6 model : 23 model name : Intel(R) Xeon(R) CPU E5450 @ 3.00GHz stepping : 6 cpu MHz : 3000.092 cache size : 6144 KB physical id : 1 siblings : 4 core id : 3 cpu cores : 4 apicid : 7 initial apicid : 7 fpu : yes fpu_exception : yes cpuid level : 10 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 lm constant_tsc arch_perfmon pebs bts rep_good nopl pni monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr dca sse4_1 lahf_lm bogomips : 6000.29 clflush size : 64 cache_alignment : 64 address sizes : 38 bits physical, 48 bits virtual power management: /proc/meminfo: MemTotal: 23452656 kB MemFree: 19856416 kB Buffers: 11308 kB Cached: 92944 kB SwapCached: 236 kB Active: 3073996 kB Inactive: 29244 kB SwapTotal: 10256376 kB SwapFree: 10256016 kB Dirty: 180 kB Writeback: 0 kB AnonPages: 2998556 kB Mapped: 16820 kB Slab: 189048 kB SReclaimable: 61812 kB SUnreclaim: 127236 kB PageTables: 10352 kB NFS_Unstable: 0 kB Bounce: 0 kB WritebackTmp: 0 kB CommitLimit: 21982704 kB Committed_AS: 3661632 kB VmallocTotal: 34359738367 kB VmallocUsed: 150160 kB VmallocChunk: 34359587191 kB HugePages_Total: 0 HugePages_Free: 0 HugePages_Rsvd: 0 HugePages_Surp: 0 Hugepagesize: 2048 kB DirectMap4k: 7920 kB DirectMap2M: 23846912 kB -------------- next part -------------- An HTML attachment was scrubbed... URL: From ddutile at redhat.com Fri Jun 5 21:09:55 2009 From: ddutile at redhat.com (Don Dutile) Date: Fri, 05 Jun 2009 17:09:55 -0400 Subject: [fedora-virt] intel vt versus amd-v? In-Reply-To: <4A298689.7090407@speakeasy.net> References: <20090605174755.GA13886@amd.home.annexia.org> <4A298689.7090407@speakeasy.net> Message-ID: <4A2989A3.8080300@redhat.com> Robert L Cochran wrote: > > > On 06/05/2009 01:47 PM, Richard W.M. Jones wrote: >> On Fri, Jun 05, 2009 at 11:57:14AM -0400, Robert P. J. Day wrote: >> >>> a friend wants to buy a server (probably dell) with HW virt support, >>> and is wondering if there are any current clear advantages of intel >>> over amd. the only observation i had time to make was that, if one >>> checks out entry-level servers from dell (ballpark $1000 cdn), the amd >>> opteron systems appear to be somewhat less expensive than equivalent >>> intel-based systems. >>> >>> further thoughts? >>> >> >> The more recent Intel and AMD parts have extra virtualization features >> which make virtualization more efficient -- primarily Intel Extended >> Page Tables (EPT) and AMD Nested Page Tables (NPT). So your friend >> should look at the chips which support that, basically Intel Nehalem >> and the quad-core AMD Opterons (previously known as Barcelona). >> >> If he wants to assign devices directly to guests, maybe look at Intel >> VT-d >> / AMD IOMMU. Not used it myself. >> >> Rich. >> >> > What a shame...I don't have a Nehalem processor in my Dell Latitude > E6400...I wonder if I can just buy the mobile version of a Nehalem chip > and replace my P9500 with it... > If you have a Dell E6400, your laptop has Intel EPT & Intel VT-d (as does the E6500). Make sure virtualization is turned on in the bios (I think there's two virtualization switches -- one for CPU virtualization, and one for IO (vt-d/iommu) virtualization). - Don (happy owner of E6500... and the above reasons why I choose it.) > [root at deafeng3 ~]# exit > logout > [rlc at deafeng3 ~]$ cat /proc/cpuinfo > processor : 0 > vendor_id : GenuineIntel > cpu family : 6 > model : 23 > model name : Intel(R) Core(TM)2 Duo CPU P9500 @ 2.53GHz > stepping : 6 > cpu MHz : 800.000 > cache size : 6144 KB > physical id : 0 > siblings : 2 > core id : 0 > cpu cores : 2 > apicid : 0 > initial apicid : 0 > fpu : yes > fpu_exception : yes > cpuid level : 10 > wp : yes > flags : fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pat > pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx lm > constant_tsc arch_perfmon pebs bts rep_good pni dtes64 monitor ds_cpl > vmx smx est tm2 ssse3 cx16 xtpr pdcm sse4_1 lahf_lm tpr_shadow vnmi > flexpriority > bogomips : 5054.28 > clflush size : 64 > cache_alignment : 64 > address sizes : 36 bits physical, 48 bits virtual > power management: > .... > [processor 1 info duplicates above] > .... > > > Bob > > > > > ------------------------------------------------------------------------ > > _______________________________________________ > Fedora-virt mailing list > Fedora-virt at redhat.com > https://www.redhat.com/mailman/listinfo/fedora-virt From rjones at redhat.com Sat Jun 6 07:45:17 2009 From: rjones at redhat.com (Richard W.M. Jones) Date: Sat, 6 Jun 2009 08:45:17 +0100 Subject: [fedora-virt] intel vt versus amd-v? In-Reply-To: <1E926233-78C4-4EA7-8EA6-A7D8F2B66BD7@develooper.com> References: <20090605174755.GA13886@amd.home.annexia.org> <20090605204154.GA14736@amd.home.annexia.org> <1E926233-78C4-4EA7-8EA6-A7D8F2B66BD7@develooper.com> Message-ID: <20090606074438.GA16701@amd.home.annexia.org> On Fri, Jun 05, 2009 at 01:55:26PM -0700, Ask Bj?rn Hansen wrote: > > On Jun 5, 2009, at 13:41, Richard W.M. Jones wrote: > >> BTW(1) some AMD machines need to have virtualization enabled in >> the BIOS. > > Our SuperMicro/Intel BIOS'es come with it disabled by default, too. Yeah I got that the wrong way round. Virtualization can be disabled on Intel machines, but _not_ on AMD machines. Rich. -- Richard Jones, Emerging Technologies, Red Hat http://et.redhat.com/~rjones virt-top is 'top' for virtual machines. Tiny program with many powerful monitoring features, net stats, disk stats, logging, etc. http://et.redhat.com/~rjones/virt-top From frankly3d at gmail.com Sat Jun 6 11:01:50 2009 From: frankly3d at gmail.com (Frank Murphy (Frankly3d)) Date: Sat, 06 Jun 2009 12:01:50 +0100 Subject: [fedora-virt] Install Guest\HD Q? Message-ID: <4A2A4C9E.50009@gmail.com> Is it possible to assign a full *physical drive* to each guest. If I need one for F11, F11, Rawide the first two being update in line with releases. Do I set this up while installing the host OS? Best Recommended? -- msn: frankly3d skype: frankly3d Mailing-List Reply to: Mailing-List Still Learning, Unicode where possible From rjones at redhat.com Sat Jun 6 11:27:57 2009 From: rjones at redhat.com (Richard W.M. Jones) Date: Sat, 6 Jun 2009 12:27:57 +0100 Subject: [fedora-virt] Install Guest\HD Q? In-Reply-To: <4A2A4C9E.50009@gmail.com> References: <4A2A4C9E.50009@gmail.com> Message-ID: <20090606112757.GA17241@amd.home.annexia.org> On Sat, Jun 06, 2009 at 12:01:50PM +0100, Frank Murphy (Frankly3d) wrote: > Is it possible to assign a full *physical drive* > to each guest. Yes, it's possible. Not necessarily advisable though. > If I need one for F11, F11, Rawide > the first two being update in line with releases. > > Do I set this up while installing the host OS? > Best Recommended? I'm not quite clear what you want, but: Assuming you have a PC with four physical drives installed, then you can have the host on one of them (probably /dev/sda is best). During host OS installation, leave /dev/sd[b-d] untouched. Then in virt-install or virt-manager you can select to install the guest using /dev/sd[b-d] as their main drive. *Inside the guest* the drive will appear to the guest as /dev/sda. The reason we don't do this normally is that it's incredibly inflexible. What happens if one guest needs more disk space? Get your screwdriver out and replace that drive? A better solution is to treat all four drives as 'storage', combine them together using RAID and/or LVM, then use LVM to partition out flexible chunks of space for the host and each guest. LVM allows you to resize guest logical volumes[1] to cope with future requirements. Rich. [1] Particularly expanding -- shrinking is a bit more of a problem. -- Richard Jones, Emerging Technologies, Red Hat http://et.redhat.com/~rjones Read my programming blog: http://rwmj.wordpress.com Fedora now supports 75 OCaml packages (the OPEN alternative to F#) http://cocan.org/getting_started_with_ocaml_on_red_hat_and_fedora From rjones at redhat.com Sat Jun 6 12:45:58 2009 From: rjones at redhat.com (Richard W.M. Jones) Date: Sat, 6 Jun 2009 13:45:58 +0100 Subject: [fedora-virt] Too much ram for F10 In-Reply-To: <6172c17e0906051359w1b775126k3b2bb8a53747d4c8@mail.gmail.com> References: <6172c17e0906051359w1b775126k3b2bb8a53747d4c8@mail.gmail.com> Message-ID: <20090606124558.GA17412@amd.home.annexia.org> On Fri, Jun 05, 2009 at 02:59:19PM -0600, Thomas S Hatch wrote: > I already posted about this in the cobbler list and they sent me over here. > It seems that whenever I try to install a new virtual machine(kvm) with > koan, and the ram for the machine is higher than 2 gigs the machine fails to > install. The domain and hard drive image are created, but they won't start > up to do the install. I saw a bug like this go into Bugzilla this week, but for some reason I just can't find it right now ... Maybe someone else can find it? > My guess was that the arch was being set to i686 in the libvirt xml file, > and that that was causing issues, but the vms with 2 gigs of ram and > arch="i686" in the libvirt config install just fine with a 64 bit version of > Fedora. I believe if you're using KVM that there is no difference if the arch selected is i686 or x86-64. KVM provides an x86-64 processor - if you choose to install a i686 operating system in it, so be it. You could try to give the guest some amount of memory which is just under 2GB, eg. 1800KB. Rich. -- Richard Jones, Emerging Technologies, Red Hat http://et.redhat.com/~rjones virt-p2v converts physical machines to virtual machines. Boot with a live CD or over the network (PXE) and turn machines into Xen guests. http://et.redhat.com/~rjones/virt-p2v From rjones at redhat.com Sat Jun 6 12:53:03 2009 From: rjones at redhat.com (Richard W.M. Jones) Date: Sat, 6 Jun 2009 13:53:03 +0100 Subject: [fedora-virt] Install Guest\HD Q? In-Reply-To: <20090606112757.GA17241@amd.home.annexia.org> References: <4A2A4C9E.50009@gmail.com> <20090606112757.GA17241@amd.home.annexia.org> Message-ID: <20090606125303.GB17412@amd.home.annexia.org> On Sat, Jun 06, 2009 at 12:27:57PM +0100, Richard W.M. Jones wrote: > Then in virt-install or virt-manager you can > select to install the guest using /dev/sd[b-d] as their main drive. > > *Inside the guest* the drive will appear to the guest as /dev/sda. Forgot to say there's an additional twist here. It won't affect you with F11+ guests [see bug below], but might affect people installing older versions of Fedora or other Linux distros. LVM doesn't support having two volume groups with the same name. Normally not a problem, but if you insist on using whole physical drives, and if the guests have the same volume group name as each other or the host, that can cause serious problems. https://bugzilla.redhat.com/show_bug.cgi?id=207470 https://bugzilla.redhat.com/show_bug.cgi?id=461682 Another reason why using whole physical drives is a bad idea ... Rich. -- 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 From frankly3d at gmail.com Sat Jun 6 13:01:54 2009 From: frankly3d at gmail.com (Frank Murphy (Frankly3d)) Date: Sat, 06 Jun 2009 14:01:54 +0100 Subject: [fedora-virt] Install Guest\HD Q? In-Reply-To: <20090606125303.GB17412@amd.home.annexia.org> References: <4A2A4C9E.50009@gmail.com> <20090606112757.GA17241@amd.home.annexia.org> <20090606125303.GB17412@amd.home.annexia.org> Message-ID: <4A2A68C2.4090404@gmail.com> Richard W.M. Jones wrote: > > LVM doesn't support having two volume groups with the same name. > Normally not a problem, but if you insist on using whole physical > drives, and if the guests have the same volume group name as each > other or the host, that can cause serious problems. > > https://bugzilla.redhat.com/show_bug.cgi?id=207470 > https://bugzilla.redhat.com/show_bug.cgi?id=461682 > > Another reason why using whole physical drives is a bad idea ... > May look at the LVM setup then for the 3 Guest Drives. Leave SDA for the host, with unique names. Aside: Can Virt-Manager\kvm manage ReactOS as a guest http://www.reactos.org/en/index.html Frank -- msn: frankly3d skype: frankly3d Mailing-List Reply to: Mailing-List Still Learning, Unicode where possible From rjones at redhat.com Sat Jun 6 15:20:35 2009 From: rjones at redhat.com (Richard W.M. Jones) Date: Sat, 6 Jun 2009 16:20:35 +0100 Subject: ReactOS guest (was: Re: [fedora-virt] Install Guest\HD Q?) In-Reply-To: <4A2A68C2.4090404@gmail.com> References: <4A2A4C9E.50009@gmail.com> <20090606112757.GA17241@amd.home.annexia.org> <20090606125303.GB17412@amd.home.annexia.org> <4A2A68C2.4090404@gmail.com> Message-ID: <20090606152035.GA17795@amd.home.annexia.org> On Sat, Jun 06, 2009 at 02:01:54PM +0100, Frank Murphy (Frankly3d) wrote: > Aside: Can Virt-Manager\kvm manage ReactOS as a guest > http://www.reactos.org/en/index.html No idea, but do let us know how it goes. Rich. -- Richard Jones, Emerging Technologies, Red Hat http://et.redhat.com/~rjones virt-top is 'top' for virtual machines. Tiny program with many powerful monitoring features, net stats, disk stats, logging, etc. http://et.redhat.com/~rjones/virt-top From frankly3d at gmail.com Sat Jun 6 17:42:56 2009 From: frankly3d at gmail.com (Frank Murphy) Date: Sat, 06 Jun 2009 18:42:56 +0100 Subject: [fedora-virt] Re: ReactOS guest In-Reply-To: <20090606152035.GA17795@amd.home.annexia.org> References: <4A2A4C9E.50009@gmail.com> <20090606112757.GA17241@amd.home.annexia.org> <20090606125303.GB17412@amd.home.annexia.org> <4A2A68C2.4090404@gmail.com> <20090606152035.GA17795@amd.home.annexia.org> Message-ID: <4A2AAAA0.4070406@gmail.com> Richard W.M. Jones wrote: > On Sat, Jun 06, 2009 at 02:01:54PM +0100, Frank Murphy (Frankly3d) wrote: > >> Aside: Can Virt-Manager\kvm manage ReactOS as a guest >> http://www.reactos.org/en/index.html >> > > No idea, but do let us know how it goes. > > Rich. > > Will do From rjones at redhat.com Sat Jun 6 18:07:41 2009 From: rjones at redhat.com (Richard W.M. Jones) Date: Sat, 6 Jun 2009 19:07:41 +0100 Subject: [fedora-virt] Some new features of virt-inspector Message-ID: <20090606180741.GA18142@amd.home.annexia.org> I've added a few extra features to virt-inspector (in libguestfs >= 1.0.42). First up is a new 'query mode', documented in the manpage: http://et.redhat.com/~rjones/libguestfs/virt-inspector.1.html#query_mode Just run: virt-inspector --query [some virtual machine] and it'll print out some useful facts about the virtual machine such as whether it's fully virtualized or needs a Xen hypervisor, and whether it has various paravirt drivers installed. Secondly (not covered in the manpage), virt-inspector will try to discover whether a VM contains the right initrd drivers and module configuration to boot under various hypervisors. So for example it can tell you whether a guest has the virtio drivers available at boot time to boot from a virtio disk. As usual, to find out more about virt-inspector, see the manual page or the libguestfs home page: http://et.redhat.com/~rjones/libguestfs/virt-inspector.1.html http://et.redhat.com/~rjones/libguestfs/ libguestfs and virt-inspector are available in Fedora 11 updates- testing, or Rawhide, or as RPMs from Koji here: http://koji.fedoraproject.org/koji/buildinfo?buildID=105088 Rich. -- Richard Jones, Emerging Technologies, Red Hat http://et.redhat.com/~rjones Read my programming blog: http://rwmj.wordpress.com Fedora now supports 75 OCaml packages (the OPEN alternative to F#) http://cocan.org/getting_started_with_ocaml_on_red_hat_and_fedora From ondrejj at salstar.sk Sat Jun 6 18:44:37 2009 From: ondrejj at salstar.sk (=?utf-8?B?SsOhbiBPTkRSRUogKFNBTCk=?=) Date: Sat, 6 Jun 2009 20:44:37 +0200 Subject: [fedora-virt] Re: ReactOS guest In-Reply-To: <4A2AAAA0.4070406@gmail.com> References: <4A2A4C9E.50009@gmail.com> <20090606112757.GA17241@amd.home.annexia.org> <20090606125303.GB17412@amd.home.annexia.org> <4A2A68C2.4090404@gmail.com> <20090606152035.GA17795@amd.home.annexia.org> <4A2AAAA0.4070406@gmail.com> Message-ID: <20090606184437.GF2687@salstar.sk> On Sat, Jun 06, 2009 at 06:42:56PM +0100, Frank Murphy wrote: > Richard W.M. Jones wrote: >> On Sat, Jun 06, 2009 at 02:01:54PM +0100, Frank Murphy (Frankly3d) wrote: >> >>> Aside: Can Virt-Manager\kvm manage ReactOS as a guest >>> http://www.reactos.org/en/index.html >>> >> >> No idea, but do let us know how it goes. ReactOS works well for me virt virt-manager/kvm. I only have to use pcnet network card emulation, because other (also default) network cards have no driver in reactos. May be this will be a good feature enhancement requirement to add virtio driver to reactos. :) I can install KVM virtio driver, just it's not functional (no IP detected). After each restart reactos is trying to install "PCI Memory" driver, which is not present. What is it? Can I disable this device in virt-manager? SAL From frankly3d at gmail.com Tue Jun 9 10:04:42 2009 From: frankly3d at gmail.com (Frank Murphy (Frankly3d)) Date: Tue, 09 Jun 2009 11:04:42 +0100 Subject: [fedora-virt] Minimum Host for Virt-Manager? Message-ID: <4A2E33BA.9000102@gmail.com> What is the Minimum Host I can install to rum Virt-Manager? AOS? XFCE? Frank From rjones at redhat.com Tue Jun 9 15:06:15 2009 From: rjones at redhat.com (Richard W.M. Jones) Date: Tue, 9 Jun 2009 16:06:15 +0100 Subject: [fedora-virt] Minimum Host for Virt-Manager? In-Reply-To: <4A2E33BA.9000102@gmail.com> References: <4A2E33BA.9000102@gmail.com> Message-ID: <20090609150615.GA10331@amd.home.annexia.org> On Tue, Jun 09, 2009 at 11:04:42AM +0100, Frank Murphy (Frankly3d) wrote: > What is the Minimum Host I can install to rum Virt-Manager? > > AOS? > XFCE? What's "AOS" in this context? Anyhow, when you compile virt-manager from source you will have to run the ./configure script, which checks that you have all the required packages. (If that was the question). Rich. -- Richard Jones, Emerging Technologies, Red Hat http://et.redhat.com/~rjones virt-df lists disk usage of guests without needing to install any software inside the virtual machine. Supports Linux and Windows. http://et.redhat.com/~rjones/virt-df/ From frankly3d at gmail.com Wed Jun 10 09:04:35 2009 From: frankly3d at gmail.com (Frank Murphy (Frankly3d)) Date: Wed, 10 Jun 2009 10:04:35 +0100 Subject: [fedora-virt] Minimum Host for Virt-Manager? In-Reply-To: <20090609150615.GA10331@amd.home.annexia.org> References: <4A2E33BA.9000102@gmail.com> <20090609150615.GA10331@amd.home.annexia.org> Message-ID: <4A2F7723.7050801@gmail.com> Richard W.M. Jones wrote: > On Tue, Jun 09, 2009 at 11:04:42AM +0100, Frank Murphy (Frankly3d) wrote: >> What is the Minimum Host I can install to rum Virt-Manager? >> >> AOS? >> XFCE? > > What's "AOS" in this context? http://fedoraproject.org/wiki/Features/AOS > > Anyhow, when you compile virt-manager from source you will have to run > the ./configure script, which checks that you have all the required > packages. (If that was the question). > > Rich. > My bad grammer as usual. I meant the smallest Fedora-Install, befora adding the Virt-Packages. Frank From gmaddock at futuremetals.com Wed Jun 10 20:05:21 2009 From: gmaddock at futuremetals.com (Gerry Maddock) Date: Wed, 10 Jun 2009 16:05:21 -0400 Subject: [fedora-virt] Fedora 11 and Virtual Machine Manager Message-ID: Hello all, I have been using qemu-kvm via the virtual machine manger on Fedora 10 and have had no problems (works great & love it!). I just downloaded and installed Fedora 11 64 bit on a new server and logged in as a normal user and started the virtual machine manager. I'm able to connect to the virtual machine manager, but cant setup any new VM's as I'm connected as Read-Only (This must be a new feature). How should I go about connecting to VMM READ-WRITE? Do I need to setup this user in /etc/sudoers to use VMM? Any help would be appreciated! From giallu at gmail.com Wed Jun 10 21:46:38 2009 From: giallu at gmail.com (Gianluca Sforna) Date: Wed, 10 Jun 2009 23:46:38 +0200 Subject: [fedora-virt] Fedora 11 and Virtual Machine Manager In-Reply-To: References: Message-ID: On Wed, Jun 10, 2009 at 10:05 PM, Gerry Maddock wrote: > I'm able to connect to the virtual > machine manager, but cant setup any new VM's as I'm connected as Read-Only > (This must be a new feature). How should I go about connecting to VMM > READ-WRITE? Do I need to setup this user in /etc/sudoers to use VMM? Are you getting the "Password for root" prompt when you start virt-manager? -- Gianluca Sforna http://morefedora.blogspot.com http://www.linkedin.com/in/gianlucasforna From admin at mail.cs.montana.edu Wed Jun 10 23:03:23 2009 From: admin at mail.cs.montana.edu (Scott Dowdle) Date: Wed, 10 Jun 2009 17:03:23 -0600 (MDT) Subject: [fedora-virt] Fedora 11 - Networking fails in KVM VMs In-Reply-To: <10058436.6971244674728368.JavaMail.root@mail.cs.montana.edu> Message-ID: <26362233.7001244675003136.JavaMail.root@mail.cs.montana.edu> Greetings, I have used KVM in Fedora now since Fedora 9 and it has always done quite well and I've been very happy with it. Today I did a fresh Fedora 11 install (retaining my /home and /vm directories where my .img files were stored) and copied my Fedora 10 /etc/libvirt/qemu/*.xml from backup. My machines started fine. The one Windows VM I had noticed a lot of new hardware. Everything seems to work fine and be very fast... but networking does NOT work in any of my VMs. Thinking that perhaps something had changed in the .xml files, I deleted all of the VMs (but retained their storage) and created all new VMs using the existing storage. I don't have any fancy networking going on. My physical machine has a public IP address. It has NATing turned on and ip_foward = 1. The VMs are default ones with privates that are gotten via DHCP with the internal DHCP server and I have not messed with any of the DHCP settings in virt-manager. In the past, the VMs would get a 192.168.122.x address and they just worked. Now they can't seem to get an IP. I'm guessing it is something funky with my iptables settings but I can't seem to see anything out of the ordinary. Anyone else run into problems or have some suggestions for troubleshooting this? So far I haven't seen anything on the mailing list that applies. I've installed Fedora 11 on about 6 machines now and a few VMs for building remix images and it has been great. Good job. TYL, -- Scott Dowdle CS Department SysAdmin EPS 262 406-994-3931 [work] 406-388-0827 [home] From markmc at redhat.com Thu Jun 11 07:55:47 2009 From: markmc at redhat.com (Mark McLoughlin) Date: Thu, 11 Jun 2009 08:55:47 +0100 Subject: [fedora-virt] Fedora 11 - Networking fails in KVM VMs In-Reply-To: <26362233.7001244675003136.JavaMail.root@mail.cs.montana.edu> References: <26362233.7001244675003136.JavaMail.root@mail.cs.montana.edu> Message-ID: <1244706947.4411.20.camel@blaa> On Wed, 2009-06-10 at 17:03 -0600, Scott Dowdle wrote: > I don't have any fancy networking going on. My physical machine has a > public IP address. It has NATing turned on and ip_foward = 1. The > VMs are default ones with privates that are gotten via DHCP with the > internal DHCP server and I have not messed with any of the DHCP > settings in virt-manager. In the past, the VMs would get a > 192.168.122.x address and they just worked. Now they can't seem to > get an IP. > > I'm guessing it is something funky with my iptables settings but I > can't seem to see anything out of the ordinary. Try posting the output of the commands suggested here: https://fedoraproject.org/wiki/Reporting_virtualization_bugs#Networking Cheers, Mark. From colin.coates at uk.ibm.com Thu Jun 11 12:35:09 2009 From: colin.coates at uk.ibm.com (Colin Coates) Date: Thu, 11 Jun 2009 13:35:09 +0100 Subject: [fedora-virt] Error using Virtual Machine Manager to create new Windows XP VM Message-ID: Dear All, I was previously successful in using KVM/Qemu to create and run a Windows XP virtual machine hosted on Fedora 10. I have now upgraded to Fedora 11 x86_64 (using Live distribution), but I get an error whilst using the Virtual Machine Manager to create a Windows XP virtual machine. The virtual machine is configured to install from a local CD (containing the Windows XP Pro install CD), OS type is "Windows", Version is "Microsoft Windows XP (x86)", memory is 1536MB, CPU set to 1, disk is 50GB (allocate entire disk now). My host PC is a Lenovo T60p (Intel Core 2 Duo with 4GB physical memory), and I have enable Intel Virtualization in the BIOS. The message displayed in the Error dialog is: "Unable to complete install: 'internal error unable to start guest: char device redirected to /dev/pts/0 char device redirected to /dev/pts/1" The details are: "Unable to complete install ' internal error unable to start guest: char device redirected to /dev/pts/0 char device redirected to /dev/pts/1 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/lib64/python2.6/site-packages/libvirt.py", line 974, in createLinux if ret is None:raise libvirtError('virDomainCreateLinux() failed', conn=self) libvirtError: internal error unable to start guest: char device redirected to /dev/pts/0 char device redirected to /dev/pts/1" Can anyone offer any suggestions about what I might be doing wrong? Kind Regards, Colin Coates From admin at mail.cs.montana.edu Thu Jun 11 14:58:25 2009 From: admin at mail.cs.montana.edu (Scott Dowdle) Date: Thu, 11 Jun 2009 08:58:25 -0600 (MDT) Subject: [fedora-virt] Fedora 11 - Networking fails in KVM VMs In-Reply-To: <1244706947.4411.20.camel@blaa> Message-ID: <20054240.7091244732305250.JavaMail.root@mail.cs.montana.edu> Mark, ----- "Mark McLoughlin" wrote: > On Wed, 2009-06-10 at 17:03 -0600, Scott Dowdle wrote: > > I don't have any fancy networking going on. My physical machine has > a > > public IP address. It has NATing turned on and ip_foward = 1. The > > VMs are default ones with privates that are gotten via DHCP with > the > > internal DHCP server and I have not messed with any of the DHCP > > settings in virt-manager. In the past, the VMs would get a > > 192.168.122.x address and they just worked. Now they can't seem to > > get an IP. > > > > I'm guessing it is something funky with my iptables settings but I > > can't seem to see anything out of the ordinary. > > Try posting the output of the commands suggested here: > > > https://fedoraproject.org/wiki/Reporting_virtualization_bugs#Networking > > Cheers, > Mark. Sorry about replying directly back to you with my last message. I did what it said there and sent you a link to the output BUT I then tested a VM and networking was working... so perhaps it was the reload at the end of the sequence. Nevermind. Thanks, -- Scott Dowdle CS Department SysAdmin EPS 262 406-994-3931 [work] 406-388-0827 [home] From timtas at cubic.ch Thu Jun 11 16:09:50 2009 From: timtas at cubic.ch (Tim Tassonis) Date: Thu, 11 Jun 2009 18:09:50 +0200 Subject: [fedora-virt] libguestfs under Debian / Ubuntu Message-ID: <4A312C4E.7070809@cubic.ch> Hi all Just came across libguestfs and, as a qemu user, this project really sound fantastic to me. However, when I tried to compile the latest tarball, I failed, mainly because of the inavalability of febootstrap, which obviously does not exist under ubuntu, and cannot be installed due to the lack of yum under ubuntu at least. Is debian support planned, or is libguestfs designed to be a fedora-only project? Bye Tim From erenoglu at gmail.com Thu Jun 11 18:46:19 2009 From: erenoglu at gmail.com (Emre Erenoglu) Date: Thu, 11 Jun 2009 20:46:19 +0200 Subject: [fedora-virt] libguestfs under Debian / Ubuntu In-Reply-To: <4A312C4E.7070809@cubic.ch> References: <4A312C4E.7070809@cubic.ch> Message-ID: On Thu, Jun 11, 2009 at 6:09 PM, Tim Tassonis wrote: > > However, when I tried to compile the latest tarball, I failed, ?mainly > because of the inavalability of febootstrap, which obviously does not exist > under ubuntu, and cannot be installed due to the lack of yum under ubuntu at > least. > > Is debian support planned, or is libguestfs designed to be a fedora-only > project? I also want to package libguestfs for our distro, Pardus, but unable to do so due to this dependency. -- Emre From berrange at redhat.com Thu Jun 11 18:56:17 2009 From: berrange at redhat.com (Daniel P. Berrange) Date: Thu, 11 Jun 2009 19:56:17 +0100 Subject: [fedora-virt] libguestfs under Debian / Ubuntu In-Reply-To: <4A312C4E.7070809@cubic.ch> References: <4A312C4E.7070809@cubic.ch> Message-ID: <20090611185617.GQ12216@redhat.com> On Thu, Jun 11, 2009 at 06:09:50PM +0200, Tim Tassonis wrote: > Hi all > > Just came across libguestfs and, as a qemu user, this project really > sound fantastic to me. > > However, when I tried to compile the latest tarball, I failed, mainly > because of the inavalability of febootstrap, which obviously does not > exist under ubuntu, and cannot be installed due to the lack of yum under > ubuntu at least. Even though Debian/Ubunut use APT for their package mgmt system, there should not be any problem installing the YUM + RPM libraries. This should allow febootstrap to be built & run, and not impact your host OS package mgmt > Is debian support planned, or is libguestfs designed to be a fedora-only > project? It is certainly intended to be able to build libguestfs on any Linux host with new enough fakeroot/fakechroot + YUM/RPM libraries. IMHO it doesn't make sense to try and use different OS for its internal appliance image, since that's not really a distro you need to interface with at all as a user of libguestfs. Regards, Daniel -- |: Red Hat, Engineering, London -o- http://people.redhat.com/berrange/ :| |: http://libvirt.org -o- http://virt-manager.org -o- http://ovirt.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :| From timtas at cubic.ch Thu Jun 11 19:11:51 2009 From: timtas at cubic.ch (Tim Tassonis) Date: Thu, 11 Jun 2009 21:11:51 +0200 Subject: [fedora-virt] libguestfs under Debian / Ubuntu In-Reply-To: <20090611185617.GQ12216@redhat.com> References: <4A312C4E.7070809@cubic.ch> <20090611185617.GQ12216@redhat.com> Message-ID: <4A3156F7.7020804@cubic.ch> Daniel P. Berrange wrote: > On Thu, Jun 11, 2009 at 06:09:50PM +0200, Tim Tassonis wrote: >> Hi all >> >> Just came across libguestfs and, as a qemu user, this project really >> sound fantastic to me. >> >> However, when I tried to compile the latest tarball, I failed, mainly >> because of the inavalability of febootstrap, which obviously does not >> exist under ubuntu, and cannot be installed due to the lack of yum under >> ubuntu at least. > > Even though Debian/Ubunut use APT for their package mgmt system, there > should not be any problem installing the YUM + RPM libraries. This > should allow febootstrap to be built & run, and not impact your host > OS package mgmt Yes, of course....but since it is mentioned that febootstrap is based on debootstrap, is there a technical reason for not just supporting debootstrap alternatively. I haven't got enough background regarding debootstrap/febootstrap and libguestfs to make a judgement about this though. But to require any distribution to install yum/rpm just for this library seems a bit intrusive to me. Requiring a specific distro packaging system for a package seems a bit distribution dependant to me. Regards Tim From erenoglu at gmail.com Thu Jun 11 19:24:44 2009 From: erenoglu at gmail.com (Emre Erenoglu) Date: Thu, 11 Jun 2009 21:24:44 +0200 Subject: [fedora-virt] libguestfs under Debian / Ubuntu In-Reply-To: <4A3156F7.7020804@cubic.ch> References: <4A312C4E.7070809@cubic.ch> <20090611185617.GQ12216@redhat.com> <4A3156F7.7020804@cubic.ch> Message-ID: On Thu, Jun 11, 2009 at 9:11 PM, Tim Tassonis wrote: > Daniel P. Berrange wrote: >> >> On Thu, Jun 11, 2009 at 06:09:50PM +0200, Tim Tassonis wrote: >>> >>> Hi all >>> >>> Just came across libguestfs and, as a qemu user, this project really >>> sound fantastic to me. >>> >>> However, when I tried to compile the latest tarball, I failed, ?mainly >>> because of the inavalability of febootstrap, which obviously does not exist >>> under ubuntu, and cannot be installed due to the lack of yum under ubuntu at >>> least. >> >> Even though Debian/Ubunut use APT for their package mgmt system, there >> should not be any problem installing the YUM + RPM libraries. This should >> allow febootstrap to be built & run, and not impact your host OS package >> mgmt > > Yes, of course....but since it is mentioned that febootstrap is based on > debootstrap, is there a technical reason for not just supporting debootstrap > alternatively. I haven't got enough background regarding > debootstrap/febootstrap and libguestfs to make a judgement about this > though. > > But to require any distribution to install yum/rpm just for this library > ?seems a bit intrusive to me. Requiring a specific distro packaging system > for a package seems a bit distribution dependant to me. This is exactly my problem. I didn't really analyze why febootstrap or debootstrap might be technically needed, but I appreciate if there's an alternative way to this requirement. Our distro, possibly some others out there, do not have any {fe,de]bootstrap packages. Thanks, Emre From bill at bfccomputing.com Thu Jun 11 19:38:30 2009 From: bill at bfccomputing.com (Bill McGonigle) Date: Thu, 11 Jun 2009 15:38:30 -0400 Subject: [fedora-virt] handling guest-service dependencies at boot time elegantly? Message-ID: <4A315D36.7040500@bfccomputing.com> Hi, all, Before I start hacking up my own poor solution, I'd like to run this by the list and see if there's a good way to handle this. I have a host (5.3 Xen Dom0) that has three guests: Fedora 10 Fedora 11 Nexenta 2 The Nexenta (opensolaris) guest's job is to provide storage services to the Fedora DomU's, via iSCSI and NFS (ZFS storage). My goal is to automate system startup. My dependency tree looks like: Dom0 -> nexenta-DomU -> 'service iscsi'@Dom0 -> fedora-DomU's Currently I have xendomains and iscsi set to 'chkconfig off' and the fedora DomU's set for 'auto', and do: xm create nexenta [watch xentop to see when it's running] service iscsi start service xendomains start Which works find and requires me to do it. I can write some scripts to do the same thing, but if there was a more general-purpose way to express these kinds of boot-time dependencies, I'd rather do it right. I was thinking perhaps upstart could be co-opted for this purpose, if I can make it not cobbler init (it would have to run alongside on 5.3). Are there any libvirt event hooks into upstart? Thanks, -Bill -- Bill McGonigle, Owner Work: 603.448.4440 BFC Computing, LLC Home: 603.448.1668 http://www.bfccomputing.com/ Cell: 603.252.2606 Twitter, etc.: bill_mcgonigle Page: 603.442.1833 Email, IM, VOIP: bill at bfccomputing.com Blog: http://blog.bfccomputing.com/ VCard: http://bfccomputing.com/vcard/bill.vcf From berrange at redhat.com Thu Jun 11 20:24:34 2009 From: berrange at redhat.com (Daniel P. Berrange) Date: Thu, 11 Jun 2009 21:24:34 +0100 Subject: [fedora-virt] libguestfs under Debian / Ubuntu In-Reply-To: <4A3156F7.7020804@cubic.ch> References: <4A312C4E.7070809@cubic.ch> <20090611185617.GQ12216@redhat.com> <4A3156F7.7020804@cubic.ch> Message-ID: <20090611202434.GA10738@redhat.com> On Thu, Jun 11, 2009 at 09:11:51PM +0200, Tim Tassonis wrote: > Daniel P. Berrange wrote: > >On Thu, Jun 11, 2009 at 06:09:50PM +0200, Tim Tassonis wrote: > >>Hi all > >> > >>Just came across libguestfs and, as a qemu user, this project really > >>sound fantastic to me. > >> > >>However, when I tried to compile the latest tarball, I failed, mainly > >>because of the inavalability of febootstrap, which obviously does not > >>exist under ubuntu, and cannot be installed due to the lack of yum under > >>ubuntu at least. > > > >Even though Debian/Ubunut use APT for their package mgmt system, there > >should not be any problem installing the YUM + RPM libraries. This > >should allow febootstrap to be built & run, and not impact your host > >OS package mgmt > > Yes, of course....but since it is mentioned that febootstrap is based on > debootstrap, is there a technical reason for not just supporting > debootstrap alternatively. I haven't got enough background regarding > debootstrap/febootstrap and libguestfs to make a judgement about this > though. They are conceptually the same, but different implementations. debootstrap takes a APT repository and uses a chroot to setup a distro install based off the Debian packages in that repo. febootstrap takes a YUM repository and uses a chroot to setup a distro install based off the RPM packages in that repo. libguestfs uses a febootstrap to install a custom Fedora 11 appliance which it boots within QEMU in order to access the filesystems. You can't use debootstrap to build a Fedora 11 appliance, and vica-verca. So if you wanted to use debootstrap you'd have to come up with a recipe that provided the same functionality as the febootstrap recipe. That's doable, but more work than just installing RPM/YUM libraries IMHO. Regards, Daniel -- |: Red Hat, Engineering, London -o- http://people.redhat.com/berrange/ :| |: http://libvirt.org -o- http://virt-manager.org -o- http://ovirt.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :| From rjones at redhat.com Thu Jun 11 20:44:17 2009 From: rjones at redhat.com (Richard W.M. Jones) Date: Thu, 11 Jun 2009 21:44:17 +0100 Subject: [fedora-virt] libguestfs under Debian / Ubuntu In-Reply-To: <4A312C4E.7070809@cubic.ch> References: <4A312C4E.7070809@cubic.ch> Message-ID: <20090611204417.GA28848@amd.home.annexia.org> On Thu, Jun 11, 2009 at 06:09:50PM +0200, Tim Tassonis wrote: > Hi all > > Just came across libguestfs and, as a qemu user, this project really > sound fantastic to me. > > However, when I tried to compile the latest tarball, I failed, mainly > because of the inavalability of febootstrap, which obviously does not > exist under ubuntu, and cannot be installed due to the lack of yum under > ubuntu at least. yum, rpm and febootstrap _are_ in Debian (as of last week), so it'll be in Ubuntu soon enough. I've got some packages of febootstrap and libguestfs which you can try here: http://www.annexia.org/tmp/debian/ The febootstrap package is reasonable. The libguestfs packaging is a bit crap, although it does work. > Is debian support planned, or is libguestfs designed to be a fedora-only > project? We definitely want to support other distros (not just Debian). Guido Gunter, who I think is on this list, contacted me about doing a pure Debian port of libguestfs using debootstrap. Rich. -- Richard Jones, Emerging Technologies, Red Hat http://et.redhat.com/~rjones virt-p2v converts physical machines to virtual machines. Boot with a live CD or over the network (PXE) and turn machines into Xen guests. http://et.redhat.com/~rjones/virt-p2v From rjones at redhat.com Thu Jun 11 20:46:19 2009 From: rjones at redhat.com (Richard W.M. Jones) Date: Thu, 11 Jun 2009 21:46:19 +0100 Subject: [fedora-virt] libguestfs under Debian / Ubuntu In-Reply-To: References: <4A312C4E.7070809@cubic.ch> Message-ID: <20090611204619.GB28848@amd.home.annexia.org> On Thu, Jun 11, 2009 at 08:46:19PM +0200, Emre Erenoglu wrote: > On Thu, Jun 11, 2009 at 6:09 PM, Tim Tassonis wrote: > > > > However, when I tried to compile the latest tarball, I failed, ?mainly > > because of the inavalability of febootstrap, which obviously does not exist > > under ubuntu, and cannot be installed due to the lack of yum under ubuntu at > > least. > > > > Is debian support planned, or is libguestfs designed to be a fedora-only > > project? > > I also want to package libguestfs for our distro, Pardus, but unable > to do so due to this dependency. You can just compile yum on pretty much any distro. The only major dependencies are Python and rpm (which just needs a C compiler). Debian ship a yum package and have been doing so for quite a long time. febootstrap is little more than a shell script which wraps around yum. Rich. -- Richard Jones, Emerging Technologies, Red Hat http://et.redhat.com/~rjones virt-df lists disk usage of guests without needing to install any software inside the virtual machine. Supports Linux and Windows. http://et.redhat.com/~rjones/virt-df/ From rjones at redhat.com Thu Jun 11 20:49:56 2009 From: rjones at redhat.com (Richard W.M. Jones) Date: Thu, 11 Jun 2009 21:49:56 +0100 Subject: [fedora-virt] libguestfs under Debian / Ubuntu In-Reply-To: <4A3156F7.7020804@cubic.ch> References: <4A312C4E.7070809@cubic.ch> <20090611185617.GQ12216@redhat.com> <4A3156F7.7020804@cubic.ch> Message-ID: <20090611204956.GC28848@amd.home.annexia.org> On Thu, Jun 11, 2009 at 09:11:51PM +0200, Tim Tassonis wrote: > Daniel P. Berrange wrote: >> On Thu, Jun 11, 2009 at 06:09:50PM +0200, Tim Tassonis wrote: >>> Hi all >>> >>> Just came across libguestfs and, as a qemu user, this project really >>> sound fantastic to me. >>> >>> However, when I tried to compile the latest tarball, I failed, >>> mainly because of the inavalability of febootstrap, which obviously >>> does not exist under ubuntu, and cannot be installed due to the lack >>> of yum under ubuntu at least. >> >> Even though Debian/Ubunut use APT for their package mgmt system, there >> should not be any problem installing the YUM + RPM libraries. This >> should allow febootstrap to be built & run, and not impact your host >> OS package mgmt > > Yes, of course....but since it is mentioned that febootstrap is based on > debootstrap, is there a technical reason for not just supporting > debootstrap alternatively. I haven't got enough background regarding > debootstrap/febootstrap and libguestfs to make a judgement about this > though. I summarised the options here: http://www.redhat.com/archives/fedora-virt/2009-May/msg00003.html For the Debian package I went with option (1), since Debian already has yum and rpm packaged. > But to require any distribution to install yum/rpm just for this library > seems a bit intrusive to me. Requiring a specific distro packaging > system for a package seems a bit distribution dependant to me. It's not like that. Just because Debian ship yum doesn't mean that anyone has to abandon apt. yum under Debian is only used where someone wants to install an RPM-based distro from a Debian host, eg. as a chroot, or in a virtual machine, or (as in this case) to build an appliance. Rich. -- 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 From rjones at redhat.com Thu Jun 11 20:53:33 2009 From: rjones at redhat.com (Richard W.M. Jones) Date: Thu, 11 Jun 2009 21:53:33 +0100 Subject: [fedora-virt] handling guest-service dependencies at boot time elegantly? In-Reply-To: <4A315D36.7040500@bfccomputing.com> References: <4A315D36.7040500@bfccomputing.com> Message-ID: <20090611205333.GD28848@amd.home.annexia.org> On Thu, Jun 11, 2009 at 03:38:30PM -0400, Bill McGonigle wrote: > xm create nexenta > [watch xentop to see when it's running] > service iscsi start > service xendomains start > > Which works find and requires me to do it. I can write some scripts to > do the same thing, but if there was a more general-purpose way to > express these kinds of boot-time dependencies, I'd rather do it right. > > I was thinking perhaps upstart could be co-opted for this purpose, if I > can make it not cobbler init (it would have to run alongside on 5.3). > Are there any libvirt event hooks into upstart? Common problem, no good solutions. The best advice I think is to change your architecture so that virtual machines can cope with other services being unavailable. Not just at boot time, but _any_ time, because you never know when you might need to restart your iscsi service. NFS can do this with background mounts and so on. I'm not sure about iscsi though ... Rich. -- Richard Jones, Emerging Technologies, Red Hat http://et.redhat.com/~rjones virt-p2v converts physical machines to virtual machines. Boot with a live CD or over the network (PXE) and turn machines into Xen guests. http://et.redhat.com/~rjones/virt-p2v From rjones at redhat.com Thu Jun 11 21:05:32 2009 From: rjones at redhat.com (Richard W.M. Jones) Date: Thu, 11 Jun 2009 22:05:32 +0100 Subject: [fedora-virt] libguestfs under Debian / Ubuntu In-Reply-To: <4A312C4E.7070809@cubic.ch> References: <4A312C4E.7070809@cubic.ch> Message-ID: <20090611210532.GA29008@amd.home.annexia.org> BTW if anyone is confused about the architecture of libguestfs, it's all explained in the manual: http://libguestfs.org/guestfs.3.html#state_machine_and_low_level_event_api Rich. -- 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 From erenoglu at gmail.com Thu Jun 11 23:14:07 2009 From: erenoglu at gmail.com (Emre Erenoglu) Date: Fri, 12 Jun 2009 01:14:07 +0200 Subject: [fedora-virt] libguestfs under Debian / Ubuntu In-Reply-To: <20090611202434.GA10738@redhat.com> References: <4A312C4E.7070809@cubic.ch> <20090611185617.GQ12216@redhat.com> <4A3156F7.7020804@cubic.ch> <20090611202434.GA10738@redhat.com> Message-ID: On Thu, Jun 11, 2009 at 10:24 PM, Daniel P. Berrange wrote: > > that repo. libguestfs uses a febootstrap to install a custom Fedora 11 > appliance which it boots within QEMU in order to access the filesystems. If the sole purpose of febootstrap is to install a custom F11 appliance to boot in qemu, why don't we prepare this image beforehand, put it somewhere on the web, so that libguestfs can just use it without needing to build this appliance again in each machine with febootstrap or debootstrap? I read the documentation of libguestfs, but still didn't understand very well why we need to boot an OS within qemu for accessing guest file systems. Can't we just use loop devices, kpartx and lvm tools? Am i missing something here? Thanks a lot, -- Emre From bill at bfccomputing.com Thu Jun 11 23:38:43 2009 From: bill at bfccomputing.com (Bill McGonigle) Date: Thu, 11 Jun 2009 19:38:43 -0400 Subject: [fedora-virt] handling guest-service dependencies at boot time elegantly? In-Reply-To: <20090611205333.GD28848@amd.home.annexia.org> References: <4A315D36.7040500@bfccomputing.com> <20090611205333.GD28848@amd.home.annexia.org> Message-ID: <4A319583.2090405@bfccomputing.com> On 06/11/2009 04:53 PM, Richard W.M. Jones wrote: > Common problem, no good solutions. OK, that's helpful to know I haven't missed the obvious. > The best advice I think is to change your architecture so that virtual > machines can cope with other services being unavailable. Not just at > boot time, but_any_ time, because you never know when you might need > to restart your iscsi service. > > NFS can do this with background mounts and so on. I'm not sure about > iscsi though ... NFS root is the next thing on my list to figure out. :) I'd like to get it to the point of only needing /boot on iSCSI, at least until btrfs lands. I should probably mount it sync too, just in case. Does Xen deal with a device going away and coming back with the same name? Either automatic or via hotplugging would be effective. I'm using /dev/disk/by-path/ names so they should line up correctly at least. Thanks, -Bill -- Bill McGonigle, Owner Work: 603.448.4440 BFC Computing, LLC Home: 603.448.1668 http://www.bfccomputing.com/ Cell: 603.252.2606 Twitter, etc.: bill_mcgonigle Page: 603.442.1833 Email, IM, VOIP: bill at bfccomputing.com Blog: http://blog.bfccomputing.com/ VCard: http://bfccomputing.com/vcard/bill.vcf From clalance at redhat.com Fri Jun 12 06:41:33 2009 From: clalance at redhat.com (Chris Lalancette) Date: Fri, 12 Jun 2009 08:41:33 +0200 Subject: [fedora-virt] handling guest-service dependencies at boot time elegantly? In-Reply-To: <4A315D36.7040500@bfccomputing.com> References: <4A315D36.7040500@bfccomputing.com> Message-ID: <4A31F89D.9080607@redhat.com> Bill McGonigle wrote: > Hi, all, > > Before I start hacking up my own poor solution, I'd like to run this by > the list and see if there's a good way to handle this. > > I have a host (5.3 Xen Dom0) that has three guests: > > Fedora 10 > Fedora 11 > Nexenta 2 > > The Nexenta (opensolaris) guest's job is to provide storage services to > the Fedora DomU's, via iSCSI and NFS (ZFS storage). > > My goal is to automate system startup. > > My dependency tree looks like: > > Dom0 -> nexenta-DomU -> 'service iscsi'@Dom0 -> fedora-DomU's > > Currently I have xendomains and iscsi set to 'chkconfig off' and the > fedora DomU's set for 'auto', and do: > > xm create nexenta > [watch xentop to see when it's running] > service iscsi start > service xendomains start If I were going to do this, I'd write a very small daemon to run in the dom0 that just listens to a couple of ports. On dom0 boot, I would start this daemon, which would first exec "xm create nexenta", then wait around for a little while listening from a connection on port, say, 4567. Inside the nexenta guest, you just have a simple "nc" command that connects to the dom0 once it is booted, and acts like a "I'm ready" command. Once your dom0 daemon receives this, it can go onto the next step (service iscsi start), and then finally onto your last step. It's a bit hacky, but it centralizes control all in one place, and it is pretty easy to write. -- Chris Lalancette From clalance at redhat.com Fri Jun 12 06:42:18 2009 From: clalance at redhat.com (Chris Lalancette) Date: Fri, 12 Jun 2009 08:42:18 +0200 Subject: [fedora-virt] handling guest-service dependencies at boot time elegantly? In-Reply-To: <4A319583.2090405@bfccomputing.com> References: <4A315D36.7040500@bfccomputing.com> <20090611205333.GD28848@amd.home.annexia.org> <4A319583.2090405@bfccomputing.com> Message-ID: <4A31F8CA.6010704@redhat.com> Bill McGonigle wrote: > Does Xen deal with a device going away and coming back with the same > name? Either automatic or via hotplugging would be effective. I'm > using /dev/disk/by-path/ names so they should line up correctly at least. Yes, this should be fine. You can do "xm block-detach" followed by an "xm block-attach" without issues, and the blkfront driver in the guest handles it. -- Chris Lalancette From rjones at redhat.com Fri Jun 12 08:34:45 2009 From: rjones at redhat.com (Richard W.M. Jones) Date: Fri, 12 Jun 2009 09:34:45 +0100 Subject: [fedora-virt] libguestfs under Debian / Ubuntu In-Reply-To: References: <4A312C4E.7070809@cubic.ch> <20090611185617.GQ12216@redhat.com> <4A3156F7.7020804@cubic.ch> <20090611202434.GA10738@redhat.com> Message-ID: <20090612083445.GA31205@amd.home.annexia.org> On Fri, Jun 12, 2009 at 01:14:07AM +0200, Emre Erenoglu wrote: > On Thu, Jun 11, 2009 at 10:24 PM, Daniel P. Berrange wrote: > > > > that repo. libguestfs uses a febootstrap to install a custom Fedora 11 > > appliance which it boots within QEMU in order to access the filesystems. > > If the sole purpose of febootstrap is to install a custom F11 > appliance to boot in qemu, why don't we prepare this image beforehand, > put it somewhere on the web, so that libguestfs can just use it > without needing to build this appliance again in each machine with > febootstrap or debootstrap? We want you to be able to build everything from source. Also it allows you to customize the appliance by editing the script that builds it (eg. leaving out a feature or adding other kernel modules). In any case, febootstrap can build the appliance in under 3 minutes on my machine, so this is hardly a problem for libguestfs. > I read the documentation of libguestfs, but still didn't understand > very well why we need to boot an OS within qemu for accessing guest > file systems. Can't we just use loop devices, kpartx and lvm tools? Because this would require root, and the point of libguestfs is that nothing needs to be root. 'libguestfs.so' is a plain library - you could link it to your webserver running as nobody.nobody, and it still works. Using loop devices has other disadvantages: it's liable to leave temporary mounts & devices around if something fails, and it doesn't work at all if there are conflicting VG names. Rich. -- 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 From erenoglu at gmail.com Fri Jun 12 08:51:09 2009 From: erenoglu at gmail.com (Emre Erenoglu) Date: Fri, 12 Jun 2009 10:51:09 +0200 Subject: [fedora-virt] libguestfs under Debian / Ubuntu In-Reply-To: <20090612083445.GA31205@amd.home.annexia.org> References: <4A312C4E.7070809@cubic.ch> <20090611185617.GQ12216@redhat.com> <4A3156F7.7020804@cubic.ch> <20090611202434.GA10738@redhat.com> <20090612083445.GA31205@amd.home.annexia.org> Message-ID: On Fri, Jun 12, 2009 at 10:34 AM, Richard W.M. Jones wrote: > On Fri, Jun 12, 2009 at 01:14:07AM +0200, Emre Erenoglu wrote: > > On Thu, Jun 11, 2009 at 10:24 PM, Daniel P. Berrange > wrote: > > > > > > that repo. libguestfs uses a febootstrap to install a custom Fedora 11 > > > appliance which it boots within QEMU in order to access the > filesystems. > > > > If the sole purpose of febootstrap is to install a custom F11 > > appliance to boot in qemu, why don't we prepare this image beforehand, > > put it somewhere on the web, so that libguestfs can just use it > > without needing to build this appliance again in each machine with > > febootstrap or debootstrap? > > We want you to be able to build everything from source. Also it > allows you to customize the appliance by editing the script that > builds it (eg. leaving out a feature or adding other kernel modules). > In any case, febootstrap can build the appliance in under 3 minutes on > my machine, so this is hardly a problem for libguestfs. OK I see now. I would wish that if the configure script is not able to find febootstrap, it would fall back into using a pre-cooked generic swiss army knife image file instead. That would make libguestfs pretty trivial to package for our distro or others, without needing to package yum and febootstrap etc. > I read the documentation of libguestfs, but still didn't understand > > very well why we need to boot an OS within qemu for accessing guest > > file systems. Can't we just use loop devices, kpartx and lvm tools? > > > Because this would require root, and the point of libguestfs is that > nothing needs to be root. 'libguestfs.so' is a plain library - you > could link it to your webserver running as nobody.nobody, and it still > works. Using loop devices has other disadvantages: it's liable to > leave temporary mounts & devices around if something fails, and it > doesn't work at all if there are conflicting VG names. OK, thanks a lot for this insight. I would say "why not use policykit when privilege is needed, or mount images with fuse etc. ", but the possibility to link to a webserver may not work this way :) Anyway, I'm sure you considered all these options previously, sorry for taking your time to ask these again :) You know, my only problem is with febootstrap and I'm trying to find a way out of this dependency. Thanks again, -- Emre -------------- next part -------------- An HTML attachment was scrubbed... URL: From markmc at redhat.com Fri Jun 12 09:24:14 2009 From: markmc at redhat.com (Mark McLoughlin) Date: Fri, 12 Jun 2009 10:24:14 +0100 Subject: [fedora-virt] Error using Virtual Machine Manager to create new Windows XP VM In-Reply-To: References: Message-ID: <1244798654.30522.0.camel@blaa> Hi Colin, On Thu, 2009-06-11 at 13:35 +0100, Colin Coates wrote: > The message displayed in the Error dialog is: > "Unable to complete install: 'internal error unable to start guest: char > device redirected to /dev/pts/0 > char device redirected to /dev/pts/1" This doesn't tell us anything, I'm afraid. Is there anything more interesting in /var/log/libvirt/qemu/$guest.log ? See also https://fedoraproject.org/wiki/Reporting virtualization bugs Cheers, Mark. From timtas at cubic.ch Fri Jun 12 09:48:41 2009 From: timtas at cubic.ch (Tim Tassonis) Date: Fri, 12 Jun 2009 11:48:41 +0200 Subject: [fedora-virt] libguestfs under Debian / Ubuntu In-Reply-To: <20090611204956.GC28848@amd.home.annexia.org> References: <4A312C4E.7070809@cubic.ch> <20090611185617.GQ12216@redhat.com> <4A3156F7.7020804@cubic.ch> <20090611204956.GC28848@amd.home.annexia.org> Message-ID: <4A322479.2080105@cubic.ch> Richard W.M. Jones wrote: > On Thu, Jun 11, 2009 at 09:11:51PM +0200, Tim Tassonis wrote: >> Daniel P. Berrange wrote: >>> On Thu, Jun 11, 2009 at 06:09:50PM +0200, Tim Tassonis wrote: >>>> Hi all >>>> >> Yes, of course....but since it is mentioned that febootstrap is based on >> debootstrap, is there a technical reason for not just supporting >> debootstrap alternatively. I haven't got enough background regarding >> debootstrap/febootstrap and libguestfs to make a judgement about this >> though. > > I summarised the options here: > > http://www.redhat.com/archives/fedora-virt/2009-May/msg00003.html > > For the Debian package I went with option (1), since Debian already > has yum and rpm packaged. Thanks, I guess in an ideal world the best solution would be to have a configure option like --image=[febootstrap|debootstrap|fixed] or so, and then the package would be setup to use febootstrap on redhat-based systems, debootstrap on debian-based system and fixed to use a pre-build image. As you say, it won't be too difficult, but clearly the patch doesn't write itself ... But such a patch to libguestfs would be accepted in your opinion? > >> But to require any distribution to install yum/rpm just for this library >> seems a bit intrusive to me. Requiring a specific distro packaging >> system for a package seems a bit distribution dependant to me. > > It's not like that. Just because Debian ship yum doesn't mean that > anyone has to abandon apt. yum under Debian is only used where > someone wants to install an RPM-based distro from a Debian host, > eg. as a chroot, or in a virtual machine, or (as in this case) to > build an appliance. Sorry, I didn't mean that, it was clear to me that yum/rpm wouldn't replace apt/dpkg, it's just that I think the requirement of febootsrap / yum on a debian distribution is a bit problematic. > > Rich. > From rjones at redhat.com Fri Jun 12 10:18:38 2009 From: rjones at redhat.com (Richard W.M. Jones) Date: Fri, 12 Jun 2009 11:18:38 +0100 Subject: [fedora-virt] libguestfs under Debian / Ubuntu In-Reply-To: References: <4A312C4E.7070809@cubic.ch> <20090611185617.GQ12216@redhat.com> <4A3156F7.7020804@cubic.ch> <20090611202434.GA10738@redhat.com> <20090612083445.GA31205@amd.home.annexia.org> Message-ID: <20090612101838.GG15215@amd.home.annexia.org> On Fri, Jun 12, 2009 at 10:51:09AM +0200, Emre Erenoglu wrote: > OK I see now. I would wish that if the configure script is not able to find > febootstrap, it would fall back into using a pre-cooked generic swiss army > knife image file instead. That would make libguestfs pretty trivial to > package for our distro or others, without needing to package yum and > febootstrap etc. In one sense we do offer that. You can go to Koji[1], download the latest build from here: http://koji.fedoraproject.org/koji/packageinfo?packageID=8391 and extract the appliance directly from those RPMs. (This can even be automated because Koji has an XML-RPC interface). rpm2cpio libguestfs-.rpm | cpio -id The appliance is the two files found in usr/lib{,64}/guestfs/* However most Linux distros have strict rules about building from source, so this isn't an appropriate method for them. Rich. [1] http://koji.fedoraproject.org/koji/ -- Richard Jones, Emerging Technologies, Red Hat http://et.redhat.com/~rjones libguestfs lets you edit virtual machines. Supports shell scripting, bindings from many languages. http://et.redhat.com/~rjones/libguestfs/ See what it can do: http://et.redhat.com/~rjones/libguestfs/recipes.html From rjones at redhat.com Fri Jun 12 10:20:32 2009 From: rjones at redhat.com (Richard W.M. Jones) Date: Fri, 12 Jun 2009 11:20:32 +0100 Subject: [fedora-virt] libguestfs under Debian / Ubuntu In-Reply-To: <4A322479.2080105@cubic.ch> References: <4A312C4E.7070809@cubic.ch> <20090611185617.GQ12216@redhat.com> <4A3156F7.7020804@cubic.ch> <20090611204956.GC28848@amd.home.annexia.org> <4A322479.2080105@cubic.ch> Message-ID: <20090612102032.GH15215@amd.home.annexia.org> On Fri, Jun 12, 2009 at 11:48:41AM +0200, Tim Tassonis wrote: > Richard W.M. Jones wrote: >> On Thu, Jun 11, 2009 at 09:11:51PM +0200, Tim Tassonis wrote: >>> Daniel P. Berrange wrote: >>>> On Thu, Jun 11, 2009 at 06:09:50PM +0200, Tim Tassonis wrote: >>>>> Hi all >>>>> >>> Yes, of course....but since it is mentioned that febootstrap is based >>> on debootstrap, is there a technical reason for not just supporting >>> debootstrap alternatively. I haven't got enough background regarding >>> debootstrap/febootstrap and libguestfs to make a judgement about this >>> though. >> >> I summarised the options here: >> >> http://www.redhat.com/archives/fedora-virt/2009-May/msg00003.html >> >> For the Debian package I went with option (1), since Debian already >> has yum and rpm packaged. > > Thanks, I guess in an ideal world the best solution would be to have a > configure option like > > --image=[febootstrap|debootstrap|fixed] Better if it was: --appliance=... > or so, and then the package would be setup to use febootstrap on > redhat-based systems, debootstrap on debian-based system and fixed to > use a pre-build image. > > As you say, it won't be too difficult, but clearly the patch doesn't > write itself ... > > But such a patch to libguestfs would be accepted in your opinion? Definitely yes, but you'll also want to liase with Guido Gunter as well, since he expressed an interest in doing this too. Rich. -- Richard Jones, Emerging Technologies, Red Hat http://et.redhat.com/~rjones virt-p2v converts physical machines to virtual machines. Boot with a live CD or over the network (PXE) and turn machines into Xen guests. http://et.redhat.com/~rjones/virt-p2v From rjones at redhat.com Fri Jun 12 10:25:14 2009 From: rjones at redhat.com (Richard W.M. Jones) Date: Fri, 12 Jun 2009 11:25:14 +0100 Subject: [fedora-virt] libguestfs under Debian / Ubuntu In-Reply-To: <20090612101838.GG15215@amd.home.annexia.org> References: <4A312C4E.7070809@cubic.ch> <20090611185617.GQ12216@redhat.com> <4A3156F7.7020804@cubic.ch> <20090611202434.GA10738@redhat.com> <20090612083445.GA31205@amd.home.annexia.org> <20090612101838.GG15215@amd.home.annexia.org> Message-ID: <20090612102514.GA31781@amd.home.annexia.org> On Fri, Jun 12, 2009 at 11:18:38AM +0100, Richard W.M. Jones wrote: > (This can even be > automated because Koji has an XML-RPC interface). BTW here's some OCaml code for extracting RPMs from Koji using the XML-RPC interface. Ought to give you a start: http://hg.et.redhat.com/cgi-bin/hg-virt.cgi/applications/virt-mem--devel/file/tip/extract/fedora-koji Rich. -- Richard Jones, Emerging Technologies, Red Hat http://et.redhat.com/~rjones virt-df lists disk usage of guests without needing to install any software inside the virtual machine. Supports Linux and Windows. http://et.redhat.com/~rjones/virt-df/ From berrange at redhat.com Fri Jun 12 10:29:18 2009 From: berrange at redhat.com (Daniel P. Berrange) Date: Fri, 12 Jun 2009 11:29:18 +0100 Subject: [fedora-virt] libguestfs under Debian / Ubuntu In-Reply-To: References: <4A312C4E.7070809@cubic.ch> <20090611185617.GQ12216@redhat.com> <4A3156F7.7020804@cubic.ch> <20090611202434.GA10738@redhat.com> Message-ID: <20090612102918.GE22131@redhat.com> On Fri, Jun 12, 2009 at 01:14:07AM +0200, Emre Erenoglu wrote: > On Thu, Jun 11, 2009 at 10:24 PM, Daniel P. Berrange wrote: > > > > that repo. libguestfs uses a febootstrap to install a custom Fedora 11 > > appliance which it boots within QEMU in order to access the filesystems. > > If the sole purpose of febootstrap is to install a custom F11 > appliance to boot in qemu, why don't we prepare this image beforehand, > put it somewhere on the web, so that libguestfs can just use it > without needing to build this appliance again in each machine with > febootstrap or debootstrap? Providing pre-built binary OS images gets you into potentially complicated license compliance issues. You as distributor of the binary have to comply with the license of every single piece of software that went into the binary. For the Fedora Project distributing a binary image of a Fedora distro, compliance is easy because Fedora already ships all source RPMs. If a non-Fedora entity wants to ships binaries of Fedora it needs to make sure it can provide the corresponding source. It is not clearcut that it can rely on Fedora to always ship the sources for it. The safe option is to always build from source and distribute everything you used to build yourself. This is actually an argument *for* Debian using debootstrap against a Debian repo, rather Debian using feboiotstrap+YUM + Fedora repos. Regards, Daniel -- |: Red Hat, Engineering, London -o- http://people.redhat.com/berrange/ :| |: http://libvirt.org -o- http://virt-manager.org -o- http://ovirt.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :| From erenoglu at gmail.com Fri Jun 12 10:37:11 2009 From: erenoglu at gmail.com (Emre Erenoglu) Date: Fri, 12 Jun 2009 12:37:11 +0200 Subject: [fedora-virt] libguestfs under Debian / Ubuntu In-Reply-To: <20090612102918.GE22131@redhat.com> References: <4A312C4E.7070809@cubic.ch> <20090611185617.GQ12216@redhat.com> <4A3156F7.7020804@cubic.ch> <20090611202434.GA10738@redhat.com> <20090612102918.GE22131@redhat.com> Message-ID: On Fri, Jun 12, 2009 at 12:29 PM, Daniel P. Berrange wrote: > On Fri, Jun 12, 2009 at 01:14:07AM +0200, Emre Erenoglu wrote: > > On Thu, Jun 11, 2009 at 10:24 PM, Daniel P. Berrange > wrote: > > > > > > that repo. libguestfs uses a febootstrap to install a custom Fedora 11 > > > appliance which it boots within QEMU in order to access the > filesystems. > > > > If the sole purpose of febootstrap is to install a custom F11 > > appliance to boot in qemu, why don't we prepare this image beforehand, > > put it somewhere on the web, so that libguestfs can just use it > > without needing to build this appliance again in each machine with > > febootstrap or debootstrap? > > Providing pre-built binary OS images gets you into potentially complicated > license compliance issues. You as distributor of the binary have to comply > with the license of every single piece of software that went into the > binary. For the Fedora Project distributing a binary image of a Fedora > distro, compliance is easy because Fedora already ships all source RPMs. > If a non-Fedora entity wants to ships binaries of Fedora it needs to make > sure it can provide the corresponding source. It is not clearcut that it > can rely on Fedora to always ship the sources for it. The safe option is > to always build from source and distribute everything you used to build > yourself. This is actually an argument *for* Debian using debootstrap > against a Debian repo, rather Debian using feboiotstrap+YUM + Fedora repos. > I see the situation. This binary distro download may also create a licensing problem for our Pardus distro. I guess this leaves the following options: 1- package yum and febootstrap for Pardus and use them 2- create a "pabootstrap" package compatible with febootstrap and build a Pardus appliance instead of fedora appliance 3- create a pre-cooked "compatible" pardus appliance image and use this one For the last option, does it make any difference which distro is inside the appliance? Is there anything specific to Fedora? say, if we support all possible file system drivers as well as raid/lvm, would it still be needed to have Fedora inside? Is there a requirements documents for this appliance? Thanks a lot again for your patience for my never-ending questions, I really appreciate and learn a lot from you guys. Br, Emre -------------- next part -------------- An HTML attachment was scrubbed... URL: From berrange at redhat.com Fri Jun 12 10:46:25 2009 From: berrange at redhat.com (Daniel P. Berrange) Date: Fri, 12 Jun 2009 11:46:25 +0100 Subject: [fedora-virt] libguestfs under Debian / Ubuntu In-Reply-To: References: <4A312C4E.7070809@cubic.ch> <20090611185617.GQ12216@redhat.com> <4A3156F7.7020804@cubic.ch> <20090611202434.GA10738@redhat.com> <20090612102918.GE22131@redhat.com> Message-ID: <20090612104625.GF22131@redhat.com> On Fri, Jun 12, 2009 at 12:37:11PM +0200, Emre Erenoglu wrote: > On Fri, Jun 12, 2009 at 12:29 PM, Daniel P. Berrange wrote: > > > > > Providing pre-built binary OS images gets you into potentially complicated > > license compliance issues. You as distributor of the binary have to comply > > with the license of every single piece of software that went into the > > binary. For the Fedora Project distributing a binary image of a Fedora > > distro, compliance is easy because Fedora already ships all source RPMs. > > If a non-Fedora entity wants to ships binaries of Fedora it needs to make > > sure it can provide the corresponding source. It is not clearcut that it > > can rely on Fedora to always ship the sources for it. The safe option is > > to always build from source and distribute everything you used to build > > yourself. This is actually an argument *for* Debian using debootstrap > > against a Debian repo, rather Debian using feboiotstrap+YUM + Fedora repos. > > > > I see the situation. This binary distro download may also create a licensing > problem for our Pardus distro. I guess this leaves the following options: > 1- package yum and febootstrap for Pardus and use them > 2- create a "pabootstrap" package compatible with febootstrap and build a > Pardus appliance instead of fedora appliance > 3- create a pre-cooked "compatible" pardus appliance image and use this one > > For the last option, does it make any difference which distro is inside the > appliance? Is there anything specific to Fedora? say, if we support all > possible file system drivers as well as raid/lvm, would it still be needed > to have Fedora inside? Is there a requirements documents for this appliance? Check out Richard's architecture diagram http://libguestfs.org/guestfs.3.html#state_machine_and_low_level_event_api AFAIK, the only critical thing for the appliance is that it runs the custom guestfsd daemon talking to over QMEMU's vmchannel device. If you get that setup correctly then the choice of distro really shouldn't make any real difference. It is mostly just a tools problem to build yourself a image with the right pieces present. Daniel -- |: Red Hat, Engineering, London -o- http://people.redhat.com/berrange/ :| |: http://libvirt.org -o- http://virt-manager.org -o- http://ovirt.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :| From rjones at redhat.com Fri Jun 12 11:20:14 2009 From: rjones at redhat.com (Richard W.M. Jones) Date: Fri, 12 Jun 2009 12:20:14 +0100 Subject: [fedora-virt] libguestfs under Debian / Ubuntu In-Reply-To: References: <4A312C4E.7070809@cubic.ch> <20090611185617.GQ12216@redhat.com> <4A3156F7.7020804@cubic.ch> <20090611202434.GA10738@redhat.com> <20090612102918.GE22131@redhat.com> Message-ID: <20090612111913.GA31956@amd.home.annexia.org> On Fri, Jun 12, 2009 at 12:37:11PM +0200, Emre Erenoglu wrote: > I see the situation. This binary distro download may also create a licensing > problem for our Pardus distro. I guess this leaves the following options: > 1- package yum and febootstrap for Pardus and use them > 2- create a "pabootstrap" package compatible with febootstrap and build a > Pardus appliance instead of fedora appliance Is Pardus rpm based, or in general what packaging format does it use? > 3- create a pre-cooked "compatible" pardus appliance image and use this one > > For the last option, does it make any difference which distro is inside the > appliance? Is there anything specific to Fedora? say, if we support all > possible file system drivers as well as raid/lvm, would it still be needed > to have Fedora inside? Is there a requirements documents for this appliance? Dan is right - it doesn't make any difference what distro is used inside the appliance. The only requirement is that guestfsd is running inside the appliance, and that guestfsd has access to all the other programs it uses. Common ones like sfdisk, lvm, mount, etc and some not-so-common ones too - you can find a big list in the source code, in 'appliance/make-initramfs.sh.in'. Rich. -- Richard Jones, Emerging Technologies, Red Hat http://et.redhat.com/~rjones libguestfs lets you edit virtual machines. Supports shell scripting, bindings from many languages. http://et.redhat.com/~rjones/libguestfs/ See what it can do: http://et.redhat.com/~rjones/libguestfs/recipes.html From rjones at redhat.com Fri Jun 12 11:21:38 2009 From: rjones at redhat.com (Richard W.M. Jones) Date: Fri, 12 Jun 2009 12:21:38 +0100 Subject: [fedora-virt] libguestfs under Debian / Ubuntu In-Reply-To: <20090612111913.GA31956@amd.home.annexia.org> References: <4A312C4E.7070809@cubic.ch> <20090611185617.GQ12216@redhat.com> <4A3156F7.7020804@cubic.ch> <20090611202434.GA10738@redhat.com> <20090612102918.GE22131@redhat.com> <20090612111913.GA31956@amd.home.annexia.org> Message-ID: <20090612112138.GA32076@amd.home.annexia.org> On Fri, Jun 12, 2009 at 12:20:14PM +0100, Richard W.M. Jones wrote: > code, in 'appliance/make-initramfs.sh.in'. Here: http://git.et.redhat.com/?p=libguestfs.git;a=blob;f=appliance/make-initramfs.sh.in;hb=HEAD Rich. -- Richard Jones, Emerging Technologies, Red Hat http://et.redhat.com/~rjones Read my programming blog: http://rwmj.wordpress.com Fedora now supports 75 OCaml packages (the OPEN alternative to F#) http://cocan.org/getting_started_with_ocaml_on_red_hat_and_fedora From charles at dyfis.net Fri Jun 12 12:37:01 2009 From: charles at dyfis.net (Charles Duffy) Date: Fri, 12 Jun 2009 07:37:01 -0500 Subject: [fedora-virt] libguestfs under Debian / Ubuntu In-Reply-To: References: <4A312C4E.7070809@cubic.ch> <20090611185617.GQ12216@redhat.com> <4A3156F7.7020804@cubic.ch> <20090611202434.GA10738@redhat.com> <20090612102918.GE22131@redhat.com> Message-ID: On Fri, Jun 12, 2009 at 5:37 AM, Emre Erenoglu wrote: > I see the situation. This binary distro download may also create a > licensing problem for our Pardus distro. I guess this leaves the following > options: > 1- package yum and febootstrap for Pardus and use them > 2- create a "pabootstrap" package compatible with febootstrap and build a > Pardus appliance instead of fedora appliance > 3- create a pre-cooked "compatible" pardus appliance image and use this one > To chime in -- It may also be possible to come up with alternate distro-independent code for building the appliance with Buildroot from the uClibc project [ http://buildroot.uclibc.org/]; I worked on a project similar to libguestfs in the past, and buildroot worked reasonably well for me. One concern -- libraries used on host and guest may well not be compatible, so the libguestfs daemon will probably need to be built within the buildroot framework when building with this option. (I have a very simple makefile sitting around somewhere which checks out a known-good revision of buildroot from SVN, applies a few patches, and runs an appliance build [my own appliance, not the libguestfs one]; I'm not offering to duplicate the work for libguestfs, but I can try to dig it up for reference). Richard explained some reasons why he chose to use febootstrap as a response to my first email to this list, which I remember only inasmuch as recalling that I found those arguments compelling -- but if 'yall are interested in putting together a distribution-independent build option which doesn't require yum or friends, Buildroot might be one approach. -------------- next part -------------- An HTML attachment was scrubbed... URL: From rjones at redhat.com Fri Jun 12 14:12:05 2009 From: rjones at redhat.com (Richard W.M. Jones) Date: Fri, 12 Jun 2009 15:12:05 +0100 Subject: [fedora-virt] libguestfs under Debian / Ubuntu In-Reply-To: References: <4A312C4E.7070809@cubic.ch> <20090611185617.GQ12216@redhat.com> <4A3156F7.7020804@cubic.ch> <20090611202434.GA10738@redhat.com> <20090612102918.GE22131@redhat.com> Message-ID: <20090612141205.GA401@amd.home.annexia.org> On Fri, Jun 12, 2009 at 07:37:01AM -0500, Charles Duffy wrote: > Richard explained some reasons why he chose to use febootstrap as a response > to my first email to this list, Here ... http://rwmj.wordpress.com/2009/03/20/why-not-use-a-minimal-distribution/ Rich. -- Richard Jones, Emerging Technologies, Red Hat http://et.redhat.com/~rjones libguestfs lets you edit virtual machines. Supports shell scripting, bindings from many languages. http://et.redhat.com/~rjones/libguestfs/ See what it can do: http://et.redhat.com/~rjones/libguestfs/recipes.html From tom.horsley at att.net Fri Jun 12 17:20:20 2009 From: tom.horsley at att.net (Tom Horsley) Date: Fri, 12 Jun 2009 13:20:20 -0400 Subject: [fedora-virt] Is this normal? Message-ID: <20090612132020.3fc12592@tomh> I have my newly installed fedora 11 x86_64 system on an Intel Core 2 Duo with virtualization hardware support, so I thought I'd give KVM a whirl. I started virt-manager as root, defined a new machine which I made be an i686 and pointed at the Fedora 11 i386 DVD iso image. I also told it to allocate space immediately for a 12GB image file. It has now been running anaconda's cylon eyeball format progress bar for about an hour. How long should it take to format the silly disk image? Other points: I can't believe virt-manager insists on placing image files under /var. They take lots of space. I'd expect to be able to pick a place to put the disk image. This fedora-virt mailing list doesn't have a pointer in the list of mailing lists on the fedora mailing list web page at: http://fedoraproject.org/wiki/Communicate From ondrejj at salstar.sk Fri Jun 12 17:59:00 2009 From: ondrejj at salstar.sk (=?utf-8?B?SsOhbiBPTkRSRUogKFNBTCk=?=) Date: Fri, 12 Jun 2009 19:59:00 +0200 Subject: [fedora-virt] Is this normal? In-Reply-To: <20090612132020.3fc12592@tomh> References: <20090612132020.3fc12592@tomh> Message-ID: <20090612175900.GP2686@salstar.sk> On Fri, Jun 12, 2009 at 01:20:20PM -0400, Tom Horsley wrote: > I have my newly installed fedora 11 x86_64 system on an Intel > Core 2 Duo with virtualization hardware support, so I thought > I'd give KVM a whirl. > > I started virt-manager as root, defined a new machine which > I made be an i686 and pointed at the Fedora 11 i386 DVD iso > image. I also told it to allocate space immediately for a 12GB > image file. Why are you using ix86 on x86_64? KVM can't make 32bit systems on 64bit and vice versa yet. But you can install 32bit OS on 64bit guest. Only leave default architecture settings. If you change defaults, KVM virtualization is automatically replaced by qemu, which can emulate different architectures, but has no hardware acceleration support. > It has now been running anaconda's cylon eyeball format > progress bar for about an hour. > > How long should it take to format the silly disk image? No comment. :-) SAL From tom.horsley at att.net Fri Jun 12 18:46:35 2009 From: tom.horsley at att.net (Tom Horsley) Date: Fri, 12 Jun 2009 14:46:35 -0400 Subject: [fedora-virt] Is this normal? In-Reply-To: <20090612175900.GP2686@salstar.sk> References: <20090612132020.3fc12592@tomh> <20090612175900.GP2686@salstar.sk> Message-ID: <20090612144635.7f59885e@tomh> On Fri, 12 Jun 2009 19:59:00 +0200 J?n ONDREJ (SAL) wrote: >> How long should it take to format the silly disk image? > No comment. :-) I think I found my real problem. I've just been on a trip through the BIOS settings where I found the BIOS had disabled the hardware acceleration stuff. I'll try again, I bet it works better this time... From rjones at redhat.com Sat Jun 13 09:49:59 2009 From: rjones at redhat.com (Richard W.M. Jones) Date: Sat, 13 Jun 2009 10:49:59 +0100 Subject: [fedora-virt] libguestfs under Debian / Ubuntu In-Reply-To: <20090612112138.GA32076@amd.home.annexia.org> References: <4A312C4E.7070809@cubic.ch> <20090611185617.GQ12216@redhat.com> <4A3156F7.7020804@cubic.ch> <20090611202434.GA10738@redhat.com> <20090612102918.GE22131@redhat.com> <20090612111913.GA31956@amd.home.annexia.org> <20090612112138.GA32076@amd.home.annexia.org> Message-ID: <20090613094959.GA4830@amd.home.annexia.org> On Fri, Jun 12, 2009 at 12:21:38PM +0100, Richard W.M. Jones wrote: > On Fri, Jun 12, 2009 at 12:20:14PM +0100, Richard W.M. Jones wrote: > > code, in 'appliance/make-initramfs.sh.in'. > > Here: > > http://git.et.redhat.com/?p=libguestfs.git;a=blob;f=appliance/make-initramfs.sh.in;hb=HEAD Just so you know, in the latest changeset I've renamed this file from the rather obscure 'make-initramfs.sh.in' to just 'appliance/make.sh.in': http://git.et.redhat.com/?p=libguestfs.git;a=commit;h=2e25c4255746b144932f84b7b6671d7d03f52278 RIch. -- 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 From rjones at redhat.com Sat Jun 13 09:51:36 2009 From: rjones at redhat.com (Richard W.M. Jones) Date: Sat, 13 Jun 2009 10:51:36 +0100 Subject: [fedora-virt] Is this normal? In-Reply-To: <20090612144635.7f59885e@tomh> References: <20090612132020.3fc12592@tomh> <20090612175900.GP2686@salstar.sk> <20090612144635.7f59885e@tomh> Message-ID: <20090613095136.GB4830@amd.home.annexia.org> On Fri, Jun 12, 2009 at 02:46:35PM -0400, Tom Horsley wrote: > On Fri, 12 Jun 2009 19:59:00 +0200 > J?n ONDREJ (SAL) wrote: > > >> How long should it take to format the silly disk image? > > No comment. :-) > > I think I found my real problem. I've just been on a trip through > the BIOS settings where I found the BIOS had disabled the > hardware acceleration stuff. I'll try again, I bet it works > better this time... I vaguely recall that virt-manager was going to give a warning about this case. There is probably one in the system logfiles (from when kvm-intel.ko was loaded). Rich. -- Richard Jones, Emerging Technologies, Red Hat http://et.redhat.com/~rjones virt-top is 'top' for virtual machines. Tiny program with many powerful monitoring features, net stats, disk stats, logging, etc. http://et.redhat.com/~rjones/virt-top From tom.horsley at att.net Sat Jun 13 12:17:44 2009 From: tom.horsley at att.net (Tom Horsley) Date: Sat, 13 Jun 2009 08:17:44 -0400 Subject: [fedora-virt] Is this normal? In-Reply-To: <20090613095136.GB4830@amd.home.annexia.org> References: <20090612132020.3fc12592@tomh> <20090612175900.GP2686@salstar.sk> <20090612144635.7f59885e@tomh> <20090613095136.GB4830@amd.home.annexia.org> Message-ID: <20090613081744.4f80af43@zooty> On Sat, 13 Jun 2009 10:51:36 +0100 Richard W.M. Jones wrote: > > I think I found my real problem. I've just been on a trip through > > the BIOS settings where I found the BIOS had disabled the > > hardware acceleration stuff. I'll try again, I bet it works > > better this time... > > I vaguely recall that virt-manager was going to give a warning about > this case. There is probably one in the system logfiles (from when > kvm-intel.ko was loaded). Actually, it turns out the BIOS setting was for something else. Apparently this machine does not have virtualization support (even though I was under the impression it was specifically purchased with that as one of the required features, which was why I didn't look into it earlier - Mordac is messing with me again :-). It certainly isn't at all obvious from virt-manager that no hardware support is available (not if you don't already know what hardware support looks like in virt-manager, anyway). From dlbewley at lib.ucdavis.edu Sat Jun 13 16:13:06 2009 From: dlbewley at lib.ucdavis.edu (Dale Bewley) Date: Sat, 13 Jun 2009 09:13:06 -0700 Subject: [fedora-virt] Is this normal? In-Reply-To: <20090612132020.3fc12592@tomh> References: <20090612132020.3fc12592@tomh> Message-ID: <1244909586.3427.18.camel@seitan.home.bewley.net> On Fri, 2009-06-12 at 13:20 -0400, Tom Horsley wrote: > I can't believe virt-manager insists on placing image files > under /var. They take lots of space. I'd expect to be able > to pick a place to put the disk image. If you'd prefer not to use /var you can create a new storage pool to hold guest image volumes. Right click on your host (localhost qemu) in the virt manager interface. Select "Details". In the dialog which pops up select the "Storage" tab. In the lower left corner there is a "+" sign for adding a storage pool. Select a device or a directory like /home/you/Guests perhaps. This process could probably be more obvious. The plus sign could be a "Add Storage Pool" button instead for example. See also: * `virsh help | grep pool` * http://www.libvirt.org/formatstorage.html Also, if you are using selinux, be aware it expects images to live in /var/lib/libvirt/images by default. http://fedoraproject.org/wiki/Features/SVirt_Mandatory_Access_Control > This fedora-virt mailing list doesn't have a pointer in the > list of mailing lists on the fedora mailing list web page > at: http://fedoraproject.org/wiki/Communicate It does now. Thanks. From m.a.young at durham.ac.uk Sun Jun 14 14:54:51 2009 From: m.a.young at durham.ac.uk (M A Young) Date: Sun, 14 Jun 2009 15:54:51 +0100 (BST) Subject: [fedora-virt] [Fedora-xen] Dom0 kernels In-Reply-To: References: <20090328163545.GM31725@salstar.sk> <20090414143618.GH351@redhat.com> Message-ID: Here http://koji.fedoraproject.org/koji/taskinfo?taskID=1410620 is another resync up to 2.6.30. There are no xen changes. It is also available via the repository http://fedorapeople.org/~myoung/dom0/ Michael Young From laine+fedora-virt at laine.org Sun Jun 14 22:17:16 2009 From: laine+fedora-virt at laine.org (Laine Stump) Date: Sun, 14 Jun 2009 18:17:16 -0400 Subject: [fedora-virt] iPod Touch + Fedora 11 + KVM + WinXP guest + iTunes? Message-ID: <4A3576EC.7070604@laine.org> I want a Win XP guest (running under a fresh F11 install) to talk to my shiny new iPod Touch. I tried adding the "Apple Inc. iPod" USB device to the guest's hardware list with virt-manager, but even after restarting everything it isn't recognized (it's still picked up by the host OS - which doesn't know what to do with it - and not seen at all by the guest). Has anybody done this? Any hints? (a better solution would be if RhythmBox or some other program figured out how to talk to the Touch (and/or iPhone), but as far as I've found, that hasn't happened yet). From charles at dyfis.net Sun Jun 14 22:18:57 2009 From: charles at dyfis.net (Charles Duffy) Date: Sun, 14 Jun 2009 17:18:57 -0500 Subject: [fedora-virt] iPod Touch + Fedora 11 + KVM + WinXP guest + iTunes? In-Reply-To: <4A3576EC.7070604@laine.org> References: <4A3576EC.7070604@laine.org> Message-ID: <4A357751.4060607@dyfis.net> Laine Stump wrote: > I want a Win XP guest (running under a fresh F11 install) to talk to > my shiny new iPod Touch. I tried adding the "Apple Inc. iPod" USB > device to the guest's hardware list with virt-manager, but even after > restarting everything it isn't recognized (it's still picked up by the > host OS - which doesn't know what to do with it - and not seen at all > by the guest). > > Has anybody done this? Any hints? At least some of Apple's new hardware is USB 2.x only. QEMU/KVM only supports USB 1.x. From crobinso at redhat.com Sun Jun 14 22:50:02 2009 From: crobinso at redhat.com (Cole Robinson) Date: Sun, 14 Jun 2009 18:50:02 -0400 Subject: [fedora-virt] RFC: libosinfo: Library for virt OS/distro metadata 3 Message-ID: <4A357E9A.3050101@redhat.com> Hi all, I've done the initial work for a new library, libosinfo (better name recommendations appreciated). This library will provide OS meta data for use in virt applications, replacing the dictionary we currently keep in virtinst. This is based off of a post by Dan Berrange: https://www.redhat.com/archives/et-mgmt-tools/2009-March/msg00028.html The code can be fetched with: git clone http://fedorapeople.org/~crobinso/osinfo/.git Check out the TODO list for a simple roadmap. http://fedorapeople.org/~crobinso/osinfo/TODO The public API looks like: /** * Values stored in the OS dictionary */ enum _os_value_type { OS_VALUE_NAME = 1, /** Human readable family/distro... name */ OS_VALUE_MEDIA_INSTALL_URL, /** URL to an install tree */ }; typedef enum _os_value_type os_value_t; int os_init(); void os_close(); int os_find_families (char ***list); int os_find_distros (const char *parent_id, char ***list); int os_find_releases (const char *parent_id, char ***list); int os_find_updates (const char *parent_id, char ***list); int os_lookup_value (os_value_t value_type, const char *os_id, char **value); The unique identifier for each distro is its 'id', which is a simple human readable string, similar to values we use for virt-install --os-variant today. The user will ask the API for available families/distros/releases/updates, which will return a list of ids. We then pass an id to os_lookup_value to actually retrieve data. The family/distro/... separation will likely be removed pretty soon, in favor of an arbitrary hierarchy, where every OS can have child OSes: no doubt hardcoding the family/distro/... split would come back to bite us in the ass. As an example, the following code will list the 'Name' of every id at the'family' level, where name is full name of the OS (id = rhel5.3, name = Red Hat Enterprise Linux 5.3): char *value = NULL; char **namelist = NULL; int i, num_fams; if (os_init() < 0) goto error; if ((num_fams = os_list_families(&namelist)) < 0) goto error; for (i = 0; i < num_fams; ++i) { if (os_lookup_value(OS_VALUE_NAME, namelist[i], &value) < 0) goto error; printf("%s\n", value); free(value); } error: free(namelist); free(value); os_close(); There is a simple tool called 'osinfo-tool' which allows listing an ASCII repr of the OS hierarchy, and listing all values for an individual id (which is pretty sparse at the moment since most of these values haven't been filled in yet). So, things that I'm interested in feedback on: - How do we expect apps to list OS choices? Currently, virt-manager lists type (linux, windows, unix, etc.) and associated distros (Fedora 8, RHEL4, Debian Lenny, etc.). The linux/windows/unix info isn't represented in the xml (should it be?) so the best way seems to be: Distro | --> Release | --> Update Ex. RHEL | -> RHEL5 | -> 5.0 5.1 5.2 If we do away with the family/distro/... distinction, the user won't have much choice in the matter, but the 'family' concept (e.g. value of 'Red Hat') isn't very useful to expose to a user. - How should we handle derivatives like Scientific Linux + CentOS: should we expect users to understand they are based on RHEL, or give them explicit IDs? - Querying for device values (supported buses, models, etc.). Dan's original proposal talks about this; to recommend a default with the best chance of actually working, we need to know: - OS being installed - Virt type ('hvm' vs. 'xen') - Guest Architecture (i386, x86_64, ...) - Hypervisor (kvm, qemu, xen, vbox, ...) - Hypervisor version - Libvirt version We would need to find the intersection of what the OS, the hypervisor, and libvirt support, and return what we decide is the best choice. How to expose this in the API? We could simply have one long function os_lookup_device_value(char *os_id, char *virt_type, char *arch, ...) It works, but its pretty tedious, and I'm afraid that we would need even more info to make a correct choice in the future, and the above isn't flexible. We may also need some of the above info for other values (ACPI/APIC settings, returning a proper install url may depend on arch). Any suggestions? - os_init and os_close: Any better ideas for this? os_init just parses the xml document, os_close frees it. We could run os_init with the first API call, but I think that makes it less clear that the user would then need to call os_close(). Any feedback appreciated. Thanks, Cole From rjones at redhat.com Mon Jun 15 12:15:06 2009 From: rjones at redhat.com (Richard W.M. Jones) Date: Mon, 15 Jun 2009 13:15:06 +0100 Subject: [fedora-virt] RFC: libosinfo: Library for virt OS/distro metadata 3 In-Reply-To: <4A357E9A.3050101@redhat.com> References: <4A357E9A.3050101@redhat.com> Message-ID: <20090615121506.GA18549@amd.home.annexia.org> On Sun, Jun 14, 2009 at 06:50:02PM -0400, Cole Robinson wrote: > The public API looks like: > > /** > * Values stored in the OS dictionary > */ > enum _os_value_type { > OS_VALUE_NAME = 1, /** Human readable family/distro... name */ > OS_VALUE_MEDIA_INSTALL_URL, /** URL to an install tree */ > }; > typedef enum _os_value_type os_value_t; > > int os_init(); > void os_close(); > > int os_find_families (char ***list); > int os_find_distros (const char *parent_id, char ***list); > int os_find_releases (const char *parent_id, char ***list); > int os_find_updates (const char *parent_id, char ***list); > > int os_lookup_value (os_value_t value_type, > const char *os_id, > char **value); There's a (little) overlap and a possible user in virt-inspector. In virt-inspector we do things the other way around - we look inside the guest for files like /etc/redhat-release and /etc/debian_version, and parse those to determine the OS distro and release (also we parse the registry to do the same for Windows). The code for Linux is here: http://git.et.redhat.com/?p=libguestfs.git;a=blob;f=inspector/virt-inspector.pl;h=1d8a84b424eb73ceafee041f0e1d76d371506aa7;hb=HEAD#l410 It would be nice for virt-inspector to output ID strings which are compatible with osinfo. 'Course we'll need Perl bindings. Did you see this? http://rwmj.wordpress.com/2009/04/20/generating-code/ Rich. -- Richard Jones, Emerging Technologies, Red Hat http://et.redhat.com/~rjones virt-df lists disk usage of guests without needing to install any software inside the virtual machine. Supports Linux and Windows. http://et.redhat.com/~rjones/virt-df/ From crobinso at redhat.com Mon Jun 15 12:22:16 2009 From: crobinso at redhat.com (Cole Robinson) Date: Mon, 15 Jun 2009 08:22:16 -0400 Subject: [fedora-virt] RFC: libosinfo: Library for virt OS/distro metadata 3 In-Reply-To: <20090615121506.GA18549@amd.home.annexia.org> References: <4A357E9A.3050101@redhat.com> <20090615121506.GA18549@amd.home.annexia.org> Message-ID: <4A363CF8.6000606@redhat.com> On 06/15/2009 08:15 AM, Richard W.M. Jones wrote: > On Sun, Jun 14, 2009 at 06:50:02PM -0400, Cole Robinson wrote: >> The public API looks like: >> >> /** >> * Values stored in the OS dictionary >> */ >> enum _os_value_type { >> OS_VALUE_NAME = 1, /** Human readable family/distro... name */ >> OS_VALUE_MEDIA_INSTALL_URL, /** URL to an install tree */ >> }; >> typedef enum _os_value_type os_value_t; >> >> int os_init(); >> void os_close(); >> >> int os_find_families (char ***list); >> int os_find_distros (const char *parent_id, char ***list); >> int os_find_releases (const char *parent_id, char ***list); >> int os_find_updates (const char *parent_id, char ***list); >> >> int os_lookup_value (os_value_t value_type, >> const char *os_id, >> char **value); > > There's a (little) overlap and a possible user in virt-inspector. > > In virt-inspector we do things the other way around - we look inside > the guest for files like /etc/redhat-release and /etc/debian_version, > and parse those to determine the OS distro and release (also we parse > the registry to do the same for Windows). The code for Linux is here: > > http://git.et.redhat.com/?p=libguestfs.git;a=blob;f=inspector/virt-inspector.pl;h=1d8a84b424eb73ceafee041f0e1d76d371506aa7;hb=HEAD#l410 > > It would be nice for virt-inspector to output ID strings which are > compatible with osinfo. > Agreed, I was thinking something along the same lines. > 'Course we'll need Perl bindings. Did you see this? > > http://rwmj.wordpress.com/2009/04/20/generating-code/ > Thanks, I'll take a look. - Cole From berrange at redhat.com Mon Jun 15 12:48:05 2009 From: berrange at redhat.com (Daniel P. Berrange) Date: Mon, 15 Jun 2009 13:48:05 +0100 Subject: [fedora-virt] Re: RFC: libosinfo: Library for virt OS/distro metadata 3 In-Reply-To: <4A357E9A.3050101@redhat.com> References: <4A357E9A.3050101@redhat.com> Message-ID: <20090615124802.GA15024@redhat.com> On Sun, Jun 14, 2009 at 06:50:02PM -0400, Cole Robinson wrote: > The public API looks like: > > /** > * Values stored in the OS dictionary > */ > enum _os_value_type { > OS_VALUE_NAME = 1, /** Human readable family/distro... name */ > OS_VALUE_MEDIA_INSTALL_URL, /** URL to an install tree */ > }; > typedef enum _os_value_type os_value_t; > > int os_init(); > void os_close(); > > int os_find_families (char ***list); > int os_find_distros (const char *parent_id, char ***list); > int os_find_releases (const char *parent_id, char ***list); > int os_find_updates (const char *parent_id, char ***list); > > int os_lookup_value (os_value_t value_type, > const char *os_id, > char **value); > > The unique identifier for each distro is its 'id', which is a simple human > readable string, similar to values we use for virt-install --os-variant today. As John suggested, I think we'd be safer having opaque structs for the conceptual objects. One for the library itself, and another for an OS distro. Perhaps have an 'os_info_t' as a handle for a library itself returned by os_init 'os_distro_t' as a handle for a single OS distro instance os_info_t os_info_new() os_info_init(os_info_t *info, char *uri); /* loads the XML data */ For OS distros I think we need APIs to: - List all OS distros - Find OS distros, matching a specific set of properties - Read a property from an OS distro - Read all properties from an OS distro - List unique values for a property across all distros > The user will ask the API for available families/distros/releases/updates, > which will return a list of ids. We then pass an id to os_lookup_value to > actually retrieve data. The family/distro/... separation will likely be > removed pretty soon, in favor of an arbitrary hierarchy, where every OS > can have child OSes: no doubt hardcoding the family/distro/... split would > come back to bite us in the ass. I agree, the fixed hierarchy I describe really doesn't seem very nice looking back on it. The names I gave them are rather contrived and only really map nicely onto RHEL/Fedora release process. I think we're better off being more flexible and allowing for arbitrary relationships in the data files and API. I don't think we neccessarily want to force a single rooted tree structure here. The key important factor with the hierarchy is the concept of sharing metadata. I think we should take a hint from the way RDF works and define the API and XML format as a flat list, but allow relationships to be defined, and also allow tagging. - Flat list of OS distros with their full name, as defined by their vendor/distributor "Red Hat Enterprise Linux 4.7" "Red Hat Enterprise Linux 5.0" "Fedora 10" "Fedora 10" "Debian Sarge" - A 'derived' property. Allows derived distros to declare they should inherit metdata (eg Scientific Linux derives from RHEL) - A 'clone' property. Allows functionally identical rebuilds to declare they use exactly same metadata. (eg CentOS / RHEL) - A 'upgrades' property. Allows to indicate 'Fedora 11' is the release following on from 'Fedora 10'. - A 'publisher' property to give name of entity producing the distro eg 'Fedora Project', 'Red Hat', 'Microsoft' - A 'kernel type' and 'kernel version' property, eg 'linux' and '2.6.26'. Application UI might simulate a hierarchy by using the 'publisher' property at first level, and then filtering the flat list of OS distros at the 2nd level according to selected publisher. This satisfies the key 'UI' reason for the hierarchy. The 'derived' and 'clone' allow for inheritance of metadata. > > So, things that I'm interested in feedback on: > > - How do we expect apps to list OS choices? Currently, virt-manager lists > type (linux, windows, unix, etc.) and associated distros (Fedora 8, RHEL4, > Debian Lenny, etc.). The linux/windows/unix info isn't represented in the > xml (should it be?) so the best way seems to be: > > Distro > | > --> Release > | > --> Update > > Ex. > > RHEL > | > -> RHEL5 > | > -> 5.0 > 5.1 > 5.2 > > If we do away with the family/distro/... distinction, the user won't have > much choice in the matter, but the 'family' concept (e.g. value of > 'Red Hat') isn't very useful to expose to a user. We should try to avoid forcing one representation onto apps. I think the flat OS list + sets of properties will allow apps to build a variety of UI models for this, either search based, tree based or filter based. > - How should we handle derivatives like Scientific Linux + CentOS: should we > expect users to understand they are based on RHEL, or give them explicit > IDs? They need explicit IDs, since they have unique download URLs that have to be stored. The 'clone' and 'derived' properties will allow us to avoid duplicating other metadata, and also allow apps to show/hide clones as needed. > - Querying for device values (supported buses, models, etc.). Dan's original > proposal talks about this; to recommend a default with the best chance of > actually working, we need to know: > > - OS being installed > - Virt type ('hvm' vs. 'xen') > - Guest Architecture (i386, x86_64, ...) > - Hypervisor (kvm, qemu, xen, vbox, ...) > - Hypervisor version > - Libvirt version > > We would need to find the intersection of what the OS, the hypervisor, > and libvirt support, and return what we decide is the best choice. > > How to expose this in the API? We could simply have one long function > > os_lookup_device_value(char *os_id, char *virt_type, char *arch, ...) > > It works, but its pretty tedious, and I'm afraid that we would need > even more info to make a correct choice in the future, and the above > isn't flexible. We may also need some of the above info for other values > (ACPI/APIC settings, returning a proper install url may depend on arch). > Any suggestions? The more I think about this, the more I think we should avoid any specific named attributes in the API. Supported devices are just other types of property we can associated with a distro, in addition to ones I already listed earlier. This could be useful in the UI too, for example, if you know the hypervisor requires support for 'Xen paravirt disk', then when browsing OS, you can filter on this property just as you would with the others. > > - os_init and os_close: Any better ideas for this? os_init just parses the > xml document, os_close frees it. We could run os_init with the first API > call, but I think that makes it less clear that the user would then > need to call os_close(). I think its good to keep the initializer explicit, and if you add an opaque type representing a handle to the library, this will force apps to caller it and track it. Regards, Daniel -- |: Red Hat, Engineering, London -o- http://people.redhat.com/berrange/ :| |: http://libvirt.org -o- http://virt-manager.org -o- http://ovirt.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :| From berrange at redhat.com Mon Jun 15 12:49:18 2009 From: berrange at redhat.com (Daniel P. Berrange) Date: Mon, 15 Jun 2009 13:49:18 +0100 Subject: [fedora-virt] RFC: libosinfo: Library for virt OS/distro metadata 3 In-Reply-To: <4A363CF8.6000606@redhat.com> References: <4A357E9A.3050101@redhat.com> <20090615121506.GA18549@amd.home.annexia.org> <4A363CF8.6000606@redhat.com> Message-ID: <20090615124917.GC7233@redhat.com> On Mon, Jun 15, 2009 at 08:22:16AM -0400, Cole Robinson wrote: > On 06/15/2009 08:15 AM, Richard W.M. Jones wrote: > > On Sun, Jun 14, 2009 at 06:50:02PM -0400, Cole Robinson wrote: > >> The public API looks like: > >> > >> /** > >> * Values stored in the OS dictionary > >> */ > >> enum _os_value_type { > >> OS_VALUE_NAME = 1, /** Human readable family/distro... name */ > >> OS_VALUE_MEDIA_INSTALL_URL, /** URL to an install tree */ > >> }; > >> typedef enum _os_value_type os_value_t; > >> > >> int os_init(); > >> void os_close(); > >> > >> int os_find_families (char ***list); > >> int os_find_distros (const char *parent_id, char ***list); > >> int os_find_releases (const char *parent_id, char ***list); > >> int os_find_updates (const char *parent_id, char ***list); > >> > >> int os_lookup_value (os_value_t value_type, > >> const char *os_id, > >> char **value); > > > > There's a (little) overlap and a possible user in virt-inspector. > > > > In virt-inspector we do things the other way around - we look inside > > the guest for files like /etc/redhat-release and /etc/debian_version, > > and parse those to determine the OS distro and release (also we parse > > the registry to do the same for Windows). The code for Linux is here: > > > > http://git.et.redhat.com/?p=libguestfs.git;a=blob;f=inspector/virt-inspector.pl;h=1d8a84b424eb73ceafee041f0e1d76d371506aa7;hb=HEAD#l410 > > > > It would be nice for virt-inspector to output ID strings which are > > compatible with osinfo. > > > > Agreed, I was thinking something along the same lines. If we keep to a flat list, then trivial answer here is to just use the official distro name given by the vendor/distributor. Daniel -- |: Red Hat, Engineering, London -o- http://people.redhat.com/berrange/ :| |: http://libvirt.org -o- http://virt-manager.org -o- http://ovirt.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :| From berrange at redhat.com Mon Jun 15 12:52:57 2009 From: berrange at redhat.com (Daniel P. Berrange) Date: Mon, 15 Jun 2009 13:52:57 +0100 Subject: [fedora-virt] Re: [et-mgmt-tools] RFC: libosinfo: Library for virt OS/distro metadata 3 In-Reply-To: <20090615111656.GB12273@movementarian.org> References: <4A357E9A.3050101@redhat.com> <20090615111656.GB12273@movementarian.org> Message-ID: <20090615125257.GD7233@redhat.com> On Mon, Jun 15, 2009 at 07:16:56AM -0400, John Levon wrote: > On Sun, Jun 14, 2009 at 06:50:02PM -0400, Cole Robinson wrote: > > > git clone http://fedorapeople.org/~crobinso/osinfo/.git > > I'm not convinced by the "arbitrary hierarchy" thing: I just don't see > how that could possibly be useful. Surely it's either an entirely flat > namespace, or a shallow structured one like you have. > > The flat namespace would be a set of keys and multiple values for each > key. One value would be "os type" (linux, windows, etc.). You'd most > likely have a "generic" entry still for fallback. I think this is the way to go. Flat list + properties, and allow apps to build hiearchies on the fly as needed, based off properties. > An alternative is to represent the hierarchy in the UNIX way, via the > filesystem: > > /var/lib/osinfo/ > /var/lib/osinfo/linux/info.xml > /var/lib/osinfo/linux/fedora/info.xml > /var/lib/osinfo/linux/fedora/8/info.xml > > The fallback is pretty obvious then. Maybe it's over the top. The idea > of a single delivered XML file that users edit does trouble me though. > Maybe we at least have two files, one for customisations. A single XML file would be pretty horrible for package upgrades. With a flat list we can have 1 XML file per distro. If we allow multiple search paths for XML files, we can have the stadnard shipped ones in /usr/share/osinfo, and customized ones in /etc/osinfo the latter overriding (or inheriting from) the former. > > - How should we handle derivatives like Scientific Linux + CentOS: should we > > expect users to understand they are based on RHEL, or give them explicit > > IDs? > > Explicit IDs. You'd be surprised. Download/install URLs already require that we do separate IDs :-) Daniel -- |: Red Hat, Engineering, London -o- http://people.redhat.com/berrange/ :| |: http://libvirt.org -o- http://virt-manager.org -o- http://ovirt.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :| From levon at movementarian.org Mon Jun 15 11:16:56 2009 From: levon at movementarian.org (John Levon) Date: Mon, 15 Jun 2009 07:16:56 -0400 Subject: [fedora-virt] Re: [et-mgmt-tools] RFC: libosinfo: Library for virt OS/distro metadata 3 In-Reply-To: <4A357E9A.3050101@redhat.com> References: <4A357E9A.3050101@redhat.com> Message-ID: <20090615111656.GB12273@movementarian.org> On Sun, Jun 14, 2009 at 06:50:02PM -0400, Cole Robinson wrote: > git clone http://fedorapeople.org/~crobinso/osinfo/.git I'm not convinced by the "arbitrary hierarchy" thing: I just don't see how that could possibly be useful. Surely it's either an entirely flat namespace, or a shallow structured one like you have. The flat namespace would be a set of keys and multiple values for each key. One value would be "os type" (linux, windows, etc.). You'd most likely have a "generic" entry still for fallback. An alternative is to represent the hierarchy in the UNIX way, via the filesystem: /var/lib/osinfo/ /var/lib/osinfo/linux/info.xml /var/lib/osinfo/linux/fedora/info.xml /var/lib/osinfo/linux/fedora/8/info.xml The fallback is pretty obvious then. Maybe it's over the top. The idea of a single delivered XML file that users edit does trouble me though. Maybe we at least have two files, one for customisations. > int os_init(); > void os_close(); Always, always, always, pass back an opaque identifier in an API - you never know when you'll need to track per-thread state. It's generally a good idea to pass in a version define too. The XML parsing itself should happen lazily. We might want to let the user specify a file, for example. > int os_find_families (char ***list); > int os_find_distros (const char *parent_id, char ***list); > int os_find_releases (const char *parent_id, char ***list); > int os_find_updates (const char *parent_id, char ***list); Regardless of the hierarchy question I hate the idea of exposing it in the API like this. There's really two (hopefully three eventually) things this library needs to do: provide a list of everything it knows about so the user can select it in a GUI or whatever, and provide configuration recommendations given a particular set of values. I don't think the library can make any assumptions about how the former might look. It just needs to return some thing like: struct osinfo { const char *id; nvpair_list_t values; }; Either allocated as an array (probably easiest) or in a list. It's then up to the client to decide what hierarchy to actually use, and it's all dependent on what values they pick out of the nv list. (The third thing is to identify OS types based upon installation media when possible.) > If we do away with the family/distro/... distinction, the user won't have > much choice in the matter, but the 'family' concept (e.g. value of > 'Red Hat') isn't very useful to expose to a user. If you mean API user, think "icon". > - How should we handle derivatives like Scientific Linux + CentOS: should we > expect users to understand they are based on RHEL, or give them explicit > IDs? Explicit IDs. You'd be surprised. > We would need to find the intersection of what the OS, the hypervisor, > and libvirt support, and return what we decide is the best choice. > > How to expose this in the API? We could simply have one long function > > os_lookup_device_value(char *os_id, char *virt_type, char *arch, ...) The API user should pass in an nvlist, where a set of the names are defined and known about. The response needs to indicate whether it's a preferred setting ("would like virtio") or a required one. regards john From crobinso at redhat.com Mon Jun 15 15:09:56 2009 From: crobinso at redhat.com (Cole Robinson) Date: Mon, 15 Jun 2009 11:09:56 -0400 Subject: [fedora-virt] Re: RFC: libosinfo: Library for virt OS/distro metadata 3 In-Reply-To: <20090615124802.GA15024@redhat.com> References: <4A357E9A.3050101@redhat.com> <20090615124802.GA15024@redhat.com> Message-ID: <4A366444.8020603@redhat.com> Daniel P. Berrange wrote: > On Sun, Jun 14, 2009 at 06:50:02PM -0400, Cole Robinson wrote: >> The public API looks like: >> >> /** >> * Values stored in the OS dictionary >> */ >> enum _os_value_type { >> OS_VALUE_NAME = 1, /** Human readable family/distro... name */ >> OS_VALUE_MEDIA_INSTALL_URL, /** URL to an install tree */ >> }; >> typedef enum _os_value_type os_value_t; >> >> int os_init(); >> void os_close(); >> >> int os_find_families (char ***list); >> int os_find_distros (const char *parent_id, char ***list); >> int os_find_releases (const char *parent_id, char ***list); >> int os_find_updates (const char *parent_id, char ***list); >> >> int os_lookup_value (os_value_t value_type, >> const char *os_id, >> char **value); >> >> The unique identifier for each distro is its 'id', which is a simple human >> readable string, similar to values we use for virt-install --os-variant today. > > As John suggested, I think we'd be safer having opaque structs for the > conceptual objects. One for the library itself, and another for an OS > distro. > > Perhaps have an > > 'os_info_t' as a handle for a library itself returned by os_init > 'os_distro_t' as a handle for a single OS distro instance > > > os_info_t os_info_new() > os_info_init(os_info_t *info, char *uri); /* loads the XML data */ > Sounds good, though why have a separate os_info_new()? And I'd rather have a separate API for initializing from a file, since that should be uncommon enough that we don't need to force uri=NULL on most users. int os_info_init(os_info_t **info) int os_info_init_from_uri(os_info_t **info, char *uri) Though it's a minor distinction for now. > For OS distros I think we need APIs to: > > - List all OS distros > - Find OS distros, matching a specific set of properties What uses do you have in mind for this? Being able to say e.g. 'all distros that support xen PV for IA64'? How do you think an API call would look? > - Read a property from an OS distro > - Read all properties from an OS distro Why would an API user want to do this? I don't see why we would need to enable this specifically, rather than make the user do this iteratively. > - List unique values for a property across all distros > Not sure I fully understand this. Why would a user want this? >> The user will ask the API for available families/distros/releases/updates, >> which will return a list of ids. We then pass an id to os_lookup_value to >> actually retrieve data. The family/distro/... separation will likely be >> removed pretty soon, in favor of an arbitrary hierarchy, where every OS >> can have child OSes: no doubt hardcoding the family/distro/... split would >> come back to bite us in the ass. > > I agree, the fixed hierarchy I describe really doesn't seem very nice > looking back on it. The names I gave them are rather contrived and only > really map nicely onto RHEL/Fedora release process. I think we're better > off being more flexible and allowing for arbitrary relationships in the > data files and API. I don't think we neccessarily want to force a single > rooted tree structure here. The key important factor with the hierarchy > is the concept of sharing metadata. > > I think we should take a hint from the way RDF works and define the API > and XML format as a flat list, but allow relationships to be defined, > and also allow tagging. > > - Flat list of OS distros with their full name, as defined by their > vendor/distributor > > "Red Hat Enterprise Linux 4.7" > "Red Hat Enterprise Linux 5.0" > "Fedora 10" > "Fedora 10" > "Debian Sarge" > > - A 'derived' property. Allows derived distros to declare > they should inherit metdata (eg Scientific Linux derives from > RHEL) > > - A 'clone' property. Allows functionally identical rebuilds > to declare they use exactly same metadata. (eg CentOS / RHEL) > > - A 'upgrades' property. Allows to indicate 'Fedora 11' is the > release following on from 'Fedora 10'. > > - A 'publisher' property to give name of entity producing the > distro eg 'Fedora Project', 'Red Hat', 'Microsoft' > > - A 'kernel type' and 'kernel version' property, eg 'linux' > and '2.6.26'. > > > Application UI might simulate a hierarchy by using the 'publisher' > property at first level, and then filtering the flat list of OS > distros at the 2nd level according to selected publisher. This > satisfies the key 'UI' reason for the hierarchy. The 'derived' > and 'clone' allow for inheritance of metadata. > I like this idea: certainly will give more flexibility. >> So, things that I'm interested in feedback on: >> >> - How do we expect apps to list OS choices? Currently, virt-manager lists >> type (linux, windows, unix, etc.) and associated distros (Fedora 8, RHEL4, >> Debian Lenny, etc.). The linux/windows/unix info isn't represented in the >> xml (should it be?) so the best way seems to be: >> >> Distro >> | >> --> Release >> | >> --> Update >> >> Ex. >> >> RHEL >> | >> -> RHEL5 >> | >> -> 5.0 >> 5.1 >> 5.2 >> >> If we do away with the family/distro/... distinction, the user won't have >> much choice in the matter, but the 'family' concept (e.g. value of >> 'Red Hat') isn't very useful to expose to a user. > > We should try to avoid forcing one representation onto apps. I think the > flat OS list + sets of properties will allow apps to build a variety of > UI models for this, either search based, tree based or filter based. > >> - How should we handle derivatives like Scientific Linux + CentOS: should we >> expect users to understand they are based on RHEL, or give them explicit >> IDs? > > They need explicit IDs, since they have unique download URLs that have > to be stored. The 'clone' and 'derived' properties will allow us to avoid > duplicating other metadata, and also allow apps to show/hide clones as > needed. > >> - Querying for device values (supported buses, models, etc.). Dan's original >> proposal talks about this; to recommend a default with the best chance of >> actually working, we need to know: >> >> - OS being installed >> - Virt type ('hvm' vs. 'xen') >> - Guest Architecture (i386, x86_64, ...) >> - Hypervisor (kvm, qemu, xen, vbox, ...) >> - Hypervisor version >> - Libvirt version >> >> We would need to find the intersection of what the OS, the hypervisor, >> and libvirt support, and return what we decide is the best choice. >> >> How to expose this in the API? We could simply have one long function >> >> os_lookup_device_value(char *os_id, char *virt_type, char *arch, ...) >> >> It works, but its pretty tedious, and I'm afraid that we would need >> even more info to make a correct choice in the future, and the above >> isn't flexible. We may also need some of the above info for other values >> (ACPI/APIC settings, returning a proper install url may depend on arch). >> Any suggestions? > > The more I think about this, the more I think we should avoid any specific > named attributes in the API. Supported devices are just other types of > property we can associated with a distro, in addition to ones I already > listed earlier. This could be useful in the UI too, for example, if you > know the hypervisor requires support for 'Xen paravirt disk', then when > browsing OS, you can filter on this property just as you would with the > others. > If the app already knows their hypervisor requires 'Xen paravirt disk', the above is fine, and we should facilitate filtering like that. However I would like osinfo to save the user from having to know those details: they should just be able to say 'I'm using xenpv on i386 for xen 1.2.3 and libvirt 4.5.6 with distro fedora10' and osinfo can return the required info. So I still don't see how to solve the above problem. Let's say we are installing winxp on qemu via libvirt: we want to know the recommended sound device model: winxp prefers ac97, es1370 qemu supports es1370, if >= 0.10.0, supports ac97 libvirt supports es1370, if >= 0.6.0 supports ac97 How do we solve this via the API? >> - os_init and os_close: Any better ideas for this? os_init just parses the >> xml document, os_close frees it. We could run os_init with the first API >> call, but I think that makes it less clear that the user would then >> need to call os_close(). > > I think its good to keep the initializer explicit, and if you add an > opaque type representing a handle to the library, this will force apps > to caller it and track it. > Sounds good. Thanks a bunch! - Cole From berrange at redhat.com Mon Jun 15 15:27:49 2009 From: berrange at redhat.com (Daniel P. Berrange) Date: Mon, 15 Jun 2009 16:27:49 +0100 Subject: [fedora-virt] Re: RFC: libosinfo: Library for virt OS/distro metadata 3 In-Reply-To: <4A366444.8020603@redhat.com> References: <4A357E9A.3050101@redhat.com> <20090615124802.GA15024@redhat.com> <4A366444.8020603@redhat.com> Message-ID: <20090615152749.GI7233@redhat.com> On Mon, Jun 15, 2009 at 11:09:56AM -0400, Cole Robinson wrote: > Daniel P. Berrange wrote: > > On Sun, Jun 14, 2009 at 06:50:02PM -0400, Cole Robinson wrote: > > For OS distros I think we need APIs to: > > > > - List all OS distros > > - Find OS distros, matching a specific set of properties > > What uses do you have in mind for this? Being able to say e.g. 'all > distros that support xen PV for IA64'? > > How do you think an API call would look? Just a function callback for doing the filtering. If the callback returned 1 the distro object is kept, otherwise it is discarded. typedef int (*osfilter-t)(osdistro_t *distro, void *opaque); osdistro_t **os_distro_find(osinfo_t, osfilter_t filter, void *opaque); > > - Read a property from an OS distro > > - Read all properties from an OS distro > > Why would an API user want to do this? I don't see why we would need to > enable this specifically, rather than make the user do this iteratively. > > > - List unique values for a property across all distros > > > > Not sure I fully understand this. Why would a user want this? Imagine virt-manager building a 2 level hiearchy. For the first level it wants to use this method - Get a list of uninque vendor names among all known OS distros eg char **vendors = os_info_unique_properties(osinfo, "vendor"); Upon selecting a vendor, it then wants the earlier method - Get a list of all OS distros for that vendor eg int vendorfilter(osdistro_t distro, void *opaque) { char *wantvendor = opaque; char *gotvendor = os_distro_get_prop(distro, "vendor"); if (gotvendor && STREQ(wantvendor, gotvendor) return 1; return 0; } osdistro_t *distros = os_distro_find(osinfo, vendorfilter, "Red Hat"); > >> > >> - OS being installed > >> - Virt type ('hvm' vs. 'xen') > >> - Guest Architecture (i386, x86_64, ...) > >> - Hypervisor (kvm, qemu, xen, vbox, ...) > >> - Hypervisor version > >> - Libvirt version > >> > >> We would need to find the intersection of what the OS, the hypervisor, > >> and libvirt support, and return what we decide is the best choice. > >> > >> How to expose this in the API? We could simply have one long function > >> > >> os_lookup_device_value(char *os_id, char *virt_type, char *arch, ...) > >> > >> It works, but its pretty tedious, and I'm afraid that we would need > >> even more info to make a correct choice in the future, and the above > >> isn't flexible. We may also need some of the above info for other values > >> (ACPI/APIC settings, returning a proper install url may depend on arch). > >> Any suggestions? > > > > The more I think about this, the more I think we should avoid any specific > > named attributes in the API. Supported devices are just other types of > > property we can associated with a distro, in addition to ones I already > > listed earlier. This could be useful in the UI too, for example, if you > > know the hypervisor requires support for 'Xen paravirt disk', then when > > browsing OS, you can filter on this property just as you would with the > > others. > > > > If the app already knows their hypervisor requires 'Xen paravirt disk', > the above is fine, and we should facilitate filtering like that. However > I would like osinfo to save the user from having to know those details: > they should just be able to say 'I'm using xenpv on i386 for xen 1.2.3 > and libvirt 4.5.6 with distro fedora10' and osinfo can return the > required info. So I still don't see how to solve the above problem. > > Let's say we are installing winxp on qemu via libvirt: we want to know > the recommended sound device model: > > winxp prefers ac97, es1370 > qemu supports es1370, if >= 0.10.0, supports ac97 > libvirt supports es1370, if >= 0.6.0 supports ac97 > > How do we solve this via the API? The latter 2 questions really say that libvirt needs to export more info about what a driver has. For the former, the OS info database needs to somehow provide a list of drivers available for each OS. Obviously you can take the intersection, but perhaps also define that they are listed in preferred order, "best" first. Perhaps we should be really ambitious and for each OS distro allow for a full list of PCI device IDs it supports. For linux you can auto-generate that from the kernel module metadata. You could even imagine that the distro provide an XML file in our format with this info in their release media/trees. Daniel -- |: Red Hat, Engineering, London -o- http://people.redhat.com/berrange/ :| |: http://libvirt.org -o- http://virt-manager.org -o- http://ovirt.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :| From crobinso at redhat.com Mon Jun 15 15:28:09 2009 From: crobinso at redhat.com (Cole Robinson) Date: Mon, 15 Jun 2009 11:28:09 -0400 Subject: [fedora-virt] Re: [et-mgmt-tools] RFC: libosinfo: Library for virt OS/distro metadata 3 In-Reply-To: <20090615111656.GB12273@movementarian.org> References: <4A357E9A.3050101@redhat.com> <20090615111656.GB12273@movementarian.org> Message-ID: <4A366889.7020102@redhat.com> John Levon wrote: > On Sun, Jun 14, 2009 at 06:50:02PM -0400, Cole Robinson wrote: > >> git clone http://fedorapeople.org/~crobinso/osinfo/.git > > I'm not convinced by the "arbitrary hierarchy" thing: I just don't see > how that could possibly be useful. Surely it's either an entirely flat > namespace, or a shallow structured one like you have. > > The flat namespace would be a set of keys and multiple values for each > key. One value would be "os type" (linux, windows, etc.). You'd most > likely have a "generic" entry still for fallback. > > An alternative is to represent the hierarchy in the UNIX way, via the > filesystem: > > /var/lib/osinfo/ > /var/lib/osinfo/linux/info.xml > /var/lib/osinfo/linux/fedora/info.xml > /var/lib/osinfo/linux/fedora/8/info.xml > > The fallback is pretty obvious then. Maybe it's over the top. The idea > of a single delivered XML file that users edit does trouble me though. > Maybe we at least have two files, one for customisations. > The single XML file approach certainly isn't the way forward. There are numerous ways we can solve the 'let admin customize osinfo' problem, but that can come after pinning down the API I think. >> int os_init(); >> void os_close(); > > Always, always, always, pass back an opaque identifier in an API - you > never know when you'll need to track per-thread state. It's generally a > good idea to pass in a version define too. Sounds good, but I'm not sure what you mean by passing in a version define? > > The XML parsing itself should happen lazily. We might want to let the > user specify a file, for example. > >> int os_find_families (char ***list); >> int os_find_distros (const char *parent_id, char ***list); >> int os_find_releases (const char *parent_id, char ***list); >> int os_find_updates (const char *parent_id, char ***list); > > Regardless of the hierarchy question I hate the idea of exposing it in > the API like this. > > There's really two (hopefully three eventually) things this library > needs to do: provide a list of everything it knows about so the user can > select it in a GUI or whatever, and provide configuration > recommendations given a particular set of values. > > I don't think the library can make any assumptions about how the former > might look. It just needs to return some thing like: > > struct osinfo { > const char *id; > nvpair_list_t values; > }; > > Either allocated as an array (probably easiest) or in a list. It's then > up to the client to decide what hierarchy to actually use, and it's all > dependent on what values they pick out of the nv list. > Agreed, I think Dan's mail covered this pretty well. > (The third thing is to identify OS types based upon installation media > when possible.) > Agreed, I'd like to do all detection here in the future. >> If we do away with the family/distro/... distinction, the user won't have >> much choice in the matter, but the 'family' concept (e.g. value of >> 'Red Hat') isn't very useful to expose to a user. > > If you mean API user, think "icon". > >> - How should we handle derivatives like Scientific Linux + CentOS: should we >> expect users to understand they are based on RHEL, or give them explicit >> IDs? > > Explicit IDs. You'd be surprised. > >> We would need to find the intersection of what the OS, the hypervisor, >> and libvirt support, and return what we decide is the best choice. >> >> How to expose this in the API? We could simply have one long function >> >> os_lookup_device_value(char *os_id, char *virt_type, char *arch, ...) > > The API user should pass in an nvlist, where a set of the names are > defined and known about. The response needs to indicate whether it's a > preferred setting ("would like virtio") or a required one. > I can see doing something like os_info_set_install_prop(os_info_t info, int prop, char *propval) So the API user might do: os_info_set_install_prop(myinfo, OS_INSTALL_VIRT_TYPE, "hvm"); os_info_set_install_prop(myinfo, OS_INSTALL_ARCH, "x86_64"); os_info_set_install_prop(myinfo, OS_INSTALL_HV_TYPE, "kvm"); Then lookup device properties like you would any other prop. Thanks! - Cole From berrange at redhat.com Mon Jun 15 16:00:00 2009 From: berrange at redhat.com (Daniel P. Berrange) Date: Mon, 15 Jun 2009 17:00:00 +0100 Subject: [fedora-virt] Re: RFC: libosinfo: Library for virt OS/distro metadata 3 In-Reply-To: <20090615155018.GA24251@movementarian.org> References: <4A357E9A.3050101@redhat.com> <20090615124802.GA15024@redhat.com> <4A366444.8020603@redhat.com> <20090615152749.GI7233@redhat.com> <20090615155018.GA24251@movementarian.org> Message-ID: <20090615160000.GJ7233@redhat.com> On Mon, Jun 15, 2009 at 11:50:18AM -0400, John Levon wrote: > On Mon, Jun 15, 2009 at 04:27:49PM +0100, Daniel P. Berrange wrote: > > > > > - Find OS distros, matching a specific set of properties > > > > > > What uses do you have in mind for this? Being able to say e.g. 'all > > > distros that support xen PV for IA64'? > > > > > > How do you think an API call would look? > > > > Just a function callback for doing the filtering. If the callback > > returned 1 the distro object is kept, otherwise it is discarded. > > > > typedef int (*osfilter-t)(osdistro_t *distro, void *opaque); > > osdistro_t **os_distro_find(osinfo_t, osfilter_t filter, void *opaque); > > I don't really like the idea of filtering. Instead it should just be a > callback API full stop. It's up to the client if they want to filter, or > find a specific entry, or whatever. So you mean that it can just be a list iterator pattern typedef int (*osdistro_iter)(osdistro_t *distro, void *opaque); int os_distro_iterate(osinfo_t, osdistro_iter iter, void *opaque); > > Imagine virt-manager building a 2 level hiearchy. For the first level > > it wants to use this method > > > > - Get a list of uninque vendor names among all known OS distros > > Pruning duplicates is surely something done in the client. It > really doesn't need library help... I was thinking that it may well be more efficient to let the library do it. That said, this is an optimization we can add later if observed to be neccessary in real world Daniel -- |: Red Hat, Engineering, London -o- http://people.redhat.com/berrange/ :| |: http://libvirt.org -o- http://virt-manager.org -o- http://ovirt.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :| From crobinso at redhat.com Mon Jun 15 16:11:18 2009 From: crobinso at redhat.com (Cole Robinson) Date: Mon, 15 Jun 2009 12:11:18 -0400 Subject: [fedora-virt] Re: [et-mgmt-tools] RFC: libosinfo: Library for virt OS/distro metadata 3 In-Reply-To: <20090615155824.GC24251@movementarian.org> References: <4A357E9A.3050101@redhat.com> <20090615111656.GB12273@movementarian.org> <4A366889.7020102@redhat.com> <20090615155824.GC24251@movementarian.org> Message-ID: <4A3672A6.6090100@redhat.com> John Levon wrote: > On Mon, Jun 15, 2009 at 11:28:09AM -0400, Cole Robinson wrote: > >>> The API user should pass in an nvlist, where a set of the names are >>> defined and known about. The response needs to indicate whether it's a >>> preferred setting ("would like virtio") or a required one. >> I can see doing something like >> >> os_info_set_install_prop(os_info_t info, int prop, char *propval) >> >> So the API user might do: >> >> os_info_set_install_prop(myinfo, OS_INSTALL_VIRT_TYPE, "hvm"); >> os_info_set_install_prop(myinfo, OS_INSTALL_ARCH, "x86_64"); >> os_info_set_install_prop(myinfo, OS_INSTALL_HV_TYPE, "kvm"); > > This isn't going to work as we most definitely have more than one value > of all of these settings. > The values the user sets are for what kind of guest they are installing at that moment (x86_64 kvm in this case, i686 xen PV in another). That teaches osinfo about our current setup, so it can give us valid recommendations for device properties and whatnot. This could take place after we already chose an OS ID. > Instead we need to pass in a list of "environments". Each one would > specify a particular combination of the values above (along with a > 'preferred' setting methinks). > Maybe we can avoid an explicit 'preferred' concept, and just return a list of supported values to the user. osinfo will put it's 'preferred' choice as the first in the list, but if the user wants to differ, they can choose from the other values in the list. I guess this also raises the question of how we indicate 'return a single value' vs. 'return a list' when fetching info. Thanks, Cole From levon at movementarian.org Mon Jun 15 15:50:18 2009 From: levon at movementarian.org (John Levon) Date: Mon, 15 Jun 2009 11:50:18 -0400 Subject: [fedora-virt] Re: RFC: libosinfo: Library for virt OS/distro metadata 3 In-Reply-To: <20090615152749.GI7233@redhat.com> References: <4A357E9A.3050101@redhat.com> <20090615124802.GA15024@redhat.com> <4A366444.8020603@redhat.com> <20090615152749.GI7233@redhat.com> Message-ID: <20090615155018.GA24251@movementarian.org> On Mon, Jun 15, 2009 at 04:27:49PM +0100, Daniel P. Berrange wrote: > > > - Find OS distros, matching a specific set of properties > > > > What uses do you have in mind for this? Being able to say e.g. 'all > > distros that support xen PV for IA64'? > > > > How do you think an API call would look? > > Just a function callback for doing the filtering. If the callback > returned 1 the distro object is kept, otherwise it is discarded. > > typedef int (*osfilter-t)(osdistro_t *distro, void *opaque); > osdistro_t **os_distro_find(osinfo_t, osfilter_t filter, void *opaque); I don't really like the idea of filtering. Instead it should just be a callback API full stop. It's up to the client if they want to filter, or find a specific entry, or whatever. The lifetime rules are such that an entry exists whilst the handle is open, so there's no issues with borrowing pointers in the callback etc. > Imagine virt-manager building a 2 level hiearchy. For the first level > it wants to use this method > > - Get a list of uninque vendor names among all known OS distros Pruning duplicates is surely something done in the client. It really doesn't need library help... regards john From levon at movementarian.org Mon Jun 15 15:52:06 2009 From: levon at movementarian.org (John Levon) Date: Mon, 15 Jun 2009 11:52:06 -0400 Subject: [fedora-virt] Re: [et-mgmt-tools] RFC: libosinfo: Library for virt OS/distro metadata 3 In-Reply-To: <4A366889.7020102@redhat.com> References: <4A357E9A.3050101@redhat.com> <20090615111656.GB12273@movementarian.org> <4A366889.7020102@redhat.com> Message-ID: <20090615155206.GB24251@movementarian.org> On Mon, Jun 15, 2009 at 11:28:09AM -0400, Cole Robinson wrote: > >> int os_init(); > >> void os_close(); > > > > Always, always, always, pass back an opaque identifier in an API - you > > never know when you'll need to track per-thread state. It's generally a > > good idea to pass in a version define too. > > Sounds good, but I'm not sure what you mean by passing in a version define? osinfo.h: ... #define OSINFO_VERSION 1 ... client.c: #include oi_handle_t os_init(OSINFO_VERSION); This allows certain incompatible changes without having to rev the soversion. regards john From levon at movementarian.org Mon Jun 15 15:58:24 2009 From: levon at movementarian.org (John Levon) Date: Mon, 15 Jun 2009 11:58:24 -0400 Subject: [fedora-virt] Re: [et-mgmt-tools] RFC: libosinfo: Library for virt OS/distro metadata 3 In-Reply-To: <4A366889.7020102@redhat.com> References: <4A357E9A.3050101@redhat.com> <20090615111656.GB12273@movementarian.org> <4A366889.7020102@redhat.com> Message-ID: <20090615155824.GC24251@movementarian.org> On Mon, Jun 15, 2009 at 11:28:09AM -0400, Cole Robinson wrote: > > The API user should pass in an nvlist, where a set of the names are > > defined and known about. The response needs to indicate whether it's a > > preferred setting ("would like virtio") or a required one. > > I can see doing something like > > os_info_set_install_prop(os_info_t info, int prop, char *propval) > > So the API user might do: > > os_info_set_install_prop(myinfo, OS_INSTALL_VIRT_TYPE, "hvm"); > os_info_set_install_prop(myinfo, OS_INSTALL_ARCH, "x86_64"); > os_info_set_install_prop(myinfo, OS_INSTALL_HV_TYPE, "kvm"); This isn't going to work as we most definitely have more than one value of all of these settings. Instead we need to pass in a list of "environments". Each one would specify a particular combination of the values above (along with a 'preferred' setting methinks). regards john From levon at movementarian.org Mon Jun 15 16:01:04 2009 From: levon at movementarian.org (John Levon) Date: Mon, 15 Jun 2009 12:01:04 -0400 Subject: [fedora-virt] Re: RFC: libosinfo: Library for virt OS/distro metadata 3 In-Reply-To: <20090615160000.GJ7233@redhat.com> References: <4A357E9A.3050101@redhat.com> <20090615124802.GA15024@redhat.com> <4A366444.8020603@redhat.com> <20090615152749.GI7233@redhat.com> <20090615155018.GA24251@movementarian.org> <20090615160000.GJ7233@redhat.com> Message-ID: <20090615160104.GD24251@movementarian.org> On Mon, Jun 15, 2009 at 05:00:00PM +0100, Daniel P. Berrange wrote: > > I don't really like the idea of filtering. Instead it should just be a > > callback API full stop. It's up to the client if they want to filter, or > > find a specific entry, or whatever. > > So you mean that it can just be a list iterator pattern > > typedef int (*osdistro_iter)(osdistro_t *distro, void *opaque); > int os_distro_iterate(osinfo_t, osdistro_iter iter, void *opaque); Yep. regards john From crobinso at redhat.com Mon Jun 15 16:51:49 2009 From: crobinso at redhat.com (Cole Robinson) Date: Mon, 15 Jun 2009 12:51:49 -0400 Subject: [fedora-virt] Re: [et-mgmt-tools] RFC: libosinfo: Library for virt OS/distro metadata 3 In-Reply-To: <20090615162858.GF24251@movementarian.org> References: <4A357E9A.3050101@redhat.com> <20090615111656.GB12273@movementarian.org> <4A366889.7020102@redhat.com> <20090615155824.GC24251@movementarian.org> <4A3672A6.6090100@redhat.com> <20090615162858.GF24251@movementarian.org> Message-ID: <4A367C25.8000509@redhat.com> John Levon wrote: > On Mon, Jun 15, 2009 at 12:11:18PM -0400, Cole Robinson wrote: > >>>>> The API user should pass in an nvlist, where a set of the names are >>>>> defined and known about. The response needs to indicate whether it's a >>>>> preferred setting ("would like virtio") or a required one. >>>> I can see doing something like >>>> >>>> os_info_set_install_prop(os_info_t info, int prop, char *propval) >>>> >>>> So the API user might do: >>>> >>>> os_info_set_install_prop(myinfo, OS_INSTALL_VIRT_TYPE, "hvm"); >>>> os_info_set_install_prop(myinfo, OS_INSTALL_ARCH, "x86_64"); >>>> os_info_set_install_prop(myinfo, OS_INSTALL_HV_TYPE, "kvm"); >>> This isn't going to work as we most definitely have more than one value >>> of all of these settings. >> The values the user sets are for what kind of guest they are installing >> at that moment (x86_64 kvm in this case, i686 xen PV in another). > > That's backwards, though. I don't care about kvm or xen. I care about > installing a particular guest type, and want the library to tell me the > best method. To do that it needs to match guest needs against host > capabilities, and that implies the above properties need to be > multi-valued. There is no one "golden setup" even on a single system and > it would be a major mistake to presume there ever will be. > No presumption here. In virt-manager, those above values are chosen by the user (qemu vs. kvm vs. xenner, arch, xenpv vs. xenfv). I'm not saying those above API calls would be hard coded, it would be the result of: ./virt-install --connect qemu:///system --arch x86_64 --virt-type kvm --os-variant foobar ... I hear you that it would be nice if the user could say 'here's the OS I want, here's my host config, DO IT!', and to some degree virt-manager/virt-install already plays that role, but at the osinfo library it can come later and isn't a big priority at the moment. I'm interested in just reaching parity with the current virtinst osdict solution for now. >>> Instead we need to pass in a list of "environments". Each one would >>> specify a particular combination of the values above (along with a >>> 'preferred' setting methinks). >> Maybe we can avoid an explicit 'preferred' concept, and just return a >> list of supported values to the user. osinfo will put it's 'preferred' >> choice as the first in the list, but if the user wants to differ, they >> can choose from the other values in the list. > > There may be more than one preferred setting ('kvm or xenpv, but I'd > avoid xenhvm'). Possibly we need a more nuanced notion. > > regards > john Thanks, Cole From gianluca.cecchi at gmail.com Mon Jun 15 17:28:09 2009 From: gianluca.cecchi at gmail.com (Gianluca Cecchi) Date: Mon, 15 Jun 2009 19:28:09 +0200 Subject: [fedora-virt] default tftp root dir in virt-manager or qemu? Message-ID: <561c252c0906151028o7f28100fp1f149128b0b1e38f@mail.gmail.com> Hello, 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 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? If this helps, I'm trying to create a qemu/kvm virtual machine. 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") 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 virbro default interface). No configuration done by me. 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.... Thanks for any pointer. Bye, Gianluca From rjones at redhat.com Mon Jun 15 19:40:31 2009 From: rjones at redhat.com (Richard W.M. Jones) Date: Mon, 15 Jun 2009 20:40:31 +0100 Subject: [fedora-virt] libguestfs 'supermin appliance' Message-ID: <20090615194031.GA21388@amd.home.annexia.org> I just checked in a very experimental[1] set of patches to libguestfs git repo which allow you to build a so-called 'supermin (super- minimized) appliance'. The fact that it passes many of the API tests is nothing short of remarkable. To explain what this all means, read this: http://git.et.redhat.com/?p=libguestfs.git;a=commitdiff;h=14ec52d3dc332a02dcb7d95b5f5d21fd863fc99e Rich. [1] With any luck, nothing will be broken _unless_ you do: ./configure --enable-supermin -- Richard Jones, Emerging Technologies, Red Hat http://et.redhat.com/~rjones libguestfs lets you edit virtual machines. Supports shell scripting, bindings from many languages. http://et.redhat.com/~rjones/libguestfs/ See what it can do: http://et.redhat.com/~rjones/libguestfs/recipes.html From rjones at redhat.com Mon Jun 15 21:38:39 2009 From: rjones at redhat.com (Richard W.M. Jones) Date: Mon, 15 Jun 2009 22:38:39 +0100 Subject: [fedora-virt] libguestfs 'supermin appliance' In-Reply-To: <20090615194031.GA21388@amd.home.annexia.org> References: <20090615194031.GA21388@amd.home.annexia.org> Message-ID: <20090615213839.GB21388@amd.home.annexia.org> On Mon, Jun 15, 2009 at 08:40:31PM +0100, Richard W.M. Jones wrote: > I just checked in a very experimental[1] set of patches to libguestfs > git repo which allow you to build a so-called 'supermin (super- > minimized) appliance'. The fact that it passes many of the API tests > is nothing short of remarkable. All tests pass! I forgot to mention in the original announcement that you will need febootstrap 2.2. The configure script should complain if you try to use an older version. The new appliance is a mere 500K, so libguestfs RPMs will be a lot smaller. Of course that just means they will have many more dependencies, so the amount pulled down will be the same or greater. I will push a version of this into Rawhide so people can test it out. Rich. -- Richard Jones, Emerging Technologies, Red Hat http://et.redhat.com/~rjones Read my programming blog: http://rwmj.wordpress.com Fedora now supports 75 OCaml packages (the OPEN alternative to F#) http://cocan.org/getting_started_with_ocaml_on_red_hat_and_fedora From bill at bfccomputing.com Tue Jun 16 02:46:52 2009 From: bill at bfccomputing.com (Bill McGonigle) Date: Mon, 15 Jun 2009 22:46:52 -0400 Subject: [fedora-virt] libguestfs 'supermin appliance' In-Reply-To: <20090615194031.GA21388@amd.home.annexia.org> References: <20090615194031.GA21388@amd.home.annexia.org> Message-ID: <4A37079C.9050707@bfccomputing.com> Very nice. I could have used a variation on this in a previous life building one-off Redhat-derived distros. My hack was considerably less clever. On 06/15/2009 03:40 PM, Richard W.M. Jones wrote: > To explain what this all means, read this: >+Furthermore there are certain unlikely changes in the packages on the >+host which could break a supermin appliance, eg. an updated library >+which depends on an additional data file. So does this mean that it doesn't consult RPM for those dependencies on each build (or a 're-config' pass?) or just that there may be poorly-constructed RPM's that don't properly reference their dependencies? -Bill -- Bill McGonigle, Owner Work: 603.448.4440 BFC Computing, LLC Home: 603.448.1668 http://www.bfccomputing.com/ Cell: 603.252.2606 Twitter, etc.: bill_mcgonigle Page: 603.442.1833 Email, IM, VOIP: bill at bfccomputing.com Blog: http://blog.bfccomputing.com/ VCard: http://bfccomputing.com/vcard/bill.vcf From bill at bfccomputing.com Tue Jun 16 03:41:02 2009 From: bill at bfccomputing.com (Bill McGonigle) Date: Mon, 15 Jun 2009 23:41:02 -0400 Subject: [fedora-virt] handling guest-service dependencies at boot time elegantly? In-Reply-To: <4A31F89D.9080607@redhat.com> References: <4A315D36.7040500@bfccomputing.com> <4A31F89D.9080607@redhat.com> Message-ID: <4A37144E.3010909@bfccomputing.com> On 06/12/2009 02:41 AM, Chris Lalancette wrote: > If I were going to do this, I'd write a very small daemon to run in the dom0 > that just listens to a couple of ports. ... Inside the nexenta > guest, you just have a simple "nc" command that connects to the dom0 once it is > booted, and acts like a "I'm ready" command. This is a great idea. I'll put it in my queue, maybe with some trivially-signed messages, so I can keep it on one port. Thanks, -Bill -- Bill McGonigle, Owner Work: 603.448.4440 BFC Computing, LLC Home: 603.448.1668 http://www.bfccomputing.com/ Cell: 603.252.2606 Twitter, etc.: bill_mcgonigle Page: 603.442.1833 Email, IM, VOIP: bill at bfccomputing.com Blog: http://blog.bfccomputing.com/ VCard: http://bfccomputing.com/vcard/bill.vcf From rjones at redhat.com Tue Jun 16 10:30:47 2009 From: rjones at redhat.com (Richard W.M. Jones) Date: Tue, 16 Jun 2009 11:30:47 +0100 Subject: [fedora-virt] libguestfs 'supermin appliance' In-Reply-To: <4A37079C.9050707@bfccomputing.com> References: <20090615194031.GA21388@amd.home.annexia.org> <4A37079C.9050707@bfccomputing.com> Message-ID: <20090616103047.GC21388@amd.home.annexia.org> On Mon, Jun 15, 2009 at 10:46:52PM -0400, Bill McGonigle wrote: > Very nice. I could have used a variation on this in a previous life > building one-off Redhat-derived distros. My hack was considerably less > clever. > > On 06/15/2009 03:40 PM, Richard W.M. Jones wrote: >> To explain what this all means, read this: > >+Furthermore there are certain unlikely changes in the packages on the > >+host which could break a supermin appliance, eg. an updated library > >+which depends on an additional data file. > > So does this mean that it doesn't consult RPM for those dependencies on > each build (or a 're-config' pass?) or just that there may be > poorly-constructed RPM's that don't properly reference their > dependencies? It doesn't consult RPM at all (it'd be far too slow). BTW 1.0.47 was quite broken. I just released 1.0.48 which works ... Rich. -- Richard Jones, Emerging Technologies, Red Hat http://et.redhat.com/~rjones virt-p2v converts physical machines to virtual machines. Boot with a live CD or over the network (PXE) and turn machines into Xen guests. http://et.redhat.com/~rjones/virt-p2v From rjones at redhat.com Tue Jun 16 10:34:12 2009 From: rjones at redhat.com (Richard W.M. Jones) Date: Tue, 16 Jun 2009 11:34:12 +0100 Subject: [fedora-virt] F12 feature: Host information Message-ID: <20090616103412.GD21388@amd.home.annexia.org> 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 From levon at movementarian.org Mon Jun 15 16:28:58 2009 From: levon at movementarian.org (John Levon) Date: Mon, 15 Jun 2009 12:28:58 -0400 Subject: [fedora-virt] Re: [et-mgmt-tools] RFC: libosinfo: Library for virt OS/distro metadata 3 In-Reply-To: <4A3672A6.6090100@redhat.com> References: <4A357E9A.3050101@redhat.com> <20090615111656.GB12273@movementarian.org> <4A366889.7020102@redhat.com> <20090615155824.GC24251@movementarian.org> <4A3672A6.6090100@redhat.com> Message-ID: <20090615162858.GF24251@movementarian.org> On Mon, Jun 15, 2009 at 12:11:18PM -0400, Cole Robinson wrote: > >>> The API user should pass in an nvlist, where a set of the names are > >>> defined and known about. The response needs to indicate whether it's a > >>> preferred setting ("would like virtio") or a required one. > >> I can see doing something like > >> > >> os_info_set_install_prop(os_info_t info, int prop, char *propval) > >> > >> So the API user might do: > >> > >> os_info_set_install_prop(myinfo, OS_INSTALL_VIRT_TYPE, "hvm"); > >> os_info_set_install_prop(myinfo, OS_INSTALL_ARCH, "x86_64"); > >> os_info_set_install_prop(myinfo, OS_INSTALL_HV_TYPE, "kvm"); > > > > This isn't going to work as we most definitely have more than one value > > of all of these settings. > > The values the user sets are for what kind of guest they are installing > at that moment (x86_64 kvm in this case, i686 xen PV in another). That's backwards, though. I don't care about kvm or xen. I care about installing a particular guest type, and want the library to tell me the best method. To do that it needs to match guest needs against host capabilities, and that implies the above properties need to be multi-valued. There is no one "golden setup" even on a single system and it would be a major mistake to presume there ever will be. > > Instead we need to pass in a list of "environments". Each one would > > specify a particular combination of the values above (along with a > > 'preferred' setting methinks). > > Maybe we can avoid an explicit 'preferred' concept, and just return a > list of supported values to the user. osinfo will put it's 'preferred' > choice as the first in the list, but if the user wants to differ, they > can choose from the other values in the list. There may be more than one preferred setting ('kvm or xenpv, but I'd avoid xenhvm'). Possibly we need a more nuanced notion. regards john From levon at movementarian.org Mon Jun 15 17:56:03 2009 From: levon at movementarian.org (John Levon) Date: Mon, 15 Jun 2009 13:56:03 -0400 Subject: [fedora-virt] Re: [et-mgmt-tools] RFC: libosinfo: Library for virt OS/distro metadata 3 In-Reply-To: <4A367C25.8000509@redhat.com> References: <4A357E9A.3050101@redhat.com> <20090615111656.GB12273@movementarian.org> <4A366889.7020102@redhat.com> <20090615155824.GC24251@movementarian.org> <4A3672A6.6090100@redhat.com> <20090615162858.GF24251@movementarian.org> <4A367C25.8000509@redhat.com> Message-ID: <20090615175603.GH24251@movementarian.org> On Mon, Jun 15, 2009 at 12:51:49PM -0400, Cole Robinson wrote: > >> The values the user sets are for what kind of guest they are installing > >> at that moment (x86_64 kvm in this case, i686 xen PV in another). > > > > That's backwards, though. I don't care about kvm or xen. I care about > > installing a particular guest type, and want the library to tell me the > > best method. To do that it needs to match guest needs against host > > capabilities, and that implies the above properties need to be > > multi-valued. There is no one "golden setup" even on a single system and > > it would be a major mistake to presume there ever will be. > > > > No presumption here. In virt-manager, those above values are chosen by > the user (qemu vs. kvm vs. xenner, arch, xenpv vs. xenfv). We aren't writing libvirtmanager though. > I'm not saying those above API calls would be hard coded, it would be > the result of: > > ./virt-install --connect qemu:///system --arch x86_64 --virt-type kvm > --os-variant foobar ... > > I hear you that it would be nice if the user could say 'here's the OS I > want, here's my host config, DO IT!', and to some degree > virt-manager/virt-install already plays that role, but at the osinfo > library it can come later ^^^^^^^^^^^^^^^^^ No, you're proposing an API which prevents it, that is, one value per key (one hypervisor type, one arch, etc.). That's precisely my complaint. By all means make the current /implementation/ throw its hands up if given more than one virtenv[1]. Just don't encode it into the API. regards john [1] guest-arch+hypervisor-type+virt-type+... combo From wildfire at progsoc.org Tue Jun 16 13:40:34 2009 From: wildfire at progsoc.org (Anand Kumria) Date: Tue, 16 Jun 2009 14:40:34 +0100 Subject: [fedora-virt] F12 feature: Host information In-Reply-To: <20090616103412.GD21388@amd.home.annexia.org> References: <20090616103412.GD21388@amd.home.annexia.org> Message-ID: <971f65790906160640o9b6ae69ie6359ccd15334ace@mail.gmail.com> On Tue, Jun 16, 2009 at 11:34 AM, Richard W.M. Jones wrote: > > 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? > Thanks for the heads up. My only comment is that generally hosts are already some kind of monitoring daemon (e.g. collectd) -- and this will mean they may have to end up running another. If there one tht RHEL customers tend to run? If so, perhaps a plugin to that to extract the information would be simpler / less intrusive. For the guest side, it sounds like you will be inventing a text based protocol to ask for statistical information about the host -- I just wonder if such a protocol already exists. And if there is already a client for that, then the guest side would just be the channel hookup, rather than any client dev. Cheers, Anand -------------- next part -------------- An HTML attachment was scrubbed... URL: From rjones at redhat.com Tue Jun 16 16:06:08 2009 From: rjones at redhat.com (Richard W.M. Jones) Date: Tue, 16 Jun 2009 17:06:08 +0100 Subject: [fedora-virt] libguestfs experimental build with supermin appliance Message-ID: <20090616160608.GA26761@amd.home.annexia.org> This is an experimental rebuild of libguestfs with the supermin appliance: http://koji.fedoraproject.org/koji/taskinfo?taskID=1418138 Make sure you install libguestfs >= 1.0.48-2. Earlier versions were broken in various different ways. I've tested it locally on i586 & x86-64 and it seems to work for me. You'll get warning messages like this: > alloc /tmp/test.img 10M > run cpio: ./usr/sbin/glibc_post_upgrade.i686: Cannot open: Permission denied cpio: ./usr/sbin/groupadd: Cannot open: Permission denied cpio: ./usr/sbin/groupdel: Cannot open: Permission denied cpio: ./usr/sbin/groupmems: Cannot open: Permission denied cpio: ./usr/sbin/groupmod: Cannot open: Permission denied cpio: ./usr/sbin/tzdata-update: Cannot open: Permission denied [etc.] This is a known problem (it tries to pull some files from the host filesystem which are not readable) and shouldn't affect any operations and it still passes the test suite even without those programs. Rich. -- Richard Jones, Emerging Technologies, Red Hat http://et.redhat.com/~rjones virt-p2v converts physical machines to virtual machines. Boot with a live CD or over the network (PXE) and turn machines into Xen guests. http://et.redhat.com/~rjones/virt-p2v From rjones at redhat.com Tue Jun 16 16:08:15 2009 From: rjones at redhat.com (Richard W.M. Jones) Date: Tue, 16 Jun 2009 17:08:15 +0100 Subject: [fedora-virt] F12 feature: Host information In-Reply-To: <971f65790906160640o9b6ae69ie6359ccd15334ace@mail.gmail.com> References: <20090616103412.GD21388@amd.home.annexia.org> <971f65790906160640o9b6ae69ie6359ccd15334ace@mail.gmail.com> Message-ID: <20090616160815.GB26761@amd.home.annexia.org> On Tue, Jun 16, 2009 at 02:40:34PM +0100, Anand Kumria wrote: > On Tue, Jun 16, 2009 at 11:34 AM, Richard W.M. Jones wrote: > > 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? > > Thanks for the heads up. > > My only comment is that generally hosts are already some kind of monitoring > daemon (e.g. collectd) -- and this will mean they may have to end up running > another. > > If there one tht RHEL customers tend to run? If so, perhaps a plugin to that > to extract the information would be simpler / less intrusive. Good point, but there is certainly no standard for monitoring daemons. Some will be running proprietary daemons. > For the guest side, it sounds like you will be inventing a text based > protocol to ask for statistical information about the host -- I just wonder > if such a protocol already exists. And if there is already a client for > that, then the guest side would just be the channel hookup, rather than any > client dev. I'm not aware of an existing protocol for that. Does anyone have any suggestions? Rich. -- Richard Jones, Emerging Technologies, Red Hat http://et.redhat.com/~rjones virt-p2v converts physical machines to virtual machines. Boot with a live CD or over the network (PXE) and turn machines into Xen guests. http://et.redhat.com/~rjones/virt-p2v From jameshubbard at gmail.com Tue Jun 16 16:14:59 2009 From: jameshubbard at gmail.com (James Hubbard) Date: Tue, 16 Jun 2009 12:14:59 -0400 Subject: [fedora-virt] F12 feature: Host information In-Reply-To: <20090616160815.GB26761@amd.home.annexia.org> References: <20090616103412.GD21388@amd.home.annexia.org> <971f65790906160640o9b6ae69ie6359ccd15334ace@mail.gmail.com> <20090616160815.GB26761@amd.home.annexia.org> Message-ID: On Tue, Jun 16, 2009 at 12:08 PM, Richard W.M. Jones wrote: > On Tue, Jun 16, 2009 at 02:40:34PM +0100, Anand Kumria wrote: >> For the guest side, it sounds like you will be inventing a text based >> protocol to ask for statistical information about the host -- I just wonder >> if such a protocol already exists. And if there is already a client for >> that, then the guest side would just be the channel hookup, rather than any >> client dev. > > I'm not aware of an existing protocol for that. ?Does anyone > have any suggestions? Can't the data be published via SNMP and the admin could configure what ever method to expose that to potential users? (Re-sent with fedora-virt in the To:). From berrange at redhat.com Tue Jun 16 16:20:08 2009 From: berrange at redhat.com (Daniel P. Berrange) Date: Tue, 16 Jun 2009 17:20:08 +0100 Subject: [fedora-virt] F12 feature: Host information In-Reply-To: References: <20090616103412.GD21388@amd.home.annexia.org> <971f65790906160640o9b6ae69ie6359ccd15334ace@mail.gmail.com> <20090616160815.GB26761@amd.home.annexia.org> Message-ID: <20090616162008.GO24602@redhat.com> On Tue, Jun 16, 2009 at 12:14:59PM -0400, James Hubbard wrote: > On Tue, Jun 16, 2009 at 12:08 PM, Richard W.M. Jones wrote: > > On Tue, Jun 16, 2009 at 02:40:34PM +0100, Anand Kumria wrote: > >> For the guest side, it sounds like you will be inventing a text based > >> protocol to ask for statistical information about the host -- I just wonder > >> if such a protocol already exists. And if there is already a client for > >> that, then the guest side would just be the channel hookup, rather than any > >> client dev. > > > > I'm not aware of an existing protocol for that. ?Does anyone > > have any suggestions? > > Can't the data be published via SNMP and the admin could configure > what ever method to expose that to potential users? It is not explicit in Richard's feature page, but a core goal of this hostinfo service is to avoid any use of networking. We don't want to presume that a guest has a NIC, nor that the host has a configured NIC on the same LAN as the guest. Regards, Daniel -- |: Red Hat, Engineering, London -o- http://people.redhat.com/berrange/ :| |: http://libvirt.org -o- http://virt-manager.org -o- http://ovirt.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :| From rjones at redhat.com Tue Jun 16 16:32:21 2009 From: rjones at redhat.com (Richard W.M. Jones) Date: Tue, 16 Jun 2009 17:32:21 +0100 Subject: [fedora-virt] F12 feature: Host information In-Reply-To: <20090616162008.GO24602@redhat.com> References: <20090616103412.GD21388@amd.home.annexia.org> <971f65790906160640o9b6ae69ie6359ccd15334ace@mail.gmail.com> <20090616160815.GB26761@amd.home.annexia.org> <20090616162008.GO24602@redhat.com> Message-ID: <20090616163221.GA27250@amd.home.annexia.org> On Tue, Jun 16, 2009 at 05:20:08PM +0100, Daniel P. Berrange wrote: > On Tue, Jun 16, 2009 at 12:14:59PM -0400, James Hubbard wrote: > > On Tue, Jun 16, 2009 at 12:08 PM, Richard W.M. Jones wrote: > > > On Tue, Jun 16, 2009 at 02:40:34PM +0100, Anand Kumria wrote: > > >> For the guest side, it sounds like you will be inventing a text based > > >> protocol to ask for statistical information about the host -- I just wonder > > >> if such a protocol already exists. And if there is already a client for > > >> that, then the guest side would just be the channel hookup, rather than any > > >> client dev. > > > > > > I'm not aware of an existing protocol for that. ?Does anyone > > > have any suggestions? > > > > Can't the data be published via SNMP and the admin could configure > > what ever method to expose that to potential users? > > It is not explicit in Richard's feature page, but a core goal of this > hostinfo service is to avoid any use of networking. We don't want to > presume that a guest has a NIC, nor that the host has a configured > NIC on the same LAN as the guest. Indeed - it's quite common for guests to have no common network with the host. In oVirt for example you have two physical network cards. Rich. -- Richard Jones, Emerging Technologies, Red Hat http://et.redhat.com/~rjones Read my programming blog: http://rwmj.wordpress.com Fedora now supports 75 OCaml packages (the OPEN alternative to F#) http://cocan.org/getting_started_with_ocaml_on_red_hat_and_fedora From jameshubbard at gmail.com Tue Jun 16 16:38:37 2009 From: jameshubbard at gmail.com (James Hubbard) Date: Tue, 16 Jun 2009 12:38:37 -0400 Subject: [fedora-virt] F12 feature: Host information In-Reply-To: <20090616162008.GO24602@redhat.com> References: <20090616103412.GD21388@amd.home.annexia.org> <971f65790906160640o9b6ae69ie6359ccd15334ace@mail.gmail.com> <20090616160815.GB26761@amd.home.annexia.org> <20090616162008.GO24602@redhat.com> Message-ID: On Tue, Jun 16, 2009 at 12:20 PM, Daniel P. Berrange wrote: > On Tue, Jun 16, 2009 at 12:14:59PM -0400, James Hubbard wrote: >> On Tue, Jun 16, 2009 at 12:08 PM, Richard W.M. Jones wrote: >> > On Tue, Jun 16, 2009 at 02:40:34PM +0100, Anand Kumria wrote: >> >> For the guest side, it sounds like you will be inventing a text based >> >> protocol to ask for statistical information about the host -- I just wonder >> >> if such a protocol already exists. And if there is already a client for >> >> that, then the guest side would just be the channel hookup, rather than any >> >> client dev. >> > >> > I'm not aware of an existing protocol for that. ?Does anyone >> > have any suggestions? >> >> Can't the data be published via SNMP and the admin could configure >> what ever method to expose that to potential users? > > It is not explicit in Richard's feature page, but a core goal of this > hostinfo service is to avoid any use of networking. We don't want to > presume that a guest has a NIC, nor that the host has a configured > NIC on the same LAN as the guest. So for the situation where there is no NIC/network you have the following: a. Display, keyboard, mouse, sound exported in some way that allows use without the machine having network access. (This could be useful for secure environments.) b. VM starts image where batch processing occurs. No user connectivity. I don't understand how providing that information to the batch processor could help, unless it decides to wait until the machine isn't loaded. For not on the same LAN: a. The admin still could provision snmp to send results to the appropriate host. As far as it being a serial device, why not export a host serial device that any guest could connect to and make it readonly from the guest and not even allow the guest to send data to the host? The host would constantly send data to the serial device. I'm not knocking the idea. it just seems like a feature waiting for abuse or a potential security problem. From rjones at redhat.com Tue Jun 16 17:03:38 2009 From: rjones at redhat.com (Richard W.M. Jones) Date: Tue, 16 Jun 2009 18:03:38 +0100 Subject: [fedora-virt] F12 feature: Host information In-Reply-To: References: <20090616103412.GD21388@amd.home.annexia.org> <971f65790906160640o9b6ae69ie6359ccd15334ace@mail.gmail.com> <20090616160815.GB26761@amd.home.annexia.org> <20090616162008.GO24602@redhat.com> Message-ID: <20090616170338.GA27377@amd.home.annexia.org> On Tue, Jun 16, 2009 at 12:38:37PM -0400, James Hubbard wrote: > So for the situation where there is no NIC/network you have the following: > a. Display, keyboard, mouse, sound exported in some way that allows > use without the machine having network access. (This could be > useful for secure environments.) It isn't that there is no network, it's that the guest and the host networks are strictly separated from each other, often physically. Rich. -- Richard Jones, Emerging Technologies, Red Hat http://et.redhat.com/~rjones libguestfs lets you edit virtual machines. Supports shell scripting, bindings from many languages. http://et.redhat.com/~rjones/libguestfs/ See what it can do: http://et.redhat.com/~rjones/libguestfs/recipes.html From bill at bfccomputing.com Tue Jun 16 18:21:02 2009 From: bill at bfccomputing.com (Bill McGonigle) Date: Tue, 16 Jun 2009 14:21:02 -0400 Subject: [fedora-virt] F12 feature: Host information In-Reply-To: <20090616170338.GA27377@amd.home.annexia.org> References: <20090616103412.GD21388@amd.home.annexia.org> <971f65790906160640o9b6ae69ie6359ccd15334ace@mail.gmail.com> <20090616160815.GB26761@amd.home.annexia.org> <20090616162008.GO24602@redhat.com> <20090616170338.GA27377@amd.home.annexia.org> Message-ID: <4A37E28E.4000007@bfccomputing.com> On 06/16/2009 01:03 PM, Richard W.M. Jones wrote: > It isn't that there is no network, it's that the guest and the host > networks are strictly separated from each other, often physically. Could you clarify that - you mean like PCI network card assignment? Because the guest can't be safe from its host, from a security stance, unless SELinux does more than I realize. It would be straightforward to create an isolated monitoring bridge with a private address space if one wanted to do SNMP between guests and hosts. (OK, to be fair, I haven't ever tried this with virtual interfaces). Alton Brown is always asking at the kitchen gadget store, "OK, but what else can it do?" I'm not saying there's not a use for this special-purpose device, but is it a one-off or the start of more general-purpose infrastructure? That armchair quarterbacking aside - the Wiki page says you have customers asking for this. Have they already ruled out an SNMP approach? Too complex, too heavy-weight, etc.? -Bill -- Bill McGonigle, Owner Work: 603.448.4440 BFC Computing, LLC Home: 603.448.1668 http://www.bfccomputing.com/ Cell: 603.252.2606 Twitter, etc.: bill_mcgonigle Page: 603.442.1833 Email, IM, VOIP: bill at bfccomputing.com Blog: http://blog.bfccomputing.com/ VCard: http://bfccomputing.com/vcard/bill.vcf From agx at sigxcpu.org Tue Jun 16 22:11:05 2009 From: agx at sigxcpu.org (Guido =?iso-8859-1?Q?G=FCnther?=) Date: Wed, 17 Jun 2009 00:11:05 +0200 Subject: [fedora-virt] [RFC/PATCH] libguestfs: build Debian based appliance Message-ID: <20090616221105.GA1608@bogon.sigxcpu.org> Hi Rich, attached patches allows to build the appliance based on Debian (or any Debian based distribution supported by debirf) by using e.g.: ./configure --with-repo=squeeze --with-mirror=http://apt:9999/debian Please note that the third patch isn't to be applied yet, it simply overwrites the contents of make/update.sh.in with the stuff we need for Debian. Also when building a fixed (#509381) debirf is needed which has just been uploded to unstable. Cheers, -- Guido -------------- next part -------------- A non-text attachment was scrubbed... Name: 0001-check-for-Debian-tools.patch Type: text/x-diff Size: 3542 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: 0002-add-debirf-files.patch Type: text/x-diff Size: 9049 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: 0003-Hack-make.sh.in-and-update.sh.in-to-build-Debian-bas.patch Type: text/x-diff Size: 5880 bytes Desc: not available URL: From ask at develooper.com Tue Jun 16 19:13:01 2009 From: ask at develooper.com (=?ISO-8859-1?Q?Ask_Bj=F8rn_Hansen?=) Date: Tue, 16 Jun 2009 12:13:01 -0700 Subject: [fedora-virt] F12 feature: Host information In-Reply-To: <4A37E28E.4000007@bfccomputing.com> References: <20090616103412.GD21388@amd.home.annexia.org> <971f65790906160640o9b6ae69ie6359ccd15334ace@mail.gmail.com> <20090616160815.GB26761@amd.home.annexia.org> <20090616162008.GO24602@redhat.com> <20090616170338.GA27377@amd.home.annexia.org> <4A37E28E.4000007@bfccomputing.com> Message-ID: On Jun 16, 2009, at 11:21, Bill McGonigle wrote: > It would be straightforward to create an isolated monitoring bridge > with a private address space if one wanted to do SNMP between guests > and hosts. (OK, to be fair, I haven't ever tried this with virtual > interfaces). Setting up "private address space" is a lot more configuration (and things to go wrong) than configuring a port number for a virtual serial port. If you want SNMP, just have the SNMP daemon talk to the serial port and relay the information. - ask From rjones at redhat.com Wed Jun 17 08:59:47 2009 From: rjones at redhat.com (Richard W.M. Jones) Date: Wed, 17 Jun 2009 09:59:47 +0100 Subject: [fedora-virt] Re: [RFC/PATCH] libguestfs: build Debian based appliance In-Reply-To: <20090616221105.GA1608@bogon.sigxcpu.org> References: <20090616221105.GA1608@bogon.sigxcpu.org> Message-ID: <20090617085947.GB18894@amd.home.annexia.org> On Wed, Jun 17, 2009 at 12:11:05AM +0200, Guido G?nther wrote: > Hi Rich, > attached patches allows to build the appliance based on Debian (or any > Debian based distribution supported by debirf) by using e.g.: > > ./configure --with-repo=squeeze --with-mirror=http://apt:9999/debian > > Please note that the third patch isn't to be applied yet, it simply > overwrites the contents of make/update.sh.in with the stuff we need for > Debian. Also when building a fixed (#509381) debirf is needed which has > just been uploded to unstable. > Cheers, > -- Guido > >From c2fbd2f953147c4320a158878955f099af45e409 Mon Sep 17 00:00:00 2001 > From: =?utf-8?q?Guido=20G=C3=BCnther?= > Date: Mon, 15 Jun 2009 20:27:52 +0200 > Subject: [PATCH 1/3] check for Debian tools > > --- > configure.ac | 46 ++++++++++++++++++++++++++++------------------ > 1 files changed, 28 insertions(+), 18 deletions(-) First patch is fine. I will apply it anyway. > >From 1b3c0224bd33c394bf1ae9144ae8c0c8bcff51e7 Mon Sep 17 00:00:00 2001 > From: =?utf-8?q?Guido=20G=C3=BCnther?= > Date: Tue, 16 Jun 2009 23:47:36 +0200 > Subject: [PATCH 2/3] add debirf files > > --- > appliance/debian/debirf.conf.in | 5 ++ > appliance/debian/modules/a0_motd | 1 + > appliance/debian/modules/a0_prep-root | 1 + > appliance/debian/modules/install_kernel | 68 ++++++++++++++++++++++++++ > appliance/debian/modules/network | 1 + > appliance/debian/modules/root-bashrc | 1 + > appliance/debian/modules/serial-terminal | 1 + > appliance/debian/modules/y0_install-guestfsd | 56 +++++++++++++++++++++ > appliance/debian/modules/z0_remove-aptitude | 1 + > appliance/debian/modules/z0_remove-locales | 1 + > appliance/debian/modules/z1_clean-root | 1 + > configure.ac | 2 +- > 12 files changed, 138 insertions(+), 1 deletions(-) > create mode 100644 appliance/debian/debirf.conf.in > create mode 120000 appliance/debian/modules/a0_motd > create mode 120000 appliance/debian/modules/a0_prep-root > create mode 100755 appliance/debian/modules/install_kernel > create mode 120000 appliance/debian/modules/network > create mode 120000 appliance/debian/modules/root-bashrc > create mode 120000 appliance/debian/modules/serial-terminal > create mode 100755 appliance/debian/modules/y0_install-guestfsd > create mode 120000 appliance/debian/modules/z0_remove-aptitude > create mode 120000 appliance/debian/modules/z0_remove-locales > create mode 120000 appliance/debian/modules/z1_clean-root This patch duplicates things unnecessarily, I think. List of kernel modules (commented out), which are now in a separate file called kmod.whitelist{,in}: > +#(cd "$DEBIRF_ROOT" && find lib/modules/*/kernel \ > +# -name '*.ko' \ > +# -a ! -name 'virtio.ko' \ > +# -a ! -name 'virtio_net.ko' \ > +# -a ! -name 'virtio_pci.ko' \ > +# -a ! -name 'virtio_ring.ko' \ > +# -a ! -name 'ext2.ko' \ > +# -a ! -name 'ext4.ko' \ > +# -a ! -name 'crc16.ko' \ > +# -a ! -name 'jbd2.ko' \ > +# -a ! -name 'fuse.ko' \ > +# -a ! -name 'vfat.ko' \ > +# -a ! -name 'fat.ko' \ > +# -a ! -name 'udf.ko' \ > +# -a ! -name 'crc_itu_t.ko' \ > +# -a ! -name 'nls_utf8.ko' \ > +# -a ! -name 'dm-*.ko' \ > +# -a -exec rm "{}" \; ) > + > +rm -rf "$DEBIRF_ROOT"/usr/share/doc > +rm -rf "$DEBIRF_ROOT"/usr/share/zoneinfo List of packages. Although package names are slightly different between Fedora and Debian, I think we should aim to unify this list as far as possible. How about adding a file similar to the kernel module whitelist which lists packages, albeit with either wildcards or #if DEBIAN ... #endif markup? > +debirf_exec aptitude -R -y install libaugeas0 lvm2 binutils dosfstools grub iproute module-init-tools ntfs-3g strace util-linux zerofree bsdmainutils > +debirf_exec aptitude -y remove vim-tiny dhcp3-client The /init script should also be moved out to a separate file. I don't want to have to maintain it twice, and it should be the same or very similar for both appliances: > +rm -f "$DEBIRF_ROOT"/sbin/init > +cat > "$DEBIRF_ROOT"/sbin/init <<__EOF__ > +#!/bin/sh > +export PATH=/sbin:/usr/sbin:$PATH > +cd /dev > +MAKEDEV hda hdb hdc hdd sda sdb sdc sdd sd > +cd / > +mount -t proc /proc /proc > +mount -t sysfs /sys /sys > +mount -t devpts -o gid=5,mode=620 /dev/pts /dev/pts > +modprobe virtio_pci > +modprobe virtio_net > +modprobe dm_mod ||: > +/sbin/ifconfig lo 127.0.0.1 > +/sbin/ifconfig eth0 10.0.2.10 > +/sbin/route add default gw 10.0.2.2 > +lvm vgscan --ignorelockingfailure > +lvm vgchange -ay --ignorelockingfailure > +exec guestfsd -f > +__EOF__ Rich. -- Richard Jones, Emerging Technologies, Red Hat http://et.redhat.com/~rjones virt-df lists disk usage of guests without needing to install any software inside the virtual machine. Supports Linux and Windows. http://et.redhat.com/~rjones/virt-df/ From rjones at redhat.com Wed Jun 17 09:12:48 2009 From: rjones at redhat.com (Richard W.M. Jones) Date: Wed, 17 Jun 2009 10:12:48 +0100 Subject: [fedora-virt] F12 feature: Host information In-Reply-To: <4A37E28E.4000007@bfccomputing.com> References: <20090616103412.GD21388@amd.home.annexia.org> <971f65790906160640o9b6ae69ie6359ccd15334ace@mail.gmail.com> <20090616160815.GB26761@amd.home.annexia.org> <20090616162008.GO24602@redhat.com> <20090616170338.GA27377@amd.home.annexia.org> <4A37E28E.4000007@bfccomputing.com> Message-ID: <20090617091248.GE21388@amd.home.annexia.org> On Tue, Jun 16, 2009 at 02:21:02PM -0400, Bill McGonigle wrote: > On 06/16/2009 01:03 PM, Richard W.M. Jones wrote: > >> It isn't that there is no network, it's that the guest and the host >> networks are strictly separated from each other, often physically. > > Could you clarify that - you mean like PCI network card assignment? > Because the guest can't be safe from its host, from a security stance, > unless SELinux does more than I realize. > > It would be straightforward to create an isolated monitoring bridge with > a private address space if one wanted to do SNMP between guests and > hosts. (OK, to be fair, I haven't ever tried this with virtual > interfaces). There's all sorts of issues with this: Should it be firewalled (on either the host or guest side)? Will other daemons on the host accidentally bind to ports on this interface, and how do we stop that? How does it appear in the guest? As an extra network interface? What "private address space" should we give it? The guest could and likely is using RFC1918 addresses for its own purposes. This is the motivation for wanting 'vmchannel' - a simple, network- independent guest to host communication channel. However we don't have vmchannel now, and are no nearer to having it, so we use serial ports instead. I'd also dispute the statement that "it would be straightforward to create an isolated monitoring bridge with a private address space if one wanted to do SNMP between guests and hosts." There's nothing at all straightforward about setting up interfaces, bridges or SNMP. Compared to setting up an extra serial port which involves precisely adding a clause to the libvirt configuration. Rich. -- Richard Jones, Emerging Technologies, Red Hat http://et.redhat.com/~rjones Read my programming blog: http://rwmj.wordpress.com Fedora now supports 75 OCaml packages (the OPEN alternative to F#) http://cocan.org/getting_started_with_ocaml_on_red_hat_and_fedora From rjones at redhat.com Wed Jun 17 21:38:02 2009 From: rjones at redhat.com (Richard W.M. Jones) Date: Wed, 17 Jun 2009 22:38:02 +0100 Subject: [fedora-virt] Re: febootstrap question In-Reply-To: <63aeb0300906171425l3da1156aydc9b7a649e4ce00d@mail.gmail.com> References: <63aeb0300906171425l3da1156aydc9b7a649e4ce00d@mail.gmail.com> Message-ID: <20090617213802.GA3309@amd.home.annexia.org> [CC'd to fedora-virt] On Wed, Jun 17, 2009 at 05:25:26PM -0400, Christopher Johnston wrote: > I had a question about febootstrap and a specific > use case of mine at my company where I am implementing a stateless solution > for our grid. I wanted to be able to take the initramfs image that is spun > up out of febootstrap and put a custom linuxrc in there which will > essentially take the contents of the initramfs and copy them directly into a > tmpfs filesystem thats mounted as /sysroot then do a pivot_root into it and > then do a full execution of init. I'm a bit confused why you'd want to do this, but maybe I'm missing something. Why copy the initramfs image into a tmpfs? The initramfs is already loaded into kernel memory at boot time and so it has all the same properties / benefits of tmpfs. > I have been using nash currently to do > this and I have ran into a few issue when the system boots up once init > forks off where it segfaults. Below is my custom linuxrc: I would tend to avoid using nash. If it's possible to add bash to the image, just use bash. You might find it helpful to look at what we do in libguestfs, here: http://git.et.redhat.com/?p=libguestfs.git;a=blob;f=appliance/make.sh.in;hb=HEAD > #!/sbin/nash > > mount -t proc /proc /proc > echo Mounting proc filesystem > echo Mounting sysfs filesystem > mount -t sysfs /sys /sys > echo Creating /dev > mount -o mode=0755 -t tmpfs /dev /dev > mkdir /dev/pts > mount -t devpts -o gid=5,mode=620 /dev/pts /dev/pts > mkdir /dev/shm > mkdir /dev/mapper > echo Creating initial device nodes > mknod /dev/null c 1 3 > mknod /dev/zero c 1 5 > mknod /dev/systty c 4 0 > mknod /dev/tty c 5 0 > mknod /dev/console c 5 1 > mknod /dev/ptmx c 5 2 > mknod /dev/fb c 29 0 > mknod /dev/tty0 c 4 0 > mknod /dev/tty1 c 4 1 > mknod /dev/tty12 c 4 12 > mknod /dev/ttyS0 c 4 64 > mknod /dev/ttyS1 c 4 65 > mknod /dev/ttyS2 c 4 66 > mknod /dev/ttyS3 c 4 67 > /lib/udev/console_init tty0 > mkchardevs > mkblkdevs > echo Creating tmpfs filesystem > mkdir -p /sysroot > mkrootdev -t tmpfs -o defaults,ro /dev/root > mount -o mode=0755 -t tmpfs /dev/root /sysroot > mkdir -p /sysroot/proc > mkdir -p /sysroot/sys > mkdir -p /sysroot/.oldroot > echo Copying rootfs->tmpfs > cp -a bin /sysroot > cp -a dev /sysroot > cp -a etc /sysroot > cp -a home /sysroot > cp -a lib /sysroot > cp -a lib64 /sysroot > cp -a mnt /sysroot > cp -a sbin /sysroot > cp -a tmp /sysroot > cp -a usr /sysroot > cp -a var /sysroot > cp -a root /sysroot > echo Setting up the new root tmpfs filesystem > setuproot > echo Switching from rootfs to tmpfs > switchroot > > -Chris Rich. -- Richard Jones, Emerging Technologies, Red Hat http://et.redhat.com/~rjones virt-df lists disk usage of guests without needing to install any software inside the virtual machine. Supports Linux and Windows. http://et.redhat.com/~rjones/virt-df/ From gmaddock at futuremetals.com Thu Jun 18 14:38:39 2009 From: gmaddock at futuremetals.com (Gerry Maddock) Date: Thu, 18 Jun 2009 10:38:39 -0400 Subject: [fedora-virt] Fedora-virt Message-ID: Hey all, just wanted to send a big THANKS to all developers involved in RH/FC virtulization. I have been using it since F10 and have 3 production W2k3 servers running rock solid on it (qemu-kvm) and I'm about to add 1 more W2k3 and 2 F11 virt servers. Keep up the good work! From rjones at redhat.com Thu Jun 18 21:42:06 2009 From: rjones at redhat.com (Richard W.M. Jones) Date: Thu, 18 Jun 2009 22:42:06 +0100 Subject: [fedora-virt] Fedora-virt In-Reply-To: References: Message-ID: <20090618214206.GA10102@amd.home.annexia.org> On Thu, Jun 18, 2009 at 10:38:39AM -0400, Gerry Maddock wrote: > > Hey all, just wanted to send a big THANKS to all developers involved in > RH/FC virtulization. I have been using it since F10 and have 3 production > W2k3 servers running rock solid on it (qemu-kvm) and I'm about to add 1 > more W2k3 and 2 F11 virt servers. Keep up the good work! Are you using any PV drivers on the Windows servers? Like the virtio net driver. Rich. -- Richard Jones, Emerging Technologies, Red Hat http://et.redhat.com/~rjones libguestfs lets you edit virtual machines. Supports shell scripting, bindings from many languages. http://et.redhat.com/~rjones/libguestfs/ See what it can do: http://et.redhat.com/~rjones/libguestfs/recipes.html From gmaddock at futuremetals.com Fri Jun 19 14:29:58 2009 From: gmaddock at futuremetals.com (Gerry Maddock) Date: Fri, 19 Jun 2009 10:29:58 -0400 Subject: [fedora-virt] Fedora-virt In-Reply-To: <20090618214206.GA10102@amd.home.annexia.org> References: <20090618214206.GA10102@amd.home.annexia.org> Message-ID: > Are you using any PV drivers on the Windows servers? Like the > virtio net driver. Actually no. On the linux side I setup eth1 as a bridge, set the virt servers to use that bridge. On the 2k3 side, I have been using the default driver windows sets for the NIC it finds: Realtek RTL8139 Family PCI Fastethernet NIC driver and have had no problems. These 2k3 servers are active AD controllers. From rjones at redhat.com Fri Jun 19 22:57:23 2009 From: rjones at redhat.com (Richard W.M. Jones) Date: Fri, 19 Jun 2009 23:57:23 +0100 Subject: [fedora-virt] Re: febootstrap question In-Reply-To: <63aeb0300906191444r353d2242x6bf3385e728f177c@mail.gmail.com> References: <63aeb0300906171425l3da1156aydc9b7a649e4ce00d@mail.gmail.com> <20090617213802.GA3309@amd.home.annexia.org> <63aeb0300906191444r353d2242x6bf3385e728f177c@mail.gmail.com> Message-ID: <20090619225723.GB15252@amd.home.annexia.org> On Fri, Jun 19, 2009 at 05:44:52PM -0400, Christopher Johnston wrote: > Now to get this going for my testing I am comfortable using rootfs > (pivotroot and switchroot dont seem to work in nash). I'm a bit surprised about that, because obviously switchroot is used all the time in mkinitrd-built initrds, eg. look at the following lines in mkinitrd: emit "echo Switching to new root and running init." emit "switchroot" emit "echo Booting has failed." emit "sleep -1" When you say dont seem to work, is there any diagnostic? > What I have done in my testing here is generate a linuxrc which I posted. I > attmpted to use bash instead of nash and have it just fork /sbin/init but > that also did not work (upstarts init does not seem to work well here). > > I looked over the script you are using here for your virtual machine, but > what are you actually doing to start init so the usual RC stuff can start > running? Well in the init script we use, we _don't_ run any rc stuff. It's just for a small appliance, so we set up what we need (ifconfig lo and eth0), modprobe a few modules, and then run our daemon directly. Having said that, it should easily be possible to use febootstrap to run the ordinary scripts, but the problem probably isn't febootstrap, but some bug/difference/sensitivity in /init, nash, permissions etc. Is the upstart %post script failing? febootstrap runs all %post scripts under fakeroot+fakechroot, and they can sometimes behave differently. Are you booting these on real hardware? I suggest testing it under qemu - it's much more controllable, and allows you to test things faster. Rich. -- Richard Jones, Emerging Technologies, Red Hat http://et.redhat.com/~rjones Read my programming blog: http://rwmj.wordpress.com Fedora now supports 75 OCaml packages (the OPEN alternative to F#) http://cocan.org/getting_started_with_ocaml_on_red_hat_and_fedora From cjohnstonwork at gmail.com Fri Jun 19 21:44:52 2009 From: cjohnstonwork at gmail.com (Christopher Johnston) Date: Fri, 19 Jun 2009 17:44:52 -0400 Subject: [fedora-virt] Re: febootstrap question In-Reply-To: <20090617213802.GA3309@amd.home.annexia.org> References: <63aeb0300906171425l3da1156aydc9b7a649e4ce00d@mail.gmail.com> <20090617213802.GA3309@amd.home.annexia.org> Message-ID: <63aeb0300906191444r353d2242x6bf3385e728f177c@mail.gmail.com> On Wed, Jun 17, 2009 at 5:38 PM, Richard W.M. Jones wrote: > [CC'd to fedora-virt] > > On Wed, Jun 17, 2009 at 05:25:26PM -0400, Christopher Johnston wrote: > > I had a question about febootstrap and a specific > > use case of mine at my company where I am implementing a stateless > solution > > for our grid. I wanted to be able to take the initramfs image that is > spun > > up out of febootstrap and put a custom linuxrc in there which will > > essentially take the contents of the initramfs and copy them directly > into a > > tmpfs filesystem thats mounted as /sysroot then do a pivot_root into it > and > > then do a full execution of init. > > I'm a bit confused why you'd want to do this, but maybe I'm missing > something. Why copy the initramfs image into a tmpfs? The initramfs > is already loaded into kernel memory at boot time and so it has all > the same properties / benefits of tmpfs. > > > I have been using nash currently to do > > this and I have ran into a few issue when the system boots up once init > > forks off where it segfaults. Below is my custom linuxrc: > > I would tend to avoid using nash. If it's possible to add bash to the > image, just use bash. > > You might find it helpful to look at what we do in libguestfs, here: > > > http://git.et.redhat.com/?p=libguestfs.git;a=blob;f=appliance/make.sh.in;hb=HEAD > > > #!/sbin/nash > > > > mount -t proc /proc /proc > > echo Mounting proc filesystem > > echo Mounting sysfs filesystem > > mount -t sysfs /sys /sys > > echo Creating /dev > > mount -o mode=0755 -t tmpfs /dev /dev > > mkdir /dev/pts > > mount -t devpts -o gid=5,mode=620 /dev/pts /dev/pts > > mkdir /dev/shm > > mkdir /dev/mapper > > echo Creating initial device nodes > > mknod /dev/null c 1 3 > > mknod /dev/zero c 1 5 > > mknod /dev/systty c 4 0 > > mknod /dev/tty c 5 0 > > mknod /dev/console c 5 1 > > mknod /dev/ptmx c 5 2 > > mknod /dev/fb c 29 0 > > mknod /dev/tty0 c 4 0 > > mknod /dev/tty1 c 4 1 > > mknod /dev/tty12 c 4 12 > > mknod /dev/ttyS0 c 4 64 > > mknod /dev/ttyS1 c 4 65 > > mknod /dev/ttyS2 c 4 66 > > mknod /dev/ttyS3 c 4 67 > > /lib/udev/console_init tty0 > > mkchardevs > > mkblkdevs > > echo Creating tmpfs filesystem > > mkdir -p /sysroot > > mkrootdev -t tmpfs -o defaults,ro /dev/root > > mount -o mode=0755 -t tmpfs /dev/root /sysroot > > mkdir -p /sysroot/proc > > mkdir -p /sysroot/sys > > mkdir -p /sysroot/.oldroot > > echo Copying rootfs->tmpfs > > cp -a bin /sysroot > > cp -a dev /sysroot > > cp -a etc /sysroot > > cp -a home /sysroot > > cp -a lib /sysroot > > cp -a lib64 /sysroot > > cp -a mnt /sysroot > > cp -a sbin /sysroot > > cp -a tmp /sysroot > > cp -a usr /sysroot > > cp -a var /sysroot > > cp -a root /sysroot > > echo Setting up the new root tmpfs filesystem > > setuproot > > echo Switching from rootfs to tmpfs > > switchroot > > > > -Chris > > Rich. > > -- > Richard Jones, Emerging Technologies, Red Hat > http://et.redhat.com/~rjones > virt-df lists disk usage of > guests without needing to install any > software inside the virtual machine. Supports Linux and Windows. > http://et.redhat.com/~rjones/virt-df/ Rich, The properties may be the same, but AFAIK you cannot limit the size of rootfs so it will use all of memory. With tmpfs you can specifiy how large the filesystem will be to keep the root filesystem at a fixed size. There are also some new features/options where you can specifc which numa node to use memory from or to interleave across. There are some benefits to that for our grid/hpc workloads. Now to get this going for my testing I am comfortable using rootfs (pivotroot and switchroot dont seem to work in nash). What I have done in my testing here is generate a linuxrc which I posted. I attmpted to use bash instead of nash and have it just fork /sbin/init but that also did not work (upstarts init does not seem to work well here). I looked over the script you are using here for your virtual machine, but what are you actually doing to start init so the usual RC stuff can start running? -Chris -------------- next part -------------- An HTML attachment was scrubbed... URL: From loganjerry at gmail.com Mon Jun 22 16:14:34 2009 From: loganjerry at gmail.com (Jerry James) Date: Mon, 22 Jun 2009 10:14:34 -0600 Subject: [fedora-virt] F-11 experience installing a CentOS guest Message-ID: <870180fe0906220914v407a613em5737f19906f804dc@mail.gmail.com> I just upgraded to F-11 and have been trying out the new virt-manager. I have had a few "Huh?" moments that I'd like to share in case they help anyone else out. The release notes say that F-11 guests now get higher screen resolutions and absolute mouse coordinates via a USB tablet, out of the box. I need to make a CentOS 5.3 guest, and decided to see if I could get those same benefits. I knew the higher screen resolution was possible, because I have been running a CentOS 5.3 guest in F-10 using explicit invocation of qemu-kvm with the -std-vga switch. I hoped that the absolute mouse coordinates would also be possible, as the lack of them was probably the most annoying part of using that guest machine in F-10. My first attempt was to lie to virt-manager about what kind of guest I was installing. I told it that I was installing an F-11 guest, in hopes that things would Just Work. They didn't. Still, I was able to mostly patch things together as described below. When I created the virtual machine, I took a look at the hardware list. Even though I had specified an F-11 guest, there was no USB tablet on the hardware list. I thought I was supposed to get that automatically, just by specifying the F-11 guest. No matter; I added it manually. Now I don't need the PS/2 mouse, so let's get rid of it. I can't. The "Remove" button is grayed out. What's up with that? So I installed CentOS 5.3 in the guest. For the record, if you have SELinux on in your host machine, the CD images have to have type virt_content_t. Something (virt-manager?) apparently set the type correctly for me for CD #1, but I got an AVC denial and no CD visible to the guest when I tried to change to CD #2. So I changed all the CD image types to virt_content_t by hand and everything went okay after that. Installation finished. I rebooted the machine and got an 800x600 resolution screen. Darn. I looked through Xorg.0.log and found that virt-manager gave me the Cirrus video card. I thought specifying an F-11 guest was supposed to give me a generic VESA card. By adding a Monitor section to my xorg.conf and playing with HorizSync and VertRefresh, I can manage to get a 1280x800 window, but I really want 1280x1024. It doesn't appear to be possible to achieve that, though, as the emulated Cirrus card is reporting a dot clock that can't manage that resolution. How do I get virt-manager to give me the VESA card? It doesn't appear to be possible to get that through the interface it provides. Why not? The absolute mouse coordinates did NOT work when I first installed the machine. Once I added the Monitor section, they started working. I don't know why, though, as Xorg.0.log says that it is using the ExplorerPS/2 protocol, which suggests that X is using the PS/2 mouse that virt-manager won't let me remove instead of the USB tablet that I added manually. Thanks for all the work that has gone into improving the F-11 virtualization technology. -- Jerry James http://www.jamezone.org/ From rjones at redhat.com Mon Jun 22 18:30:36 2009 From: rjones at redhat.com (Richard W.M. Jones) Date: Mon, 22 Jun 2009 19:30:36 +0100 Subject: [fedora-virt] F-11 experience installing a CentOS guest In-Reply-To: <870180fe0906220914v407a613em5737f19906f804dc@mail.gmail.com> References: <870180fe0906220914v407a613em5737f19906f804dc@mail.gmail.com> Message-ID: <20090622183036.GA6181@amd.home.annexia.org> FWIW I installed a CentOS 5.3 guest on Fedora 11 host using virt-install (not virt-manager) and this is how the command line turned out: /usr/bin/qemu-kvm -S -M pc -m 512 -smp 1 -name CentOS5x32 -uuid 2ce397d9-1931-feb1-8ad8-15f22c4f18af -monitor pty -pidfile /var/run/libvirt/qemu//CentOS5x32.pid -boot c -drive file=/dev/vg_trick/CentOS5x32,if=ide,index=0,boot=on -net nic,macaddr=54:52:00:3c:76:11,vlan=0 -net tap,fd=18,script=,vlan=0,ifname=vnet1 -serial pty -parallel none -usb -vnc 127.0.0.1:1 I haven't really tweaked it, because I only use it over ssh. Rich. -- Richard Jones, Emerging Technologies, Red Hat http://et.redhat.com/~rjones libguestfs lets you edit virtual machines. Supports shell scripting, bindings from many languages. http://et.redhat.com/~rjones/libguestfs/ See what it can do: http://et.redhat.com/~rjones/libguestfs/recipes.html From berrange at redhat.com Mon Jun 22 18:38:22 2009 From: berrange at redhat.com (Daniel P. Berrange) Date: Mon, 22 Jun 2009 19:38:22 +0100 Subject: [fedora-virt] F-11 experience installing a CentOS guest In-Reply-To: <870180fe0906220914v407a613em5737f19906f804dc@mail.gmail.com> References: <870180fe0906220914v407a613em5737f19906f804dc@mail.gmail.com> Message-ID: <20090622183822.GA6880@redhat.com> On Mon, Jun 22, 2009 at 10:14:34AM -0600, Jerry James wrote: > When I created the virtual machine, I took a look at the hardware > list. Even though I had specified an F-11 guest, there was no USB > tablet on the hardware list. I thought I was supposed to get that > automatically, just by specifying the F-11 guest. No matter; I added > it manually. Now I don't need the PS/2 mouse, so let's get rid of it. > I can't. The "Remove" button is grayed out. What's up with that? The PS/2 mouse is always present in the underlying emulator, whenever you have graphics enabled. Fear not, because if the USB tablet is present & activated by the guest OS, PS/2 mouse will cease to generate any events. So (functionally) it doesn't matter that its still there > So I installed CentOS 5.3 in the guest. For the record, if you have > SELinux on in your host machine, the CD images have to have type > virt_content_t. Something (virt-manager?) apparently set the type > correctly for me for CD #1, but I got an AVC denial and no CD visible > to the guest when I tried to change to CD #2. So I changed all the CD > image types to virt_content_t by hand and everything went okay after > that. libvirt automatically relabels all CD images to virt_content_t since that is what SELinux wants. It should also be doing this when hotplugging but its possible we missed a codepath - should file a BZ for this problem > Installation finished. I rebooted the machine and got an 800x600 > resolution screen. Darn. I looked through Xorg.0.log and found that > virt-manager gave me the Cirrus video card. I thought specifying an > F-11 guest was supposed to give me a generic VESA card. By adding a > Monitor section to my xorg.conf and playing with HorizSync and > VertRefresh, I can manage to get a 1280x800 window, but I really want > 1280x1024. It doesn't appear to be possible to achieve that, though, > as the emulated Cirrus card is reporting a dot clock that can't manage > that resolution. How do I get virt-manager to give me the VESA card? > It doesn't appear to be possible to get that through the interface it > provides. Why not? We don't support the generic VESA card in libvirt at this time. What the F11 feature was doing was actually using the Cirrus card. All it in fact did was tweak the xorg cirrus driver such that if it saw it had a QEMU emulated Cirrus card instead of a normal one, it would run at 1024x768 instead of 800x600. We'll further improve on this for F12, including support for the various video card models. > The absolute mouse coordinates did NOT work when I first installed the > machine. Once I added the Monitor section, they started working. I > don't know why, though, as Xorg.0.log says that it is using the > ExplorerPS/2 protocol, which suggests that X is using the PS/2 mouse > that virt-manager won't let me remove instead of the USB tablet that I > added manually. RHEL5 has absolutely no clue how to correctly configure a USB tablet. You explicitly do *not* want to use the 'mouse' driver in Xorg. It must be using the 'evdev' driver, and must be running in 'absolute' coordinate mode. Anything else will result in pain & suffering. For F11 guests this is all automatically done by blackmagic. RHEL-5 is too old for any of this automatic stuff to work. If you have a USB tablet and it is not configured correctly, the results will in fact be *worse* than a PS/2 mouse. The latest virt-viewer/gkt-vnc client knows how to correctly deal with PS/2 mice, although it does need to grab the mouse pointer todo so. Daniel -- |: Red Hat, Engineering, London -o- http://people.redhat.com/berrange/ :| |: http://libvirt.org -o- http://virt-manager.org -o- http://ovirt.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :| From mbooth at redhat.com Tue Jun 23 16:43:03 2009 From: mbooth at redhat.com (Matthew Booth) Date: Tue, 23 Jun 2009 17:43:03 +0100 Subject: [fedora-virt] Fix supermin when kernel arch != arch (x86) Message-ID: <4A410617.70109@redhat.com> I have a non-PAE kernel installed (arch=i586) on a machine which reports arch=i686. This breaks the supermin helper. The attached patch makes it look for any x86 kernel. Matt -- Matthew Booth, RHCA, RHCSS Red Hat, Global Professional Services M: +44 (0)7977 267231 GPG ID: D33C3490 GPG FPR: 3733 612D 2D05 5458 8A8A 1600 3441 EA19 D33C 3490 -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: 0001-Make-the-supermin-helper-look-for-any-x86-kernel.patch URL: From rjones at redhat.com Tue Jun 23 16:45:43 2009 From: rjones at redhat.com (Richard W.M. Jones) Date: Tue, 23 Jun 2009 17:45:43 +0100 Subject: [fedora-virt] Fix supermin when kernel arch != arch (x86) In-Reply-To: <4A410617.70109@redhat.com> References: <4A410617.70109@redhat.com> Message-ID: <20090623164543.GA14260@amd.home.annexia.org> On Tue, Jun 23, 2009 at 05:43:03PM +0100, Matthew Booth wrote: > I have a non-PAE kernel installed (arch=i586) on a machine which reports > arch=i686. This breaks the supermin helper. The attached patch makes it > look for any x86 kernel. +1 Rich. -- Richard Jones, Emerging Technologies, Red Hat http://et.redhat.com/~rjones virt-p2v converts physical machines to virtual machines. Boot with a live CD or over the network (PXE) and turn machines into Xen guests. http://et.redhat.com/~rjones/virt-p2v From markmc at redhat.com Tue Jun 23 16:50:12 2009 From: markmc at redhat.com (Mark McLoughlin) Date: Tue, 23 Jun 2009 16:50:12 +0000 Subject: [fedora-virt] default tftp root dir in virt-manager or qemu? In-Reply-To: <561c252c0906151028o7f28100fp1f149128b0b1e38f@mail.gmail.com> References: <561c252c0906151028o7f28100fp1f149128b0b1e38f@mail.gmail.com> Message-ID: <1245775812.20511.28.camel@blaa> Hey, On Mon, 2009-06-15 at 19:28 +0200, Gianluca Cecchi wrote: > 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 virbro default interface). > No configuration done by me. > 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.... Yeah, what we really need here is to have support for setting up TFTP for libvirt's virtual networks - e.g. which would cause dnsmasq to be run with: --enable-tftp --tftp-root=/var/lib/libvirt/tftp \ --dhcp-boot=pxelinux.0 we'd also need to open port 69 in our iptables rules. Please file an RFE for this in bugzilla.redhat.com/Virtualization ... maybe even give a shot at cooking up a patch? Cheers, Mark. From markmc at redhat.com Tue Jun 23 17:49:21 2009 From: markmc at redhat.com (Mark McLoughlin) Date: Tue, 23 Jun 2009 18:49:21 +0100 Subject: [fedora-virt] Fedora virt status Message-ID: <1245779361.20511.31.camel@blaa> F-12 Schedule ============= Phew, Fedora 11 has just been released and Fedora 12 is already coming at us hard: http://fedoraproject.org/wiki/Releases/12/Schedule 2009-07-28 Feature Freeze (36 days) 2009-09-22 Beta (Final Development) Free (92 days) 2009-10-20 Final Release Compose (120 days) F-12 Features ============= We've prepared a good bunch of feature pages so far for F-12: http://fedoraproject.org/wiki/Category:F12_Virt_Features In the kernel related space we have: - SR-IOV - KSM - Huge pages For QEMU, we have: - Stable PCI Addresses - Stable Guest ABI - KVM NIC hotplug - VNC resource tunnel In the libvirt space we have: - VirtPrivileges - VirtAuthorization - Host network interface APIs - Storage management APIs - TCK General virt tools related features include: - Hostinfo - VirtAppliances Also, of note is the feature describing NetworkManager's forthcoming support for bridged networking: http://fedoraproject.org/wiki/Features/NetworkManagerBridging Please do jump in and give help or feedback where you can! F-12 Release Engineering ======================== Some of the Fedora release engineering folks held a Fedora Activity Day (FAD) at Red Hat's offices in Raleigh recently: http://fedoraproject.org/wiki/Fedora_Activity_Day_Fedora_Development_Cycle_2009 They came away from the meeting with a bunch of proposals intended to improve the Fedora development process: http://fedoraproject.org/wiki/Milestone_Adjustment_Proposal What was called the Preview release is now called Beta, what was Beta is now called Alpha and what was called Alpha is no more. http://fedoraproject.org/wiki/Israwhidebroken.com_Proposal The goal is to have a place where people can go to find the "last known good" rawhide tree. http://fedoraproject.org/wiki/Koji_Build_Autosign_Proposal All packages coming from Koji will be signed - i.e. rawhide packages will be signed. http://fedoraproject.org/wiki/Critical_Path_Packages_Proposal A core set of packages will receive special attention when they are being updated to try and reduce the chance of major regressions. http://fedoraproject.org/wiki/No_Frozen_Rawhide_Proposal Rawhide will no longer freeze when we hit the Beta Freeze, instead rawhide will continue to be published from the devel/ CVS branch and there will be new install trees immediately available for the new CVS branch (e.g. the F-12/ branch). Fedora Community Portal ======================= A new web interface for Fedora community members is no available: https://admin.fedoraproject.org/community/ Fedora Community provides a window into the Fedora distribution, leveraging the power of Fedora's Account System, Bodhi, Bugzilla, Koji, and PackageDB into a single user-friendly website. ... Fedora Community is designed to simplify Fedora workflows and bring transparency to Fedora processes. qemu-0.11 ========= Anthony Liguori posted his plans for QEMU's 0.11 release: http://lists.gnu.org/archive/html/qemu-devel/2009-06/msg01575.html 0.10.0 was released on March 2nd so following with the 6 month release cycle, that would put 0.11.0 at September 2nd. Based on the experiences with the stable releases, here's what I'd recommend: o On July 15th, fork master -> stable-0.11 o Change version to 0.10.90 o Release qemu-0.11.0-rc1 o Release additional -rcN releases every 1-2 weeks o Introduce a new maintainer for stable-0.10 (via git pulls) o At least 1 week before release, hopefully we'll have the final -rcN that we can then declare 0.11.0. Avi confirmed that he plans to mirror these releases with matching qemu-kvm releases. For Fedora 12, we already have a 0.11 snapshot (0.10.50-6.kvm86.fc12) and as new snapshots become available we will pull them in. This means we should have a feature frozen qemu in time for the F-12 feature freeze and a final 0.11 release in time for the final F-12 freeze. libguestfs ========== Rich Jones continues rocking with his libguestfs working, with a whole load of interesting stuff on the fedora-virt list and his blog. Rich always does his best to assure us that he really is crazy, but his libguestfs "supermin appliance" work takes the biscuit: http://www.redhat.com/archives/fedora-virt/2009-June/msg00118.html The supermin appliance removes the kernel and all the executable libraries and programs from the appliance. That just leaves a skeleton of config files and some data files, which is obviously massively smaller than the normal appliance. At runtime we rebuild the appliance on-the-fly from the libraries and programs on the host (eg. pulling in the real /lib/libc.so, the real /bin/bash etc.) The new appliance is a mere 500K, so libguestfs RPMs will be a lot smaller. libosinfo ========= Cole Robinson posted an RFC detailing his plans to create a libosinfo library replacing python-virtinst's OS_TYPES dictionary which contains valuable information on the preferred configuration for different guest OSes: http://www.redhat.com/archives/fedora-virt/2009-June/msg00100.html I've done the initial work for a new library, libosinfo (better name recommendations appreciated). This library will provide OS meta data for use in virt applications, replacing the dictionary we currently keep in virtinst. FWN === Another couple of Fedora Weekly News virt roundups from Dale Bewley: http://fedoraproject.org/wiki/FWN/Issue179#Virtualization http://fedoraproject.org/wiki/FWN/Issue180#Virtualization Xen === Gerd is planning on pushing a xen-3.4.0 update to F-11: http://www.redhat.com/archives/fedora-virt/2009-June/msg00032.html Not yet. I wanna give it a bit more testing in rawhide. Also it looks like xensource wants to release 3.4.1 quickly to fix a bunch of important bugs. I think it is a good idea to wait until that one is out, then update F11 straight to xen-3.4.1. Also xen 3.4 bumps the shared library major for some libraries from 3.2 to 3.4, so I'll have to figure what breaks due to that and coordinate the update. I know xenner is affected. Libvirts seems to do fine as it needs libxenstore only which is still at 3.0. Didn't investigate yet what else might need a rebuild. Also, Michael Young continues to push new Dom0 kernel builds: http://www.redhat.com/archives/fedora-virt/2009-June/msg00097.html Unfortunately, Dom0 seems to have missed the 2.6.31 boat, so Dom0 support in Fedora 12 looks highly unlikely. Bugs ==== = New Bugs = == kvm == https://bugzilla.redhat.com/504376 F-11 guest takes 45 minutes in mke2fs for 8gb fs on virtio disk with a sparse backing file A report of mke2fs taking forever during an anaconda install of an F-11 guest when using a virtio disk with a sparse backed file. Apparently, SLES-11 doesn't appear to suffer from the problem. https://bugzilla.redhat.com/505695 Poor KVM guest performance doing kernel builds (100+% overhead, w/ 8vcpu and virtio) Another report from Erik highlighting performance problems with KVM and disk I/O. https://bugzilla.redhat.com/507500 "MAX_LOCK_DEPTH too low!" warning during kvm guest startup https://bugzilla.redhat.com/507535 GPF in nf_conntrack_alloc() with KVM guests (2.6.31) An oops in core networking code as a result of routing packets back and forth between two guests. == qemu == https://bugzilla.redhat.com/506170 removing virtualization packages leaves qemu-system-x86 'yum groupinstall Virtualization' installs qemu-system-x86 via the qemu-kvm meta-package, but 'yum groupremove Virtualization' only removes qemu-kvm. Looks like expected behaviour for yum. https://bugzilla.redhat.com/507626 qemu-kvm VNC :: major display tearing garbage with windows guest and scrolling windows This looks like a similar issue to xterm getting garbled in a Fedora guest (bug #503156) https://bugzilla.redhat.com/506585 qemu-nbd dies with 'nbd.c:nbd_receive_request():L465: read failed' Looks like qemu-nbd dies when a client closes its end. https://bugzilla.redhat.com/505109 qemu ppc/ppc64 boot says "Boot failure! No secondary bootloader specified" Yet another bug with the ppc target. This time only in rawhide. == libvirt == https://bugzilla.redhat.com/507271 libvirt always places IDE disks before virtio/scsi disks If you attach an IDE disk to a guest booting from a virtio disk, libvirt ends up sorting the disks such that the guest will try and boot from the IDE disk. https://bugzilla.redhat.com/468384 RFE: use virt-manager to create network bridges A bugzilla basically requesting the 'Shared Network Interface' F-12 feature. https://bugzilla.redhat.com/505625 libvirtd segfault during virsh dominfo on security model 'virsh dominfo' was causing libvirtd to segfault because the selinux was blown away by virGetCapabilities(). Fixed upstream, needs to be pulled into F-11. https://bugzilla.redhat.com/506590 libvirt should ignore NUMA cells with missing topology It turns out some NUMA cells can be missing topology information, and libvirt should ignore these. Dan has come up with a patch which works well for the reporter. https://bugzilla.redhat.com/507405 virsh: renaming of guests creates a copy https://bugzilla.redhat.com/507555 libvirt starting a guest with ISO on NFS mount fails when unnecessarily setting SELinux file context Tim Waugh supplied a patch for this one. == svirt == https://bugzilla.redhat.com/506250 svirt prevents symlinks to be used in disk image paths If any part of a disk image path is a symlink, svirt denies qemu access to it. This will be fixed in a selinux-policy update soon. == virtinst == https://bugzilla.redhat.com/504604 virtinst ignores VirtualDisk(sparse = False) and doesn't pre-allocate the disk image Pre-allocation of disk images was disabled until it could be done without blocking libvirtd. This was fixed in libvirt-0.6.3, so to enable nonsparse disks in F-11 we would need to first backport the change from 0.6.3. https://bugzilla.redhat.com/505317 virtinst: make SLES11 guests use virtio by default Looks like SLES11 guests work well with virtio, should make virtinst enable it by default. == virt-manager == https://bugzilla.redhat.com/504605 virt-manager gets sparse/nosparse mixed up in New VM dialog virt-manager currently gets confused between sparse/nonsparse. Not that it matters since virtinst currently ignores it. https://bugzilla.redhat.com/504326 virt-manager's new VM dialog does not use storage pool interface https://bugzilla.redhat.com/502204 virt-manager's dialog to connect an existing CD-ROM to an ISO does not use storage pool interface A couple of places where we should be using the storage poll interface in virt-manager. Cole has now fixed these upstream. == virt-mem == https://bugzilla.redhat.com/505072 virt-mem "invalid argument in virDomainLookupByUUIDString" error A known error with the virt-mem tools on F-11, Rich has a patch somewhere. = Resolved Bugs = == qemu == https://bugzilla.redhat.com/506435 kvm: -kernel option seems broken Re-basing our qemu-roms-more-room.patch onto 0.10.5 introduced this regression. Fixed in qemu-0.10.5-3.fc11 https://bugzilla.redhat.com/499060 vgabios regression - 1440x900 resolution no longer available Glauber has cherry-picked the code to fix this from 0.6c and pushed a vgabios-0.6b-2.fc11 update to F-11. https://bugzilla.redhat.com/501545 "qemu-kvm -vga std" broken with vgabios 0.6c Tom London bisected the problem down to a specific upstream commit. It turns out the qemu is missing some code (which is in latest boch, but not qemu) in order for 0.6c to work. We've reverted to 0.6b (with some changes cherry-picked from 0.6c) in F-12 for now. == kvm == https://bugzilla.redhat.com/504374 kvm: hw DR_* watchpoint registers are ignored KVM in 2.6.29 does not virtualization the x86 debug registers so GDB watchpoints do not work. However, this is implemented in 2.6.30. == etherboot == https://bugzilla.redhat.com/506616 [qemu netboot] Eliminate 3 second delay on PXE boot Request to simply rebuild etherboot with ASK_BOOT=-1 in order to eliminate a pointless 3 second delay that most people don't ever see. https://bugzilla.redhat.com/507391 qemu-kvm PXE boot with e1000 results in bogus packets Several people have reported PXE using a virtio NIC doesn't work in F-11. It turned out to be an issue with gcc re-ordering writes and was fixed simply by appropriately using the 'volatile' keyword for the packet header. Fix available in etherboot-5.4.4-16.fc11 == svirt == https://bugzilla.redhat.com/499259 svirt denials breaks KVM PCI device assignment The virt_manage_sysfs SELinux boolean was added quite some time ago which is enough to use PCI device assignment with SELinux in enforcing mode. https://bugzilla.redhat.com/504444 svirt denials break USB device passthrough Similar to bug #499259 where svirt breaks PCI passthrough, svirt is denying qemu access to /proc, breaking USB passthrough. Dan Walsh has added a virt_use_usb boolean to selinux-policy which, if enabled, fixes the problem. == libvirt == https://bugzilla.redhat.com/506737 virt-manager should allow VM names with spaces in them Apparently this is a 'feature', so WONTFIX. == virtinst == https://bugzilla.redhat.com/484099 virt-install SASL authentication support virt-install doesn't currently have support for authenticating using SASL. Cole has fixed this upstream now. https://bugzilla.redhat.com/506319 virtinst errors finding default bridge: upsets virt-manager Cole fixed this upstream. = Ongoing Bugs = == qemu == https://bugzilla.redhat.com/473154 Virtual machine fails to start without cdom - qemu: could not open disk image /dev/sr0 Eduardo has posted a variant of Cole's patch upstream; Anthony has requested further changes. https://bugzilla.redhat.com/501131 qemu segfault when VNC client disconnects Gerd has fixed this upstream, just need to back-port the patch to F-11 now. https://bugzilla.redhat.com/504273 qemu-system-ppc on ppc host fails with "no opcode defined" It looks like this bug should be fixed by a change upstream to disable gcc optimizations for translate.c. Pavel still sees "invalid opcode" errors, though. A qemu-0.10.5-3.fc11 update has been pushed which might help. == virt-manager == https://bugzilla.redhat.com/503784 memory/vcpus changes in virt-manager do not persist across libvirtd restart Erik Jacobson points out that this issue affects CPU changes as well as memory. virt-manager needs to explicitly make these config changes persistent. https://bugzilla.redhat.com/503786 virt-manager refuses to increase guest memory until max memory change is first applied Cole has fixed this upstream. == koan == https://bugzilla.redhat.com/493414 Windows installs require manual reboot in the middle koan needs to acquire the ability to re-start a guest once the first stage of the install has completed. From berrange at redhat.com Tue Jun 23 20:44:58 2009 From: berrange at redhat.com (Daniel P. Berrange) Date: Tue, 23 Jun 2009 21:44:58 +0100 Subject: [fedora-virt] default tftp root dir in virt-manager or qemu? In-Reply-To: <1245775812.20511.28.camel@blaa> References: <561c252c0906151028o7f28100fp1f149128b0b1e38f@mail.gmail.com> <1245775812.20511.28.camel@blaa> Message-ID: <20090623204458.GB4895@redhat.com> On Tue, Jun 23, 2009 at 04:50:12PM +0000, Mark McLoughlin wrote: > Hey, > > On Mon, 2009-06-15 at 19:28 +0200, Gianluca Cecchi wrote: > > 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 virbro default interface). > > No configuration done by me. > > 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.... > > Yeah, what we really need here is to have support for setting up TFTP > for libvirt's virtual networks - e.g. > > > > > which would cause dnsmasq to be run with: > > --enable-tftp --tftp-root=/var/lib/libvirt/tftp \ > --dhcp-boot=pxelinux.0 > > we'd also need to open port 69 in our iptables rules. > > Please file an RFE for this in bugzilla.redhat.com/Virtualization ... > maybe even give a shot at cooking up a patch? I really question what the point in going to setup a PXE server install on each individual host OS is. The 'virtual network' is local only, so you might as well just install the guest using a direct kernel+initrd boot, avoiding all the host OS configuration steps, and extra PXE boot complexity in libvirt. Daniel -- |: Red Hat, Engineering, London -o- http://people.redhat.com/berrange/ :| |: http://libvirt.org -o- http://virt-manager.org -o- http://ovirt.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :| From markmc at redhat.com Wed Jun 24 06:43:09 2009 From: markmc at redhat.com (Mark McLoughlin) Date: Wed, 24 Jun 2009 07:43:09 +0100 Subject: [fedora-virt] default tftp root dir in virt-manager or qemu? In-Reply-To: <20090623204458.GB4895@redhat.com> References: <561c252c0906151028o7f28100fp1f149128b0b1e38f@mail.gmail.com> <1245775812.20511.28.camel@blaa> <20090623204458.GB4895@redhat.com> Message-ID: <1245825789.4162.4.camel@blaa> On Tue, 2009-06-23 at 21:44 +0100, Daniel P. Berrange wrote: > On Tue, Jun 23, 2009 at 04:50:12PM +0000, Mark McLoughlin wrote: > > Hey, > > > > On Mon, 2009-06-15 at 19:28 +0200, Gianluca Cecchi wrote: > > > 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 virbro default interface). > > > No configuration done by me. > > > 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.... > > > > Yeah, what we really need here is to have support for setting up TFTP > > for libvirt's virtual networks - e.g. > > > > > > > > > > which would cause dnsmasq to be run with: > > > > --enable-tftp --tftp-root=/var/lib/libvirt/tftp \ > > --dhcp-boot=pxelinux.0 > > > > we'd also need to open port 69 in our iptables rules. > > > > Please file an RFE for this in bugzilla.redhat.com/Virtualization ... > > maybe even give a shot at cooking up a patch? > > I really question what the point in going to setup a PXE server install > on each individual host OS is. The 'virtual network' is local only, so > you might as well just install the guest using a direct kernel+initrd > boot, avoiding all the host OS configuration steps, and extra PXE boot > complexity in libvirt. It's a fair point - the main use case I see for it is as a way of testing your PXE server config locally before booting remote machines. Cheers, Mark. From berrange at redhat.com Wed Jun 24 09:05:38 2009 From: berrange at redhat.com (Daniel P. Berrange) Date: Wed, 24 Jun 2009 10:05:38 +0100 Subject: [fedora-virt] default tftp root dir in virt-manager or qemu? In-Reply-To: <1245825789.4162.4.camel@blaa> References: <561c252c0906151028o7f28100fp1f149128b0b1e38f@mail.gmail.com> <1245775812.20511.28.camel@blaa> <20090623204458.GB4895@redhat.com> <1245825789.4162.4.camel@blaa> Message-ID: <20090624090538.GB28256@redhat.com> On Wed, Jun 24, 2009 at 07:43:09AM +0100, Mark McLoughlin wrote: > On Tue, 2009-06-23 at 21:44 +0100, Daniel P. Berrange wrote: > > On Tue, Jun 23, 2009 at 04:50:12PM +0000, Mark McLoughlin wrote: > > > Hey, > > > > > > On Mon, 2009-06-15 at 19:28 +0200, Gianluca Cecchi wrote: > > > > 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 virbro default interface). > > > > No configuration done by me. > > > > 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.... > > > > > > Yeah, what we really need here is to have support for setting up TFTP > > > for libvirt's virtual networks - e.g. > > > > > > > > > > > > > > > which would cause dnsmasq to be run with: > > > > > > --enable-tftp --tftp-root=/var/lib/libvirt/tftp \ > > > --dhcp-boot=pxelinux.0 > > > > > > we'd also need to open port 69 in our iptables rules. > > > > > > Please file an RFE for this in bugzilla.redhat.com/Virtualization ... > > > maybe even give a shot at cooking up a patch? > > > > I really question what the point in going to setup a PXE server install > > on each individual host OS is. The 'virtual network' is local only, so > > you might as well just install the guest using a direct kernel+initrd > > boot, avoiding all the host OS configuration steps, and extra PXE boot > > complexity in libvirt. > > It's a fair point - the main use case I see for it is as a way of > testing your PXE server config locally before booting remote machines. For that I'd expect you to use the same PXE server as you would later. eg, if you're going to deploy Cobbler, then I'd expect you'd want to actually be testing cobbler locally. I'm sure cobbler could be configured to only attach to virbr0 for testing purposes. Regards, Daniel -- |: Red Hat, Engineering, London -o- http://people.redhat.com/berrange/ :| |: http://libvirt.org -o- http://virt-manager.org -o- http://ovirt.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :| From berrange at redhat.com Wed Jun 24 10:36:21 2009 From: berrange at redhat.com (Daniel P. Berrange) Date: Wed, 24 Jun 2009 11:36:21 +0100 Subject: [fedora-virt] Fedora virt status In-Reply-To: <1245779361.20511.31.camel@blaa> References: <1245779361.20511.31.camel@blaa> Message-ID: <20090624103621.GC28256@redhat.com> On Tue, Jun 23, 2009 at 06:49:21PM +0100, Mark McLoughlin wrote: > > F-12 Features > ============= > > We've prepared a good bunch of feature pages so far for F-12: > > http://fedoraproject.org/wiki/Category:F12_Virt_Features I decided we needed a page with a nice historical list of Fedora virtualization milestones, so I created one https://fedoraproject.org/wiki/Virtualization/History While I was at it, I also added a page with an archive index of all your fedora-virt status messages, and all FWN issues which have a virtualization topic present. https://fedoraproject.org/wiki/Virtualization/News Both linked to from https://fedoraproject.org/wiki/Virtualization Regards, Daniel -- |: Red Hat, Engineering, London -o- http://people.redhat.com/berrange/ :| |: http://libvirt.org -o- http://virt-manager.org -o- http://ovirt.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :| From markmc at redhat.com Wed Jun 24 12:02:21 2009 From: markmc at redhat.com (Mark McLoughlin) Date: Wed, 24 Jun 2009 13:02:21 +0100 Subject: [fedora-virt] Fedora virt status In-Reply-To: <20090624103621.GC28256@redhat.com> References: <1245779361.20511.31.camel@blaa> <20090624103621.GC28256@redhat.com> Message-ID: <1245844942.23857.0.camel@blaa> On Wed, 2009-06-24 at 11:36 +0100, Daniel P. Berrange wrote: > On Tue, Jun 23, 2009 at 06:49:21PM +0100, Mark McLoughlin wrote: > > > > F-12 Features > > ============= > > > > We've prepared a good bunch of feature pages so far for F-12: > > > > http://fedoraproject.org/wiki/Category:F12_Virt_Features > > I decided we needed a page with a nice historical list of Fedora > virtualization milestones, so I created one > > https://fedoraproject.org/wiki/Virtualization/History > > While I was at it, I also added a page with an archive index of > all your fedora-virt status messages, and all FWN issues which > have a virtualization topic present. > > https://fedoraproject.org/wiki/Virtualization/News Nice one Dan, they're both great - hopefully we'll actually keep them up to date :-) Cheers, Mark. From markmc at redhat.com Wed Jun 24 16:49:54 2009 From: markmc at redhat.com (Mark McLoughlin) Date: Wed, 24 Jun 2009 16:49:54 +0000 Subject: [fedora-virt] git tree for Fedora qemu patches Message-ID: <1245862194.29350.5.camel@blaa> Hey, Glauber and I are going to start using git to manage the patches for the qemu package. The idea is that we'll use git's magical powers to make it easier for us to fix problems in patches, cherry-pick patches from upstream, re-base our patches to a newer upstream, etc. Nothing is changing, really - patches should still go upstream first and we'll still include patches as individual files in the source RPM - this is purely about making managing those patches easier. Here's the tree: http://git.et.redhat.com/?p=qemu-fedora.git It might be useful to others who want to help with back-porting fixes etc. Cheers, Mark. From rjones at redhat.com Wed Jun 24 17:04:32 2009 From: rjones at redhat.com (Richard W.M. Jones) Date: Wed, 24 Jun 2009 18:04:32 +0100 Subject: [fedora-virt] Meet us at Berlin FUDCon / LinuxTAG, Friday - Sunday (26-28 June) Message-ID: <20090624170432.GA22667@amd.home.annexia.org> Mark McLoughlin and myself will be at LinuxTag and FUDCon in Berlin this week. There's a talk on virtualization, Saturday 11am. And, subject to demand, hackfests on libguestfs and the Windows cross-compiler (Fedora MinGW project) on Sunday. https://fedoraproject.org/wiki/FUDCon:Berlin_and_LinuxTag_2009_talks If you'll be at LinuxTag or FUDCon, please come along and say hello. We're also meeting up with a few people, so if you need my mobile number, email me. More information here: https://fedoraproject.org/wiki/LinuxTag_2009 Rich. -- Richard Jones, Emerging Technologies, Red Hat http://et.redhat.com/~rjones virt-df lists disk usage of guests without needing to install any software inside the virtual machine. Supports Linux and Windows. http://et.redhat.com/~rjones/virt-df/ From dennisml at conversis.de Thu Jun 25 01:38:10 2009 From: dennisml at conversis.de (Dennis J.) Date: Thu, 25 Jun 2009 03:38:10 +0200 Subject: [fedora-virt] 20% cpu usage spikes with idle centos 5.3 guest on F11 Message-ID: <4A42D502.8000601@conversis.de> Hi, When I run a centos 5.3 x86_64 guest on my F11 x86_64 system with kvm I see the qemu-kvm process cpu usage jump to ~20% every few seconds even though the guest is completely idle (I even disabled the HAL polling for /dev/hdc). Does anyone have an idea what could be the cause of this or how find the reason for this behavior? Regards, Dennis From gene at czarc.net Thu Jun 25 14:05:58 2009 From: gene at czarc.net (Gene Czarcinski) Date: Thu, 25 Jun 2009 10:05:58 -0400 Subject: [fedora-virt] Fedora virtualization -- comments and questions Message-ID: <200906251005.58498.gene@czarc.net> I am a newcomer to Fedora (linux) virtualization. However, I have been a long time user of VMware products running first on Red Hat Linux and then on Fedora. When I recently acquired a CPU with hardware virtualization support (AMD Phenom II 940), I decided to "change my problem set" and give Fedora Virtualization a try ... specifically qemu/kvm/etc. I use virtuals for three purposes: 1) To test software which might destroy a system or testing which requires a lot of re-booting. 2) For development environment to build rpm packages for various systems, i386/x86_64, etc. 3) To run windows. OK, install the virtualization packages and then install a simple Fedora 11 guest ... naturally it worked fine. Now lets get down to real business since I would be installing/running a number of virtual systems. The first thing I found was that configuration files, disk images, etc. were scattered but mostly under /etc/libvirt and /var/lib/libvirt. I looked for a runtime parameter which specified where things were to be stored but did not find anything. Furthermore, all of this stuff was in the root ("/") partition and, when I upgraded to the next release, a pain to bring across. I have three suggestions (I will put these in bugzilla as soon as someone says what package they should be filed against): 1. Put all files (disk images, configuration, etc.) under a single directory (easier to manage). 2. Provide a virtualization configuration parameter for setting the top directory to be used to store virtualization files (make it easier to get things out of root). 3. Do not require DVD/CD ISO images to be in the image directory and do not screw with SELinux settings on ISO files. For those unfamiliar with it, this is more or less how VMware stuff sets things up. So much for wishful thinking, how do I make things easier (and get the files out of root)? OK, what I have come up with is to create a separate partition for all of the files and then "bind mount" it to /var/lib/libvirt and /etc/libvirt. Does this make sense? Is this going to work? Any other suggestions? Gene From gmaddock at futuremetals.com Thu Jun 25 14:28:50 2009 From: gmaddock at futuremetals.com (Gerry Maddock) Date: Thu, 25 Jun 2009 10:28:50 -0400 Subject: [fedora-virt] Fedora virtualization -- comments and questions In-Reply-To: <200906251005.58498.gene@czarc.net> References: <200906251005.58498.gene@czarc.net> Message-ID: From: Gene Czarcinski > I am a newcomer to Fedora (linux) virtualization. However, I have > been a long > time user of VMware products running first on Red Hat Linux and thenon Fedora. > > When I recently acquired a CPU with hardware virtualization support (AMD > Phenom II 940), I decided to "change my problem set" and give Fedora > Virtualization a try ... specifically qemu/kvm/etc. > > I use virtuals for three purposes: 1) To test software which might destroy a > system or testing which requires a lot of re-booting. 2) For development > environment to build rpm packages for various systems, i386/x86_64, etc. 3) > To run windows. > > OK, install the virtualization packages and then install a simple Fedora 11 > guest ... naturally it worked fine. > > Now lets get down to real business since I would be installing/running a > number of virtual systems. The first thing I found was that > configuration files, > disk images, etc. were scattered but mostly under /etc/libvirt and > /var/lib/libvirt. I looked for a runtime parameter which specified where > things were to be stored but did not find anything. Furthermore, all of this > stuff was in the root ("/") partition and, when I upgraded to the > next release, > a pain to bring across. > > I have three suggestions (I will put these in bugzilla as soon as > someone says > what package they should be filed against): > > 1. Put all files (disk images, configuration, etc.) under a single directory > (easier to manage). > > 2. Provide a virtualization configuration parameter for setting the top > directory to be used to store virtualization files (make it easier to get > things out of root). > > 3. Do not require DVD/CD ISO images to be in the image directory and do not > screw with SELinux settings on ISO files. > > For those unfamiliar with it, this is more or less how VMware stuff > sets things > up. > > So much for wishful thinking, how do I make things easier (and get the files > out of root)? > > OK, what I have come up with is to create a separate partition for all of the > files and then "bind mount" it to /var/lib/libvirt and /etc/libvirt. > > Does this make sense? Is this going to work? Any other suggestions? I have been using qemu-kvm pretty much since it was 1st released. All of my images have always defaulted to /var/lib/libvirt/images/ and have never been "scattered" or anywhere else such as /root. As far as I know CD/DVD ISO images could be stored where ever you wanted them (mine never default to /var/lib/libvirt/). Not sure by what you mean by: "and do not screw with SELinux settings on ISO files". CONFIDENTIALITY: This e-mail message is for the sole use of the intended recipient(s) and may contain confidential and / or privileged information. Any unauthorized review, use, disclosure or distribution of any kind is strictly prohibited. If you are not the intended recipient, please contact the sender via reply e-mail and destroy all copies of the original message. Thank you. From charles at dyfis.net Thu Jun 25 14:39:37 2009 From: charles at dyfis.net (Charles Duffy) Date: Thu, 25 Jun 2009 09:39:37 -0500 Subject: [fedora-virt] Fedora virtualization -- comments and questions In-Reply-To: <200906251005.58498.gene@czarc.net> References: <200906251005.58498.gene@czarc.net> Message-ID: <4A438C29.6050907@dyfis.net> Gene Czarcinski wrote: > 1. Put all files (disk images, configuration, etc.) under a single directory > (easier to manage). > With regard to the configuration being in a different area than the disk images -- /etc/libvirt/qemu/** is _not_ intended to be directly edited by hand. Just as /etc/sudoers is supposed to be edited only by visudo, files under that directory should be edited with "virsh edit", "virsh net-edit", or other libvirt-aware mechanisms. So, as you-the-user aren't supposed to interact with them directly in any way... arguably it doesn't matter much where they happen to be stored. From philippe.marcovici at free.fr Thu Jun 25 15:08:22 2009 From: philippe.marcovici at free.fr (philippe.marcovici at free.fr) Date: Thu, 25 Jun 2009 17:08:22 +0200 (CEST) Subject: [fedora-virt] libvirt and iptables rules added In-Reply-To: <2086043735.1881691245942271963.JavaMail.root@zimbra8-e1.priv.proxad.net> Message-ID: <1156536744.1882091245942502610.JavaMail.root@zimbra8-e1.priv.proxad.net> Hi, My iptables rules are not permissives. For exemple, my default iptables's rules are DROP. libvirt inserts some iptables's rules. But, because my rules are not permissives, some DROP are generated. I fix it with a script, but i am looking for an automatization. I saw an directory named iptables with sub-directories named nat and filter in /var/lib/libvirt (all empty) : # ls -r /var/lib/libvirt/iptables nat filter My questions, in this context, are : - Can i use this directories to put some iptables rules who will be loaded and unloaded with libvirtd ? - If yes, how i must set them ? - If no, any others solutions ? Thanks. From loganjerry at gmail.com Thu Jun 25 15:16:19 2009 From: loganjerry at gmail.com (Jerry James) Date: Thu, 25 Jun 2009 09:16:19 -0600 Subject: [fedora-virt] 20% cpu usage spikes with idle centos 5.3 guest on F11 In-Reply-To: <4A42D502.8000601@conversis.de> References: <4A42D502.8000601@conversis.de> Message-ID: <870180fe0906250816k72a70fd5he1f8b8e909964278@mail.gmail.com> On Wed, Jun 24, 2009 at 7:38 PM, Dennis J. wrote: > Hi, > When I run a centos 5.3 x86_64 guest on my F11 x86_64 system with kvm I see > the qemu-kvm process cpu usage jump to ~20% every few seconds even though > the guest is completely idle (I even disabled the HAL polling for /dev/hdc). > Does anyone have an idea what could be the cause of this or how find the > reason for this behavior? > > Regards, > ?Dennis Interesting. I also have an x86_64 CentOS 5.3 guest running under an x86_64 F11 host. But I don't see those spikes. What I see is a constant, apparently very steady 12% CPU usage when the guest is idle. I have not disabled /dev/hdc polling. My guest has 1 GB of RAM and 2 virtual CPUs, if that matters. I've also messed with xorg.conf to increase the resolution slightly. Otherwise, it is a vanilla virt-manager created VM. -- Jerry James http://www.jamezone.org/ From gene at czarc.net Thu Jun 25 16:11:24 2009 From: gene at czarc.net (Gene Czarcinski) Date: Thu, 25 Jun 2009 12:11:24 -0400 Subject: [fedora-virt] Fedora virtualization -- comments and questions In-Reply-To: References: <200906251005.58498.gene@czarc.net> Message-ID: <200906251211.24571.gene@czarc.net> On Thursday 25 June 2009 10:28:50 Gerry Maddock wrote: > From: Gene Czarcinski > > > I am a newcomer to Fedora (linux) virtualization. However, I have > > been a long > > time user of VMware products running first on Red Hat Linux and then on > > Fedora. > > > When I recently acquired a CPU with hardware virtualization support (AMD > > Phenom II 940), I decided to "change my problem set" and give Fedora > > Virtualization a try ... specifically qemu/kvm/etc. > > > > I use virtuals for three purposes: 1) To test software which might > > destroy a > > > system or testing which requires a lot of re-booting. 2) For development > > > > environment to build rpm packages for various systems, i386/x86_64, etc. > > 3) > > > To run windows. > > > > OK, install the virtualization packages and then install a simple Fedora > > 11 > > > guest ... naturally it worked fine. > > > > Now lets get down to real business since I would be installing/running a > > number of virtual systems. The first thing I found was that > > configuration files, > > disk images, etc. were scattered but mostly under /etc/libvirt and > > /var/lib/libvirt. I looked for a runtime parameter which specified where > > > > things were to be stored but did not find anything. Furthermore, all of > > this > > > stuff was in the root ("/") partition and, when I upgraded to the > > next release, > > a pain to bring across. > > > > I have three suggestions (I will put these in bugzilla as soon as > > someone says > > what package they should be filed against): > > > > 1. Put all files (disk images, configuration, etc.) under a single > > directory > > > (easier to manage). > > > > 2. Provide a virtualization configuration parameter for setting the top > > directory to be used to store virtualization files (make it easier to get > > > > things out of root). > > > > 3. Do not require DVD/CD ISO images to be in the image directory and do > > not > > > screw with SELinux settings on ISO files. > > > > For those unfamiliar with it, this is more or less how VMware stuff > > sets things > > up. > > > > So much for wishful thinking, how do I make things easier (and get the > > files > > > out of root)? > > > > OK, what I have come up with is to create a separate partition for all of > > the > > > files and then "bind mount" it to /var/lib/libvirt and /etc/libvirt. > > > > Does this make sense? Is this going to work? Any other suggestions? > > I have been using qemu-kvm pretty much since it was 1st released. All of my > images have always defaulted to /var/lib/libvirt/images/ and have never > been "scattered" or anywhere else such as /root. As far as I know CD/DVD > ISO images could be stored where ever you wanted them (mine never default > to /var/lib/libvirt/). Not sure by what you mean by: "and do not screw with > SELinux settings on ISO files". OK, to properly state my "problem", I need to supply some additional info. 1. All of my Fedora systems are multiboot systems with a small (minimal install) Fedora as a "boot selector" and system to define striped LVM logical volumes (which anaconda does not support). Each system has at least two disk drives (they are pretty cheap these days). There are multiple swap and /boot partitions defined. The remainder of the disk space is put into a single LVM volume group. 2. Basic rule: "do not screw with a working system!" ... Only do fresh installs. NEVER upgrade. This was a hard lesson to learn but it keeps me out of trouble,. 3. Each system has four /boot partitions and four "/" logical volumes (named root1-4) ... think of these as old, current, next, and testing. /home and other data are put into separate logical volumes. One of these separate logical volumes has been used for VMware Virtuals. I keep what goes into a "/" (commonly referred to as "root" in Unix/Linux) to just software, etc. for a specific version of a system (e.g., Fedora 10, Fedora 11, Fedora 12, etc). I expect all other stuff to be in separate partitions or LVM logical volumes which I can mount on my new system. 4. After installing a "new" system such as when Fedora 12 is released, I want to do a minimum of work copying over stuff from the old system to the new system. 5. With the current "libvirt" setup I have disk images under /var/lib/libvert/images and the guest's configuration under /etc/libvirt/qemu. Furthermore, I now have an application which can chew up a lot of disk space and all of it coming out of the "/" logical volume. I currently size my "/" logical volumes to handle a lot of software plus a good amount of temporary storage ... BUT I do not have 150GB "/" partitions/logical-volumes! 5. My current VMware virtuals take about 100GB of storage and I expect Fedora Virtualization to need similar resources. It does not make any sense to me to duplicate the storage for each version of the operating system I have installed. Now, will mount-bind work? Does anyone have a better suggestion? Leaving it as-is is not an option. As far as SELinux goes, I read (somewhere in documentation) that a) iso images had to be under /var/lib/libvirt/images and that b) the SELinux context values would be set to "virt_image_t". This may not be the way the software actual works but this is what is described in some related documentation. Gene From berrange at redhat.com Thu Jun 25 16:16:11 2009 From: berrange at redhat.com (Daniel P. Berrange) Date: Thu, 25 Jun 2009 17:16:11 +0100 Subject: [fedora-virt] Fedora virtualization -- comments and questions In-Reply-To: <200906251211.24571.gene@czarc.net> References: <200906251005.58498.gene@czarc.net> <200906251211.24571.gene@czarc.net> Message-ID: <20090625161611.GD1737@redhat.com> On Thu, Jun 25, 2009 at 12:11:24PM -0400, Gene Czarcinski wrote: > On Thursday 25 June 2009 10:28:50 Gerry Maddock wrote: > > 1. All of my Fedora systems are multiboot systems with a small (minimal > install) Fedora as a "boot selector" and system to define striped LVM logical > volumes (which anaconda does not support). Each system has at least two disk > drives (they are pretty cheap these days). There are multiple swap and /boot > partitions defined. The remainder of the disk space is put into a single LVM > volume group. > > 2. Basic rule: "do not screw with a working system!" ... Only do fresh > installs. NEVER upgrade. This was a hard lesson to learn but it keeps me out > of trouble,. > > 3. Each system has four /boot partitions and four "/" logical volumes (named > root1-4) ... think of these as old, current, next, and testing. /home and > other data are put into separate logical volumes. One of these separate > logical volumes has been used for VMware Virtuals. I keep what goes into a > "/" (commonly referred to as "root" in Unix/Linux) to just software, etc. for > a specific version of a system (e.g., Fedora 10, Fedora 11, Fedora 12, etc). I > expect all other stuff to be in separate partitions or LVM logical volumes > which I can mount on my new system. > > 4. After installing a "new" system such as when Fedora 12 is released, I want > to do a minimum of work copying over stuff from the old system to the new > system. All these points just say you want some kind of config mgmt tool. In keeping config files in /etc/, libvirt is no different to most other apps. You could bind mount /etc/libvirt elsewhere if you really felt you needed to. > 5. With the current "libvirt" setup I have disk images under > /var/lib/libvert/images and the guest's configuration under /etc/libvirt/qemu. > Furthermore, I now have an application which can chew up a lot of disk space > and all of it coming out of the "/" logical volume. I currently size my "/" > logical volumes to handle a lot of software plus a good amount of temporary > storage ... BUT I do not have 150GB "/" partitions/logical-volumes! That directory isn't compulsory. It is the default location with correct SELinux labelling, but you can ad other directories using 'semanage', and in very latest libvirt, we automatically relabel disks suitably, no matter where they are located. > As far as SELinux goes, I read (somewhere in documentation) that a) iso images > had to be under /var/lib/libvirt/images and that b) the SELinux context values > would be set to "virt_image_t". This may not be the way the software actual > works but this is what is described in some related documentation. Since Fedora 11 there should be no need to label files yourself Daniel -- |: Red Hat, Engineering, London -o- http://people.redhat.com/berrange/ :| |: http://libvirt.org -o- http://virt-manager.org -o- http://ovirt.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :| From gene at czarc.net Thu Jun 25 16:17:36 2009 From: gene at czarc.net (Gene Czarcinski) Date: Thu, 25 Jun 2009 12:17:36 -0400 Subject: [fedora-virt] Fedora virtualization -- comments and questions In-Reply-To: <4A438C29.6050907@dyfis.net> References: <200906251005.58498.gene@czarc.net> <4A438C29.6050907@dyfis.net> Message-ID: <200906251217.36488.gene@czarc.net> On Thursday 25 June 2009 10:39:37 Charles Duffy wrote: > Gene Czarcinski wrote: > > 1. Put all files (disk images, configuration, etc.) under a single > > directory (easier to manage). > > With regard to the configuration being in a different area than the disk > images -- > > /etc/libvirt/qemu/** is _not_ intended to be directly edited by hand. > Just as /etc/sudoers is supposed to be edited only by visudo, files > under that directory should be edited with "virsh edit", "virsh > net-edit", or other libvirt-aware mechanisms. > > So, as you-the-user aren't supposed to interact with them directly in > any way... arguably it doesn't matter much where they happen to be stored. See the reply I made to the other message. Basically it comes does to this: 1. I have multi-boot systems and NEVER screw with a working system ... I only do fresh installs to a separate partition (the "old" system remains intact). 2. Even if copying files from one system to another is not an issue, the stoage space required for guest disk images can be large. I currently have about 100 GB of space used by VMware virtuals but that is in a separate partition for my "/" partition. Gene From berrange at redhat.com Thu Jun 25 16:21:23 2009 From: berrange at redhat.com (Daniel P. Berrange) Date: Thu, 25 Jun 2009 17:21:23 +0100 Subject: [fedora-virt] Fedora virtualization -- comments and questions In-Reply-To: <200906251005.58498.gene@czarc.net> References: <200906251005.58498.gene@czarc.net> Message-ID: <20090625162123.GE1737@redhat.com> On Thu, Jun 25, 2009 at 10:05:58AM -0400, Gene Czarcinski wrote: > 1. Put all files (disk images, configuration, etc.) under a single directory > (easier to manage). Config files live in /etc, and it makes no sense to put disk images there, so this isn't really viable. > 2. Provide a virtualization configuration parameter for setting the top > directory to be used to store virtualization files (make it easier to get > things out of root). virt-manager allows you configure storage pools in arbitarry locations, not just on local machine, but also use NFS, LVM, parted, iSCSI, etc. The /var/lib/libvirt directory is just a default starting point which you can freely override if desired. > 3. Do not require DVD/CD ISO images to be in the image directory and do not > screw with SELinux settings on ISO files. We don't require ISO files to be in a specific directory anymore and will automatically relabel them to ensure they are accessible by VMs. Dnaiel -- |: Red Hat, Engineering, London -o- http://people.redhat.com/berrange/ :| |: http://libvirt.org -o- http://virt-manager.org -o- http://ovirt.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :| From thomas at sjolshagen.net Thu Jun 25 16:17:52 2009 From: thomas at sjolshagen.net (Thomas Sjolshagen) Date: Thu, 25 Jun 2009 12:17:52 -0400 Subject: [fedora-virt] Fedora virtualization -- comments and questions In-Reply-To: <200906251211.24571.gene@czarc.net> References: <200906251005.58498.gene@czarc.net> <200906251211.24571.gene@czarc.net> Message-ID: <20090625121752.13521gxzwh4r1vzk@www.sjolshagen.net> Quoting Gene Czarcinski : > > As far as SELinux goes, I read (somewhere in documentation) that a) > iso images > had to be under /var/lib/libvirt/images and that b) the SELinux > context values > would be set to "virt_image_t". This may not be the way the software actual > works but this is what is described in some related documentation. Considering the uniqueness of this setup, maybe it makes more sense to simply disable SELinux and thus avoid labeling issues altogether? Also, as mentioned previously, strongly recommend using the virsh (or other libvirt dependent commands) if you're going to use libvirt as the management paradigm. Virsh/Libvirt isn't really a requirement for KVM, it just makes life a little easier. // Thomas ---------------------------------------------------------------- This message was sent using IMP, the Internet Messaging Program. From gene at czarc.net Thu Jun 25 16:36:47 2009 From: gene at czarc.net (Gene Czarcinski) Date: Thu, 25 Jun 2009 12:36:47 -0400 Subject: [fedora-virt] Fedora virtualization -- comments and questions In-Reply-To: <20090625121752.13521gxzwh4r1vzk@www.sjolshagen.net> References: <200906251005.58498.gene@czarc.net> <200906251211.24571.gene@czarc.net> <20090625121752.13521gxzwh4r1vzk@www.sjolshagen.net> Message-ID: <200906251236.48098.gene@czarc.net> On Thursday 25 June 2009 12:17:52 Thomas Sjolshagen wrote: > Quoting Gene Czarcinski : > > As far as SELinux goes, I read (somewhere in documentation) that a) > > iso images > > had to be under /var/lib/libvirt/images and that b) the SELinux > > context values > > would be set to "virt_image_t". This may not be the way the software > > actual works but this is what is described in some related documentation. > > Considering the uniqueness of this setup, maybe it makes more sense to > simply disable SELinux and thus avoid labeling issues altogether? I DO NOT consider this an option. If things do not work with respect to SELinux it is either a bug or I do not understand something. > > Also, as mentioned previously, strongly recommend using the virsh (or > other libvirt dependent commands) if you're going to use libvirt as > the management paradigm. Virsh/Libvirt isn't really a requirement for > KVM, it just makes life a little easier. I am just starting and have (as far as I can tell) all of the Virtualization packages installed. But, before I go too far with this stuff, I need to figure out how to handle the libvirt files so that I can esily move to the next version of the system and so it does not fill my "/" logical volume. Gene From dennisml at conversis.de Thu Jun 25 16:54:15 2009 From: dennisml at conversis.de (Dennis J.) Date: Thu, 25 Jun 2009 18:54:15 +0200 Subject: [fedora-virt] 20% cpu usage spikes with idle centos 5.3 guest on F11 In-Reply-To: <4A4381B5.5060001@redhat.com> References: <4A42D502.8000601@conversis.de> <4A4381B5.5060001@redhat.com> Message-ID: <4A43ABB7.2080106@conversis.de> On 06/25/2009 03:55 PM, Don Dutile wrote: > Dennis J. wrote: >> Hi, >> When I run a centos 5.3 x86_64 guest on my F11 x86_64 system with kvm I >> see the qemu-kvm process cpu usage jump to ~20% every few seconds even >> though the guest is completely idle (I even disabled the HAL polling for >> /dev/hdc). Does anyone have an idea what could be the cause of this or >> how find the reason for this behavior? >> >> Regards, >> Dennis >> >> _______________________________________________ >> Fedora-virt mailing list >> Fedora-virt at redhat.com >> https://www.redhat.com/mailman/listinfo/fedora-virt > > Try turning off the network (ifcfg eth0 down) in the guest& > see if the cpu usage goes away. if so, it's probably network > polling mis-behaving. if not, then send details > (kernel revs; #pcpu's, #vcpu's in guest, etc. I shut down the interface using "ifdown eth0" but that didn't change anything. I filed a bug here: https://bugzilla.redhat.com/show_bug.cgi?id=508109 It contains additional information about the environment and an attached screenshot showing the peaks in virtual-machine-manager in more detail. Regards, Dennis From cochranb at speakeasy.net Thu Jun 25 17:02:13 2009 From: cochranb at speakeasy.net (Robert L Cochran) Date: Thu, 25 Jun 2009 13:02:13 -0400 Subject: [fedora-virt] Fedora virtualization -- comments and questions In-Reply-To: <200906251211.24571.gene@czarc.net> References: <200906251005.58498.gene@czarc.net> <200906251211.24571.gene@czarc.net> Message-ID: <4A43AD95.5050609@speakeasy.net> Well I'm a bit confused because it is hard for me to see the connection you are making to ease of virtualization here. I think you must be asking a question equivalent to this one: "Is it possible to move Fedora virtual machines from one system to another system despite my complicated LVM disk setup?" Not being an expert, I don't know the answer, but it should (eventually) be possible for you to move virtual machines from disk to disk. I wonder if you can copy a Fedora virtual machine to a Windows system and then run it in VMWare player. I've seen that done for Ubuntu. Bob On 06/25/2009 12:11 PM, Gene Czarcinski wrote: > On Thursday 25 June 2009 10:28:50 Gerry Maddock wrote: > >> From: Gene Czarcinski >> >> >>> I am a newcomer to Fedora (linux) virtualization. However, I have >>> been a long >>> time user of VMware products running first on Red Hat Linux and then on >>> >> Fedora. >> >> >>> When I recently acquired a CPU with hardware virtualization support (AMD >>> Phenom II 940), I decided to "change my problem set" and give Fedora >>> Virtualization a try ... specifically qemu/kvm/etc. >>> >>> I use virtuals for three purposes: 1) To test software which might >>> >> destroy a >> >> >>> system or testing which requires a lot of re-booting. 2) For development >>> >>> environment to build rpm packages for various systems, i386/x86_64, etc. >>> >> 3) >> >> >>> To run windows. >>> >>> OK, install the virtualization packages and then install a simple Fedora >>> >> 11 >> >> >>> guest ... naturally it worked fine. >>> >>> Now lets get down to real business since I would be installing/running a >>> number of virtual systems. The first thing I found was that >>> configuration files, >>> disk images, etc. were scattered but mostly under /etc/libvirt and >>> /var/lib/libvirt. I looked for a runtime parameter which specified where >>> >>> things were to be stored but did not find anything. Furthermore, all of >>> >> this >> >> >>> stuff was in the root ("/") partition and, when I upgraded to the >>> next release, >>> a pain to bring across. >>> >>> I have three suggestions (I will put these in bugzilla as soon as >>> someone says >>> what package they should be filed against): >>> >>> 1. Put all files (disk images, configuration, etc.) under a single >>> >> directory >> >> >>> (easier to manage). >>> >>> 2. Provide a virtualization configuration parameter for setting the top >>> directory to be used to store virtualization files (make it easier to get >>> >>> things out of root). >>> >>> 3. Do not require DVD/CD ISO images to be in the image directory and do >>> >> not >> >> >>> screw with SELinux settings on ISO files. >>> >>> For those unfamiliar with it, this is more or less how VMware stuff >>> sets things >>> up. >>> >>> So much for wishful thinking, how do I make things easier (and get the >>> >> files >> >> >>> out of root)? >>> >>> OK, what I have come up with is to create a separate partition for all of >>> >> the >> >> >>> files and then "bind mount" it to /var/lib/libvirt and /etc/libvirt. >>> >>> Does this make sense? Is this going to work? Any other suggestions? >>> >> I have been using qemu-kvm pretty much since it was 1st released. All of my >> images have always defaulted to /var/lib/libvirt/images/ and have never >> been "scattered" or anywhere else such as /root. As far as I know CD/DVD >> ISO images could be stored where ever you wanted them (mine never default >> to /var/lib/libvirt/). Not sure by what you mean by: "and do not screw with >> SELinux settings on ISO files". >> > > OK, to properly state my "problem", I need to supply some additional info. > > 1. All of my Fedora systems are multiboot systems with a small (minimal > install) Fedora as a "boot selector" and system to define striped LVM logical > volumes (which anaconda does not support). Each system has at least two disk > drives (they are pretty cheap these days). There are multiple swap and /boot > partitions defined. The remainder of the disk space is put into a single LVM > volume group. > > 2. Basic rule: "do not screw with a working system!" ... Only do fresh > installs. NEVER upgrade. This was a hard lesson to learn but it keeps me out > of trouble,. > > 3. Each system has four /boot partitions and four "/" logical volumes (named > root1-4) ... think of these as old, current, next, and testing. /home and > other data are put into separate logical volumes. One of these separate > logical volumes has been used for VMware Virtuals. I keep what goes into a > "/" (commonly referred to as "root" in Unix/Linux) to just software, etc. for > a specific version of a system (e.g., Fedora 10, Fedora 11, Fedora 12, etc). I > expect all other stuff to be in separate partitions or LVM logical volumes > which I can mount on my new system. > > 4. After installing a "new" system such as when Fedora 12 is released, I want > to do a minimum of work copying over stuff from the old system to the new > system. > > 5. With the current "libvirt" setup I have disk images under > /var/lib/libvert/images and the guest's configuration under /etc/libvirt/qemu. > Furthermore, I now have an application which can chew up a lot of disk space > and all of it coming out of the "/" logical volume. I currently size my "/" > logical volumes to handle a lot of software plus a good amount of temporary > storage ... BUT I do not have 150GB "/" partitions/logical-volumes! > > 5. My current VMware virtuals take about 100GB of storage and I expect Fedora > Virtualization to need similar resources. It does not make any sense to me to > duplicate the storage for each version of the operating system I have > installed. > > Now, will mount-bind work? Does anyone have a better suggestion? Leaving it > as-is is not an option. > > As far as SELinux goes, I read (somewhere in documentation) that a) iso images > had to be under /var/lib/libvirt/images and that b) the SELinux context values > would be set to "virt_image_t". This may not be the way the software actual > works but this is what is described in some related documentation. > > Gene > > _______________________________________________ > Fedora-virt mailing list > Fedora-virt at redhat.com > https://www.redhat.com/mailman/listinfo/fedora-virt > > > From cochranb at speakeasy.net Thu Jun 25 17:13:08 2009 From: cochranb at speakeasy.net (Robert L Cochran) Date: Thu, 25 Jun 2009 13:13:08 -0400 Subject: [fedora-virt] Fedora virtualization -- comments and questions In-Reply-To: <200906251236.48098.gene@czarc.net> References: <200906251005.58498.gene@czarc.net> <200906251211.24571.gene@czarc.net> <20090625121752.13521gxzwh4r1vzk@www.sjolshagen.net> <200906251236.48098.gene@czarc.net> Message-ID: <4A43B024.5080707@speakeasy.net> On 06/25/2009 12:36 PM, Gene Czarcinski wrote: > On Thursday 25 June 2009 12:17:52 Thomas Sjolshagen wrote: > >> Quoting Gene Czarcinski: >> >>> As far as SELinux goes, I read (somewhere in documentation) that a) >>> iso images >>> had to be under /var/lib/libvirt/images and that b) the SELinux >>> context values >>> would be set to "virt_image_t". This may not be the way the software >>> actual works but this is what is described in some related documentation. >>> >> Considering the uniqueness of this setup, maybe it makes more sense to >> simply disable SELinux and thus avoid labeling issues altogether? >> > I DO NOT consider this an option. If things do not work with respect to > SELinux it is either a bug or I do not understand something. > These days, SELinux works so well that I can pretty much run in enforcing mode and not realize it -- it just works. I did have small problems with passing USB devices through to virtual guests, and some of the newer apps like puppet which are not virtualization related. I filed bugs. Dan Walsh responds to bug reports very quickly and often suggests a workaround fix. I can't really see SELinux as a big issue. Bob From gene at czarc.net Thu Jun 25 17:30:04 2009 From: gene at czarc.net (Gene Czarcinski) Date: Thu, 25 Jun 2009 13:30:04 -0400 Subject: [fedora-virt] Fedora virtualization -- comments and questions In-Reply-To: <4A43B024.5080707@speakeasy.net> References: <200906251005.58498.gene@czarc.net> <200906251236.48098.gene@czarc.net> <4A43B024.5080707@speakeasy.net> Message-ID: <200906251330.05126.gene@czarc.net> On Thursday 25 June 2009 13:13:08 Robert L Cochran wrote: > On 06/25/2009 12:36 PM, Gene Czarcinski wrote: > > On Thursday 25 June 2009 12:17:52 Thomas Sjolshagen wrote: > > > > > >> Quoting Gene Czarcinski: > >> > >> > >>> As far as SELinux goes, I read (somewhere in documentation) that a) > >>> iso images > >>> had to be under /var/lib/libvirt/images and that b) the SELinux > >>> context values > >>> would be set to "virt_image_t". This may not be the way the software > >>> actual works but this is what is described in some related > >>> documentation. > >> > >> Considering the uniqueness of this setup, maybe it makes more sense to > >> simply disable SELinux and thus avoid labeling issues altogether? > >> > > > > I DO NOT consider this an option. If things do not work with respect to > > SELinux it is either a bug or I do not understand something. > > > > These days, SELinux works so well that I can pretty much run in > enforcing mode and not realize it -- it just works. I did have small > problems with passing USB devices through to virtual guests, and some of > the newer apps like puppet which are not virtualization related. I filed > bugs. Dan Walsh responds to bug reports very quickly and often suggests > a workaround fix. I can't really see SELinux as a big issue. Agreed most emphatically!!! Someone suggesting turning off SELinux gets my blood pressure rising! Gene From jonathan.underwood at gmail.com Thu Jun 25 18:43:18 2009 From: jonathan.underwood at gmail.com (Jonathan Underwood) Date: Thu, 25 Jun 2009 19:43:18 +0100 Subject: [fedora-virt] F-11 libvirt no longer creating firewall/iptables rules for virtual network? Message-ID: <645d17210906251143p4f05eb95s477e1382273e9b57@mail.gmail.com> Hi there, I've recently installed F-11 and am having a problem with networking between the host and guest with the default network configuration - specifically that the iptables rules for virbr0 are not being inserted by libvirt as they used to be under F-10. I am using the default configuration of the firewall as shipped with F-11. The guest instance is a windowsXP image created under F-10 - I simply recreated the cconfig files by "creating" a new guest under virt-manager and pointing it to the disk image file. The guest boots up fine, but no networking. The output of iptables -L doesn't contain any reference to virbr0 or vnet0 (the latter automatically created when starting the guest OS) - I have confirmed virbr0 and vnet0 are present using ifconfig.. In case it's relevant this machine is using NetworkManager and has a single wired ethernet adapter configured with a static IP. Any suggestions on how I can debug further ? Thanks, jonathan From mbooth at redhat.com Fri Jun 26 10:44:37 2009 From: mbooth at redhat.com (Matthew Booth) Date: Fri, 26 Jun 2009 11:44:37 +0100 Subject: [fedora-virt] [PATCH] Cleanup XML output of virt-inspector Message-ID: <4A44A695.3010709@redhat.com> The attached patch makes some changes to the XML output of virt-inspector. Firstly, it changes the output code to use XML:Writer. This changes: * Single quotes for attributes become double quotes * All data is properly escaped * Indentation In practise, these should be invisible. It also changes the output semantically in 2 ways: * /operatingsystems/operatingsystem/os is renamed to /operatingsystems/operatingsystem/name * /operatingsystems/kernels/version becomes an attribute of /operatingsystems/kernel for consistency with initrds Are these changes likely to cause problems? Matt -- Matthew Booth, RHCA, RHCSS Red Hat Engineering, Virtualisation Team M: +44 (0)7977 267231 GPG ID: D33C3490 GPG FPR: 3733 612D 2D05 5458 8A8A 1600 3441 EA19 D33C 3490 -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: 0001-Clean-up-XML-output.patch URL: From rjones at redhat.com Sat Jun 27 13:32:33 2009 From: rjones at redhat.com (Richard W.M. Jones) Date: Sat, 27 Jun 2009 14:32:33 +0100 Subject: [fedora-virt] [PATCH] Add pipe support to guestfish Message-ID: <20090627133233.GA12063@amd.home.annexia.org> This patch adds support for pipes to guestfish, so you can pipe output from a guestfish command through a command on the host. The canonical example is: > hexdump /bin/ls | less Another example, looking for root backdoors in the password file: > cat /etc/passwd | awk -F: '$3 == 0 { print }' | grep -v ^root: Anything right of the first pipe symbol gets passed to the local shell, thus expansion, redirection and so on work on that. Rich. >From 57de1f4b17aba957ac18b64fccef66d2f21241d9 Mon Sep 17 00:00:00 2001 From: Richard W.M. Jones Date: Sat, 27 Jun 2009 15:00:48 +0200 Subject: [PATCH] Guestfish pipes. --- fish/fish.c | 86 +++++++++++++++++++++++++++++++++++++++++++++++---------- fish/fish.h | 2 +- fish/glob.c | 2 +- guestfish.pod | 26 +++++++++++++++++ 4 files changed, 99 insertions(+), 17 deletions(-) diff --git a/fish/fish.c b/fish/fish.c index 5e8a6e9..5b0a065 100644 --- a/fish/fish.c +++ b/fish/fish.c @@ -29,6 +29,8 @@ #include #include #include +#include +#include #ifdef HAVE_LIBREADLINE #include @@ -138,9 +140,15 @@ main (int argc, char *argv[]) struct mp *mp; char *p, *file = NULL; int c, inspector = 0; + struct sigaction sa; initialize_readline (); + memset (&sa, 0, sizeof sa); + sa.sa_handler = SIG_IGN; + sa.sa_flags = SA_RESTART; + sigaction (SIGPIPE, &sa, NULL); + /* guestfs_create is meant to be a lightweight operation, so * it's OK to do it early here. */ @@ -462,6 +470,8 @@ script (int prompt) "\n")); while (!quit) { + char *pipe = NULL; + exit_on_error = global_exit_on_error; buf = rl_gets (prompt); @@ -522,9 +532,8 @@ script (int prompt) /* Get the parameters. */ while (*p && i < sizeof argv / sizeof argv[0]) { - /* Parameters which start with quotes or square brackets - * are treated specially. Bare parameters are delimited - * by whitespace. + /* Parameters which start with quotes or pipes are treated + * specially. Bare parameters are delimited by whitespace. */ if (*p == '"') { p++; @@ -556,6 +565,10 @@ script (int prompt) } p[len] = '\0'; pend = p[len+1] ? &p[len+2] : &p[len+1]; + } else if (*p == '|') { + *p = '\0'; + pipe = p+1; + continue; /* } else if (*p == '[') { int c = 1; @@ -607,7 +620,7 @@ script (int prompt) argv[i] = NULL; got_command: - if (issue_command (cmd, argv) == -1) { + if (issue_command (cmd, argv, pipe) == -1) { if (exit_on_error) exit (1); } @@ -636,18 +649,51 @@ cmdline (char *argv[], int optind, int argc) optind++; if (optind == argc) { - if (issue_command (cmd, params) == -1) exit (1); + if (issue_command (cmd, params, NULL) == -1) exit (1); } else { argv[optind] = NULL; - if (issue_command (cmd, params) == -1) exit (1); + if (issue_command (cmd, params, NULL) == -1) exit (1); cmdline (argv, optind+1, argc); } } int -issue_command (const char *cmd, char *argv[]) +issue_command (const char *cmd, char *argv[], const char *pipecmd) { int argc; + int stdout_saved_fd = -1; + int pid = 0; + int r; + + /* For | ... commands. Annoyingly we can't use popen(3) here. */ + if (pipecmd) { + int fd[2]; + + fflush (stdout); + pipe (fd); + pid = fork (); + if (pid == -1) { + perror ("fork"); + return -1; + } + + if (pid == 0) { /* Child process. */ + close (fd[1]); + dup2 (fd[0], 0); + + r = system (pipecmd); + if (r == -1) { + perror (pipecmd); + _exit (1); + } + _exit (WEXITSTATUS (r)); + } + + stdout_saved_fd = dup (1); + close (fd[0]); + dup2 (fd[1], 1); + close (fd[1]); + } for (argc = 0; argv[argc] != NULL; ++argc) ; @@ -657,29 +703,39 @@ issue_command (const char *cmd, char *argv[]) list_commands (); else display_command (argv[0]); - return 0; + r = 0; } else if (strcasecmp (cmd, "quit") == 0 || strcasecmp (cmd, "exit") == 0 || strcasecmp (cmd, "q") == 0) { quit = 1; - return 0; + r = 0; } else if (strcasecmp (cmd, "alloc") == 0 || strcasecmp (cmd, "allocate") == 0) - return do_alloc (cmd, argc, argv); + r = do_alloc (cmd, argc, argv); else if (strcasecmp (cmd, "echo") == 0) - return do_echo (cmd, argc, argv); + r = do_echo (cmd, argc, argv); else if (strcasecmp (cmd, "edit") == 0 || strcasecmp (cmd, "vi") == 0 || strcasecmp (cmd, "emacs") == 0) - return do_edit (cmd, argc, argv); + r = do_edit (cmd, argc, argv); else if (strcasecmp (cmd, "lcd") == 0) - return do_lcd (cmd, argc, argv); + r = do_lcd (cmd, argc, argv); else if (strcasecmp (cmd, "glob") == 0) - return do_glob (cmd, argc, argv); + r = do_glob (cmd, argc, argv); else - return run_action (cmd, argc, argv); + r = run_action (cmd, argc, argv); + + if (pipecmd) { + fflush (stdout); + close (1); + dup2 (stdout_saved_fd, 1); + close (stdout_saved_fd); + waitpid (pid, NULL, 0); + } + + return r; } void diff --git a/fish/fish.h b/fish/fish.h index 8815807..8f57595 100644 --- a/fish/fish.h +++ b/fish/fish.h @@ -34,7 +34,7 @@ extern guestfs_h *g; extern int quit; extern int verbose; -extern int issue_command (const char *cmd, char *argv[]); +extern int issue_command (const char *cmd, char *argv[], const char *pipe); extern void pod2text (const char *heading, const char *body); extern void list_builtin_commands (void); extern void display_builtin_command (const char *cmd); diff --git a/fish/glob.c b/fish/glob.c index f20da84..a8ac58a 100644 --- a/fish/glob.c +++ b/fish/glob.c @@ -147,7 +147,7 @@ glob_issue (char *cmd, int argc, } printf ("\n"); - if (issue_command (argv[0], &argv[1]) == -1) + if (issue_command (argv[0], &argv[1], NULL) == -1) *r = -1; /* ... but don't exit */ for (i = argc-1; i >= 1; --i) { diff --git a/guestfish.pod b/guestfish.pod index 0870b9e..26312fe 100644 --- a/guestfish.pod +++ b/guestfish.pod @@ -282,6 +282,32 @@ will create a directory C on the host, and then export the contents of C on the mounted filesystem to C. (See C). +=head1 PIPES + +Use CspaceE | command> to pipe the output of the +first command (a guestfish command) to the second command (any host +command). For example: + + cat /etc/passwd | awk -F: '$3 == 0 { print }' + +(where C is the guestfish cat command, but C is the host awk +program). The above command would list all accounts in the guest +filesystem which have UID 0, ie. root accounts including backdoors. +Other examples: + + hexdump /bin/ls | head + list-devices | tail -1 + +The space before the pipe symbol is required, any space after the pipe +symbol is optional. Everything after the pipe symbol is just passed +straight to the host shell, so it can contain redirections, globs and +anything else that makes sense on the host side. + +To use a literal argument which begins with a pipe symbol, you have +to quote it, eg: + + echo "|" + =head1 EXIT ON ERROR BEHAVIOUR By default, guestfish will ignore any errors when in interactive mode -- 1.6.2.2 -- Richard Jones, Emerging Technologies, Red Hat http://et.redhat.com/~rjones virt-df lists disk usage of guests without needing to install any software inside the virtual machine. Supports Linux and Windows. http://et.redhat.com/~rjones/virt-df/ From rjones at redhat.com Sat Jun 27 13:35:24 2009 From: rjones at redhat.com (Richard W.M. Jones) Date: Sat, 27 Jun 2009 14:35:24 +0100 Subject: [fedora-virt] [PATCH] Cleanup XML output of virt-inspector In-Reply-To: <4A44A695.3010709@redhat.com> References: <4A44A695.3010709@redhat.com> Message-ID: <20090627133524.GB12063@amd.home.annexia.org> On Fri, Jun 26, 2009 at 11:44:37AM +0100, Matthew Booth wrote: [...] The patch makes a lot of sense ... > @@ -30,6 +30,7 @@ eval "use Sys::Virt;"; > eval "use XML::XPath;"; > eval "use XML::XPath::XMLParser;"; > eval "use YAML::Any;"; > +eval "use XML::Writer;"; Is it worth making this module required? Rich. -- Richard Jones, Emerging Technologies, Red Hat http://et.redhat.com/~rjones Read my programming blog: http://rwmj.wordpress.com Fedora now supports 75 OCaml packages (the OPEN alternative to F#) http://cocan.org/getting_started_with_ocaml_on_red_hat_and_fedora From dlbewley at lib.ucdavis.edu Sat Jun 27 16:21:33 2009 From: dlbewley at lib.ucdavis.edu (Dale Bewley) Date: Sat, 27 Jun 2009 09:21:33 -0700 Subject: [fedora-virt] F-11 libvirt no longer creating firewall/iptables rules for virtual network? In-Reply-To: <645d17210906251143p4f05eb95s477e1382273e9b57@mail.gmail.com> References: <645d17210906251143p4f05eb95s477e1382273e9b57@mail.gmail.com> Message-ID: <1246119693.2754.24.camel@seitan.home.bewley.net> On Thu, 2009-06-25 at 19:43 +0100, Jonathan Underwood wrote: > Hi there, > > I've recently installed F-11 and am having a problem with networking > between the host and guest with the default network configuration - > specifically that the iptables rules for virbr0 are not being inserted > by libvirt as they used to be under F-10. > > I am using the default configuration of the firewall as shipped with > F-11. The guest instance is a windowsXP image created under F-10 - I > simply recreated the cconfig files by "creating" a new guest under > virt-manager and pointing it to the disk image file. The guest boots > up fine, but no networking. The output of iptables -L doesn't contain > any reference to virbr0 or vnet0 (the latter automatically created > when starting the guest OS) - I have confirmed virbr0 and vnet0 are > present using ifconfig.. In case it's relevant this machine is using > NetworkManager and has a single wired ethernet adapter configured with > a static IP. > > Any suggestions on how I can debug further ? # iptables --line-numbers -L -v -n # chkconfig libvirtd --list # virsh net-list --all Name State Autostart ----------------------------------------- default active yes # virsh net-destroy default # virsh net-start default # virsh help |grep net attach-interface attach network interface detach-interface detach network interface domifstat get network interface stats for a domain net-autostart autostart a network net-create create a network from an XML file net-define define (but don't start) a network from an XML file net-destroy destroy a network net-dumpxml network information in XML net-edit edit XML configuration for a network net-list list networks net-name convert a network UUID to network name net-start start a (previously defined) inactive network net-undefine undefine an inactive network net-uuid convert a network name to network UUID The rules that should be inserted are found in /var/lib/libvirt/iptables. From rjones at redhat.com Sun Jun 28 21:21:55 2009 From: rjones at redhat.com (Richard W.M. Jones) Date: Sun, 28 Jun 2009 22:21:55 +0100 Subject: [fedora-virt] [PATCH] Add pipe support to guestfish In-Reply-To: <20090627133233.GA12063@amd.home.annexia.org> References: <20090627133233.GA12063@amd.home.annexia.org> Message-ID: <20090628212155.GA26374@amd.home.annexia.org> I applied this branch since no one shouted. It seems to work fine for me, and looks like a useful addition, but if it has any negative effects on command line usage we can revert it easily before the next release. Rich. -- Richard Jones, Emerging Technologies, Red Hat http://et.redhat.com/~rjones virt-p2v converts physical machines to virtual machines. Boot with a live CD or over the network (PXE) and turn machines into Xen guests. http://et.redhat.com/~rjones/virt-p2v From kraxel at redhat.com Mon Jun 29 10:41:25 2009 From: kraxel at redhat.com (Gerd Hoffmann) Date: Mon, 29 Jun 2009 12:41:25 +0200 Subject: [fedora-virt] default tftp root dir in virt-manager or qemu? In-Reply-To: <20090623204458.GB4895@redhat.com> References: <561c252c0906151028o7f28100fp1f149128b0b1e38f@mail.gmail.com> <1245775812.20511.28.camel@blaa> <20090623204458.GB4895@redhat.com> Message-ID: <4A489A55.3080403@redhat.com> On 06/23/09 22:44, Daniel P. Berrange wrote: > On Tue, Jun 23, 2009 at 04:50:12PM +0000, Mark McLoughlin wrote: >> Hey, >> >> >> --enable-tftp --tftp-root=/var/lib/libvirt/tftp \ >> --dhcp-boot=pxelinux.0 > I really question what the point in going to setup a PXE server install > on each individual host OS is. None. You might want to use the install server which is somewhere in your network though, i.e. something like this: cheers, Gerd From markmc at redhat.com Mon Jun 29 10:19:53 2009 From: markmc at redhat.com (Mark McLoughlin) Date: Mon, 29 Jun 2009 11:19:53 +0100 Subject: [fedora-virt] USB passthrough Message-ID: <1246270793.11688.5.camel@blaa> Hey, At FUDCon yesterday, Paul asked me about how to get KVM USB device passthrough working and I had to admit I'd never tried it. So, after some poking with F-11, here's what I found: 1) You need selinux-policy-targeted-3.6.12-55.fc11 or later 2) Make sure the virt_use_usb SELinux boolean is enabled, which it should be by default: $> getsebool virt_use_usb virt_use_usb --> on $> setsebool -P virt_use_usb on 3) Plug your device in, and if it's a USB mass storage device, make sure it's not mounted in the host 4) In virt-manager, open the VM window, go to the details tap, clock 'Add hardware', select 'Phyiscal host device', choose 'USB device', then the device you wish to passthrough 5) Take a peek at the device in the guest XML config $> virsh dumpxml xp ... ... 6) Start the guest and check whether the guest can see it. If not, check /var/log/libvirt/qemu/$guest.log because qemu will happily start up even if the device cannot be assigned. 7) It sucks that the device has to be plugged in before you start the guest; qemu now has a "autoconnect" mode which probably makes sense for libvirt to use by default, see bug #508645 Cheers, Mark. From loganjerry at gmail.com Mon Jun 29 17:38:59 2009 From: loganjerry at gmail.com (Jerry James) Date: Mon, 29 Jun 2009 11:38:59 -0600 Subject: [fedora-virt] Disk device performance in F11 Message-ID: <870180fe0906291038x1fa01051ude4f6ca477c82fe8@mail.gmail.com> I'm having a problem with a virtual machine created on an F-11 host that I didn't have with an F-10 host, and I'm wondering if I've misconfigured something or missed a trick somewhere. I'm doing some custom Linux kernel work for my employer, and I'm using a small collection of virtual machines to test it. In the short time I've had F-11 on my host machine, I've seen that virtual disk performance is noticeably worse than it was with F-10. My virtual machines regularly spew soft lockup messages to the system log, always with backtraces that show the process is being starved of the disk. The tests put a lot of stress on the disk, because this custom kernel work is going to help some overloaded servers deal with the load. It's actually working pretty well on the real machines with real disks, but with the upgrade to F-11, my test VMs have become almost useless for testing further development work. Before I take the drastic step of rolling back to F-10, what factors affect the virtual disk performance? I created both the F-10 and F-11 machines with virt-manager, if that matters. Thanks, -- Jerry James http://www.jamezone.org/ From markmc at redhat.com Mon Jun 29 19:32:36 2009 From: markmc at redhat.com (Mark McLoughlin) Date: Mon, 29 Jun 2009 20:32:36 +0100 Subject: [fedora-virt] ANNOUNCE: Rawhide virt repo for F11 users In-Reply-To: <1244197459.27876.0.camel@blaa> References: <1242754355.9151.8.camel@blaa> <1242913633.28844.46.camel@blaa> <1244034684.5001.134.camel@blaa> <1244046483.5001.180.camel@blaa> <1244197459.27876.0.camel@blaa> Message-ID: <1246303956.11688.148.camel@blaa> Hi, Latest update to virt-preview repo: * Sat Jun 27 2009 Mark McLoughlin - 2:0.10.50-7.kvm87 - Update to kvm-87 - Drop upstreamed patches - Cherry-pick new ppc build fix from upstream - Work around broken linux-user build on ppc - Fix hw/pcspk.c build with --disable-kvm - Re-enable preadv()/pwritev() since #497429 is long since fixed - Kill petalogix-s3adsp1800.dtb, since we don't ship the microblaze target Cheers, Mark. From cochranb at speakeasy.net Mon Jun 29 20:32:33 2009 From: cochranb at speakeasy.net (Robert L Cochran) Date: Mon, 29 Jun 2009 16:32:33 -0400 Subject: [fedora-virt] USB passthrough In-Reply-To: <1246270793.11688.5.camel@blaa> References: <1246270793.11688.5.camel@blaa> Message-ID: <4A4924E1.7060109@speakeasy.net> This is precisely what I brought up on this list weeks ago -- USB device pass through. Thanks to work done by Mark and also Dan Walsh, I'm succeeding with something called a USB BUB developed by Paul Badger of moderndevice.com and Brian Riley of wulfden.org. The BUB is essentially an FTDI FT232RL-based uart. I use it to program my Freeduino devices, which I purchase as kits from Brian. I expect to pass other USB devices through to my Ubuntu guest as well. Thanks again to Mark and Dan for the fantastic support when I both complained and filed a bug related to USB device passthrough. Bob Cochran On 06/29/2009 06:19 AM, Mark McLoughlin wrote: > Hey, > > At FUDCon yesterday, Paul asked me about how to get KVM USB device > passthrough working and I had to admit I'd never tried it. > > So, after some poking with F-11, here's what I found: > > 1) You need selinux-policy-targeted-3.6.12-55.fc11 or later > > 2) Make sure the virt_use_usb SELinux boolean is enabled, which it > should be by default: > > $> getsebool virt_use_usb > virt_use_usb --> on > $> setsebool -P virt_use_usb on > > 3) Plug your device in, and if it's a USB mass storage device, make > sure it's not mounted in the host > > 4) In virt-manager, open the VM window, go to the details tap, > clock 'Add hardware', select 'Phyiscal host device', choose > 'USB device', then the device you wish to passthrough > > 5) Take a peek at the device in the guest XML config > > $> virsh dumpxml xp > ... > > ... > > > > > > > > > 6) Start the guest and check whether the guest can see it. If not, > check /var/log/libvirt/qemu/$guest.log because qemu will happily > start up even if the device cannot be assigned. > > 7) It sucks that the device has to be plugged in before you start > the guest; qemu now has a "autoconnect" mode which probably > makes sense for libvirt to use by default, see bug #508645 > > Cheers, > Mark. > > _______________________________________________ > Fedora-virt mailing list > Fedora-virt at redhat.com > https://www.redhat.com/mailman/listinfo/fedora-virt > > > From cochranb at speakeasy.net Mon Jun 29 20:40:11 2009 From: cochranb at speakeasy.net (Robert L Cochran) Date: Mon, 29 Jun 2009 16:40:11 -0400 Subject: [fedora-virt] default tftp root dir in virt-manager or qemu? In-Reply-To: <4A489A55.3080403@redhat.com> References: <561c252c0906151028o7f28100fp1f149128b0b1e38f@mail.gmail.com> <1245775812.20511.28.camel@blaa> <20090623204458.GB4895@redhat.com> <4A489A55.3080403@redhat.com> Message-ID: <4A4926AB.8010605@speakeasy.net> Are you guys looking at the cobbler and koan products supported by Michael DeHaan and discussed on the cobbler mailing list cobbler at lists.fedorahosted.org I spent much of yesterday setting up cobbler and while I'm not sure I have it fully working for non-virtualized installs, I know that a Cobbler-supported PXE boot interface comes up on one of my test laptops when I try to pxe boot. I have not yet completed my first cobbler- or koan-based installs, though. Bob Cochran On 06/29/2009 06:41 AM, Gerd Hoffmann wrote: > On 06/23/09 22:44, Daniel P. Berrange wrote: >> On Tue, Jun 23, 2009 at 04:50:12PM +0000, Mark McLoughlin wrote: >>> Hey, > >>> >>> > >>> --enable-tftp --tftp-root=/var/lib/libvirt/tftp \ >>> --dhcp-boot=pxelinux.0 > >> I really question what the point in going to setup a PXE server install >> on each individual host OS is. > > None. You might want to use the install server which is somewhere in > your network though, i.e. something like this: > > > > cheers, > Gerd > > _______________________________________________ > Fedora-virt mailing list > Fedora-virt at redhat.com > https://www.redhat.com/mailman/listinfo/fedora-virt > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From agx at sigxcpu.org Mon Jun 29 22:18:30 2009 From: agx at sigxcpu.org (Guido =?iso-8859-1?Q?G=FCnther?=) Date: Tue, 30 Jun 2009 00:18:30 +0200 Subject: [fedora-virt] [RFC/PATCH] libguestfs: build Debian based appliance In-Reply-To: <20090616221105.GA1608@bogon.sigxcpu.org> References: <20090616221105.GA1608@bogon.sigxcpu.org> Message-ID: <20090629221830.GA2843@bogon.sigxcpu.org> Hi Rich, On Wed, Jun 17, 2009 at 12:11:05AM +0200, Guido G?nther wrote: > Hi Rich, > attached patches allows to build the appliance based on Debian (or any > Debian based distribution supported by debirf) by using e.g.: > > ./configure --with-repo=squeeze --with-mirror=http://apt:9999/debian > > Please note that the third patch isn't to be applied yet, it simply > overwrites the contents of make/update.sh.in with the stuff we need for > Debian. Also when building a fixed (#509381) debirf is needed which has > just been uploded to unstable. Attched are three more patches to get things further: The first once sets DIST=DEBIAN or DIST=REDHAT if using debootstrap or febootstrap respectively. This allows us to set distro specific package lists as discussed at Fudcon. The second one checks for udev and uses that instead of doing everything by hand. This significantly speeds up booting of the appliance since each MAKEDEV call tages ages here and simplifies the code since we don't need any device probing. The third one explicitly sets the device type of attached disk to SCSI, otherwise the tests end up as hda with my version of qemu. Since future versions might pick virtio by default this is probaly safer anyway. Can these be applied? Cheers, -- Guido -------------- next part -------------- A non-text attachment was scrubbed... Name: 0001-define-REDHAT-and-DEBIAN.patch Type: text/x-diff Size: 2232 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: 0002-use-udev-if-available.patch Type: text/x-diff Size: 2409 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: 0003-explicitly-set-if-scsi.patch Type: text/x-diff Size: 1046 bytes Desc: not available URL: From dlaor at redhat.com Tue Jun 30 06:31:01 2009 From: dlaor at redhat.com (Dor Laor) Date: Tue, 30 Jun 2009 09:31:01 +0300 Subject: [fedora-virt] Disk device performance in F11 In-Reply-To: <870180fe0906291038x1fa01051ude4f6ca477c82fe8@mail.gmail.com> References: <870180fe0906291038x1fa01051ude4f6ca477c82fe8@mail.gmail.com> Message-ID: <4A49B125.8080509@redhat.com> On 06/29/2009 08:38 PM, Jerry James wrote: > I'm having a problem with a virtual machine created on an F-11 host > that I didn't have with an F-10 host, and I'm wondering if I've > misconfigured something or missed a trick somewhere. I'm doing some > custom Linux kernel work for my employer, and I'm using a small > collection of virtual machines to test it. In the short time I've had > F-11 on my host machine, I've seen that virtual disk performance is > noticeably worse than it was with F-10. My virtual machines regularly > spew soft lockup messages to the system log, always with backtraces > that show the process is being starved of the disk. The tests put a > lot of stress on the disk, because this custom kernel work is going to > help some overloaded servers deal with the load. > > It's actually working pretty well on the real machines with real > disks, but with the upgrade to F-11, my test VMs have become almost > useless for testing further development work. Before I take the > drastic step of rolling back to F-10, what factors affect the virtual > disk performance? > > I created both the F-10 and F-11 machines with virt-manager, if that matters. > > Thanks, It might be due to different image caching defaults. Can you grab the current command line of qemu and change -drive file=xxxx,..,cache=writeback and retest? From rjones at redhat.com Tue Jun 30 07:48:36 2009 From: rjones at redhat.com (Richard W.M. Jones) Date: Tue, 30 Jun 2009 08:48:36 +0100 Subject: [fedora-virt] [RFC/PATCH] libguestfs: build Debian based appliance In-Reply-To: <20090629221830.GA2843@bogon.sigxcpu.org> References: <20090616221105.GA1608@bogon.sigxcpu.org> <20090629221830.GA2843@bogon.sigxcpu.org> Message-ID: <20090630074836.GA3201@amd.home.annexia.org> On Tue, Jun 30, 2009 at 12:18:30AM +0200, Guido G?nther wrote: > Hi Rich, > On Wed, Jun 17, 2009 at 12:11:05AM +0200, Guido G?nther wrote: > > Hi Rich, > > attached patches allows to build the appliance based on Debian (or any > > Debian based distribution supported by debirf) by using e.g.: > > > > ./configure --with-repo=squeeze --with-mirror=http://apt:9999/debian > > > > Please note that the third patch isn't to be applied yet, it simply > > overwrites the contents of make/update.sh.in with the stuff we need for > > Debian. Also when building a fixed (#509381) debirf is needed which has > > just been uploded to unstable. > Attched are three more patches to get things further: > > The first once sets DIST=DEBIAN or DIST=REDHAT if using debootstrap or > febootstrap respectively. This allows us to set distro specific package > lists as discussed at Fudcon. > > The second one checks for udev and uses that instead of doing everything > by hand. This significantly speeds up booting of the appliance since > each MAKEDEV call tages ages here and simplifies the code since we don't > need any device probing. > > The third one explicitly sets the device type of attached disk to SCSI, > otherwise the tests end up as hda with my version of qemu. Since future > versions might pick virtio by default this is probaly safer anyway. > > Can these be applied? All three patches look good. I'll apply them later on today. Rich. -- Richard Jones, Emerging Technologies, Red Hat http://et.redhat.com/~rjones Read my programming blog: http://rwmj.wordpress.com Fedora now supports 75 OCaml packages (the OPEN alternative to F#) http://cocan.org/getting_started_with_ocaml_on_red_hat_and_fedora From rjones at redhat.com Tue Jun 30 09:01:59 2009 From: rjones at redhat.com (Richard W.M. Jones) Date: Tue, 30 Jun 2009 10:01:59 +0100 Subject: [fedora-virt] [RFC/PATCH] libguestfs: build Debian based appliance In-Reply-To: <20090629221830.GA2843@bogon.sigxcpu.org> References: <20090616221105.GA1608@bogon.sigxcpu.org> <20090629221830.GA2843@bogon.sigxcpu.org> Message-ID: <20090630090159.GB3201@amd.home.annexia.org> On Tue, Jun 30, 2009 at 12:18:30AM +0200, Guido G?nther wrote: > The first once sets DIST=DEBIAN or DIST=REDHAT if using debootstrap or > febootstrap respectively. This allows us to set distro specific package > lists as discussed at Fudcon. OK, I pushed this one as is: http://git.et.redhat.com/?p=libguestfs.git;a=commitdiff;h=b4fade6392ccb2961f0d7e2bf45dfc2e20333aed > The second one checks for udev and uses that instead of doing everything > by hand. This significantly speeds up booting of the appliance since > each MAKEDEV call tages ages here and simplifies the code since we don't > need any device probing. I modified your patch slightly to add Fedora udev support. As you say, it works better than doing explicit MAKEDEVs: http://git.et.redhat.com/?p=libguestfs.git;a=commitdiff;h=284797c1561e5e089986027d469bd16ee1a983df > The third one explicitly sets the device type of attached disk to SCSI, > otherwise the tests end up as hda with my version of qemu. Since future > versions might pick virtio by default this is probaly safer anyway. This one is a bit of trouble. It broke Fedora support, but I think was just because the sym53c8xx.ko module was missing from my appliance. I'm going to try with that. I'm slightly doubtful about what is going on here, because the tests are *supposed* to deal with the case where devices are named /dev/hda etc. See: http://libguestfs.org/guestfs.3.html#block_device_naming However your patch could be an improvement if it means that devices are always named /dev/sd*, even on our older versions of RHEL. Rich. -- Richard Jones, Emerging Technologies, Red Hat http://et.redhat.com/~rjones virt-top is 'top' for virtual machines. Tiny program with many powerful monitoring features, net stats, disk stats, logging, etc. http://et.redhat.com/~rjones/virt-top From agx at sigxcpu.org Tue Jun 30 10:19:33 2009 From: agx at sigxcpu.org (Guido =?iso-8859-1?Q?G=FCnther?=) Date: Tue, 30 Jun 2009 12:19:33 +0200 Subject: [fedora-virt] [RFC/PATCH] libguestfs: build Debian based appliance In-Reply-To: <20090630090159.GB3201@amd.home.annexia.org> References: <20090616221105.GA1608@bogon.sigxcpu.org> <20090629221830.GA2843@bogon.sigxcpu.org> <20090630090159.GB3201@amd.home.annexia.org> Message-ID: <20090630101933.GA8676@bogon.sigxcpu.org> Hi Rich, On Tue, Jun 30, 2009 at 10:01:59AM +0100, Richard W.M. Jones wrote: > On Tue, Jun 30, 2009 at 12:18:30AM +0200, Guido G?nther wrote: > > The first once sets DIST=DEBIAN or DIST=REDHAT if using debootstrap or > > febootstrap respectively. This allows us to set distro specific package > > lists as discussed at Fudcon. > > OK, I pushed this one as is: > > http://git.et.redhat.com/?p=libguestfs.git;a=commitdiff;h=b4fade6392ccb2961f0d7e2bf45dfc2e20333aed Thanks. > > The second one checks for udev and uses that instead of doing everything > > by hand. This significantly speeds up booting of the appliance since > > each MAKEDEV call tages ages here and simplifies the code since we don't > > need any device probing. > > I modified your patch slightly to add Fedora udev support. As you > say, it works better than doing explicit MAKEDEVs: > > http://git.et.redhat.com/?p=libguestfs.git;a=commitdiff;h=284797c1561e5e089986027d469bd16ee1a983df Even better. Thanks. > > The third one explicitly sets the device type of attached disk to SCSI, > > otherwise the tests end up as hda with my version of qemu. Since future > > versions might pick virtio by default this is probaly safer anyway. > > This one is a bit of trouble. It broke Fedora support, but I think > was just because the sym53c8xx.ko module was missing from my > appliance. I'm going to try with that. Attached patch has what I came up with to support most of QEMUs hardware as used by the appliance. > > I'm slightly doubtful about what is going on here, because the tests > are *supposed* to deal with the case where devices are named /dev/hda > etc. See: > > http://libguestfs.org/guestfs.3.html#block_device_naming > > However your patch could be an improvement if it means that devices > are always named /dev/sd*, even on our older versions of RHEL. The problem here is that the "blockdev /dev/sda" call fails since sda is missing completely with udev. Without having looked at this further I assume that libguestfs internally expects the blockdev call to succeed since it assumes /dev/sda is there due to static device node creation. However if we switch to if=scsi this will work anyways. Cheers, -- Guido -------------- next part -------------- A non-text attachment was scrubbed... Name: 0001-whitelist-kernel-modules-for-hardware-emulated-by-QE.patch Type: text/x-diff Size: 817 bytes Desc: not available URL: From rjones at redhat.com Tue Jun 30 11:31:33 2009 From: rjones at redhat.com (Richard W.M. Jones) Date: Tue, 30 Jun 2009 12:31:33 +0100 Subject: [fedora-virt] [RFC/PATCH] libguestfs: build Debian based appliance In-Reply-To: <20090630101933.GA8676@bogon.sigxcpu.org> References: <20090616221105.GA1608@bogon.sigxcpu.org> <20090629221830.GA2843@bogon.sigxcpu.org> <20090630090159.GB3201@amd.home.annexia.org> <20090630101933.GA8676@bogon.sigxcpu.org> Message-ID: <20090630113133.GA6776@amd.home.annexia.org> On Tue, Jun 30, 2009 at 12:19:33PM +0200, Guido G?nther wrote: > Hi Rich, > On Tue, Jun 30, 2009 at 10:01:59AM +0100, Richard W.M. Jones wrote: > > This one is a bit of trouble. It broke Fedora support, but I think > > was just because the sym53c8xx.ko module was missing from my > > appliance. I'm going to try with that. > Attached patch has what I came up with to support most of QEMUs hardware > as used by the appliance. [...] > The problem here is that the "blockdev /dev/sda" call fails since sda is > missing completely with udev. Without having looked at this further I > assume that libguestfs internally expects the blockdev call to succeed > since it assumes /dev/sda is there due to static device node creation. > However if we switch to if=scsi this will work anyways. Actually the problem was just down to the devices taking a long time to initialize. We would need to call/load 'scsi_wait_scan.ko' and use 'udevadm settle'. I think, however, we should just use virtio (virtio_blk.ko). This is faster, more reliable, and available everywhere we care about. Rich. -- Richard Jones, Emerging Technologies, Red Hat http://et.redhat.com/~rjones Read my programming blog: http://rwmj.wordpress.com Fedora now supports 75 OCaml packages (the OPEN alternative to F#) http://cocan.org/getting_started_with_ocaml_on_red_hat_and_fedora From agx at sigxcpu.org Tue Jun 30 11:37:43 2009 From: agx at sigxcpu.org (Guido =?iso-8859-1?Q?G=FCnther?=) Date: Tue, 30 Jun 2009 13:37:43 +0200 Subject: [fedora-virt] [RFC/PATCH] libguestfs: build Debian based appliance In-Reply-To: <20090630113133.GA6776@amd.home.annexia.org> References: <20090616221105.GA1608@bogon.sigxcpu.org> <20090629221830.GA2843@bogon.sigxcpu.org> <20090630090159.GB3201@amd.home.annexia.org> <20090630101933.GA8676@bogon.sigxcpu.org> <20090630113133.GA6776@amd.home.annexia.org> Message-ID: <20090630113743.GA6584@bogon.sigxcpu.org> On Tue, Jun 30, 2009 at 12:31:33PM +0100, Richard W.M. Jones wrote: > On Tue, Jun 30, 2009 at 12:19:33PM +0200, Guido G?nther wrote: > > Hi Rich, > > On Tue, Jun 30, 2009 at 10:01:59AM +0100, Richard W.M. Jones wrote: > > > This one is a bit of trouble. It broke Fedora support, but I think > > > was just because the sym53c8xx.ko module was missing from my > > > appliance. I'm going to try with that. > > Attached patch has what I came up with to support most of QEMUs hardware > > as used by the appliance. > [...] > > The problem here is that the "blockdev /dev/sda" call fails since sda is > > missing completely with udev. Without having looked at this further I > > assume that libguestfs internally expects the blockdev call to succeed > > since it assumes /dev/sda is there due to static device node creation. > > However if we switch to if=scsi this will work anyways. > > Actually the problem was just down to the devices taking a long time > to initialize. We would need to call/load 'scsi_wait_scan.ko' and > use 'udevadm settle'. > > I think, however, we should just use virtio (virtio_blk.ko). This is > faster, more reliable, and available everywhere we care about. Sure. I'm fine with that. However including the other modules for SCSI/IDE won't hurt IMHO (they don't take up much space), this can be helpful for testing the appliance. Cheers, -- Guido From sven at lank.es Tue Jun 30 11:48:53 2009 From: sven at lank.es (Sven Lankes) Date: Tue, 30 Jun 2009 13:48:53 +0200 Subject: [fedora-virt] USB passthrough In-Reply-To: <1246270793.11688.5.camel@blaa> References: <1246270793.11688.5.camel@blaa> Message-ID: <20090630114853.GC24585@killefiz> On Mon, Jun 29, 2009 at 11:19:53AM +0100, Mark McLoughlin wrote: > At FUDCon yesterday, Paul asked me about how to get KVM USB device > passthrough working and I had to admit I'd never tried it. > So, after some poking with F-11, here's what I found: Keep in mind that kvm currently only supports USB1.1 for forwarding to the guest. Some devices (especially current iphones/ipods) need USB2 to work. -- sven === jabber/xmpp: sven at lankes.net From rjones at redhat.com Tue Jun 30 12:29:23 2009 From: rjones at redhat.com (Richard W.M. Jones) Date: Tue, 30 Jun 2009 13:29:23 +0100 Subject: [fedora-virt] [RFC/PATCH] libguestfs: build Debian based appliance In-Reply-To: <20090630113743.GA6584@bogon.sigxcpu.org> References: <20090616221105.GA1608@bogon.sigxcpu.org> <20090629221830.GA2843@bogon.sigxcpu.org> <20090630090159.GB3201@amd.home.annexia.org> <20090630101933.GA8676@bogon.sigxcpu.org> <20090630113133.GA6776@amd.home.annexia.org> <20090630113743.GA6584@bogon.sigxcpu.org> Message-ID: <20090630122923.GB6776@amd.home.annexia.org> On Tue, Jun 30, 2009 at 01:37:43PM +0200, Guido G?nther wrote: > However including the other modules for > SCSI/IDE won't hurt IMHO (they don't take up much space), this can be > helpful for testing the appliance. I agree - I'll apply that patch shortly. Rich. -- Richard Jones, Emerging Technologies, Red Hat http://et.redhat.com/~rjones virt-df lists disk usage of guests without needing to install any software inside the virtual machine. Supports Linux and Windows. http://et.redhat.com/~rjones/virt-df/ From frankly3d at gmail.com Tue Jun 30 12:37:22 2009 From: frankly3d at gmail.com (Frank Murphy) Date: Tue, 30 Jun 2009 13:37:22 +0100 Subject: [fedora-virt] USB passthrough In-Reply-To: <20090630114853.GC24585@killefiz> References: <1246270793.11688.5.camel@blaa> <20090630114853.GC24585@killefiz> Message-ID: <4A4A0702.3020704@gmail.com> On 30/06/09 12:48, Sven Lankes wrote: > > Keep in mind that kvm currently only supports USB1.1 for forwarding > to the guest. Some devices (especially current iphones/ipods) need > USB2 to work. > But is USB2 being worked on Upstream? Frank From rjones at redhat.com Tue Jun 30 12:56:09 2009 From: rjones at redhat.com (Richard W.M. Jones) Date: Tue, 30 Jun 2009 13:56:09 +0100 Subject: [fedora-virt] [RFC/PATCH] libguestfs: build Debian based appliance In-Reply-To: <20090630090159.GB3201@amd.home.annexia.org> References: <20090616221105.GA1608@bogon.sigxcpu.org> <20090629221830.GA2843@bogon.sigxcpu.org> <20090630090159.GB3201@amd.home.annexia.org> Message-ID: <20090630125609.GA7120@amd.home.annexia.org> On Tue, Jun 30, 2009 at 10:01:59AM +0100, Richard W.M. Jones wrote: > I'm slightly doubtful about what is going on here, because the tests > are *supposed* to deal with the case where devices are named /dev/hda > etc. See: > > http://libguestfs.org/guestfs.3.html#block_device_naming OK, I understand what was happening here. The device name translation stuff mentioned at the link above relied on the (pre-udev) case where the /dev/sd* nodes would exist, but upon opening them you'd get ENXIO. With udev, the device nodes no longer exist, so we get ENOENT. The simple patch below should fix that case. Rich. -- Richard Jones, Emerging Technologies, Red Hat http://et.redhat.com/~rjones Read my programming blog: http://rwmj.wordpress.com Fedora now supports 75 OCaml packages (the OPEN alternative to F#) http://cocan.org/getting_started_with_ocaml_on_red_hat_and_fedora -------------- next part -------------- diff --git a/daemon/guestfsd.c b/daemon/guestfsd.c index 7eabbd4..0a3e64f 100644 --- a/daemon/guestfsd.c +++ b/daemon/guestfsd.c @@ -714,7 +714,7 @@ device_name_translation (char *device, const char *func) return 0; } - if (errno != ENXIO) { + if (errno != ENXIO && errno != ENOENT) { error: reply_with_perror ("%s: %s", func, device); return -1; From rjones at redhat.com Tue Jun 30 12:58:30 2009 From: rjones at redhat.com (Richard W.M. Jones) Date: Tue, 30 Jun 2009 13:58:30 +0100 Subject: [fedora-virt] default tftp root dir in virt-manager or qemu? In-Reply-To: <4A4926AB.8010605@speakeasy.net> References: <561c252c0906151028o7f28100fp1f149128b0b1e38f@mail.gmail.com> <1245775812.20511.28.camel@blaa> <20090623204458.GB4895@redhat.com> <4A489A55.3080403@redhat.com> <4A4926AB.8010605@speakeasy.net> Message-ID: <20090630125830.GB7120@amd.home.annexia.org> On Mon, Jun 29, 2009 at 04:40:11PM -0400, Robert L Cochran wrote: > Are you guys looking at the cobbler and koan products supported by > Michael DeHaan and discussed on the cobbler mailing list Very much so - the people on this list who work at Red Hat work with Michael DeHaan. Rich. -- Richard Jones, Emerging Technologies, Red Hat http://et.redhat.com/~rjones virt-df lists disk usage of guests without needing to install any software inside the virtual machine. Supports Linux and Windows. http://et.redhat.com/~rjones/virt-df/ From rjones at redhat.com Tue Jun 30 13:15:43 2009 From: rjones at redhat.com (Richard W.M. Jones) Date: Tue, 30 Jun 2009 14:15:43 +0100 Subject: [fedora-virt] Fedora virtualization -- comments and questions In-Reply-To: <200906251211.24571.gene@czarc.net> References: <200906251005.58498.gene@czarc.net> <200906251211.24571.gene@czarc.net> Message-ID: <20090630131543.GC7120@amd.home.annexia.org> On Thu, Jun 25, 2009 at 12:11:24PM -0400, Gene Czarcinski wrote: > 5. With the current "libvirt" setup I have disk images under > /var/lib/libvirt/images and the guest's configuration under /etc/libvirt/qemu. > Furthermore, I now have an application which can chew up a lot of disk space > and all of it coming out of the "/" logical volume. I currently size my "/" > logical volumes to handle a lot of software plus a good amount of temporary > storage ... BUT I do not have 150GB "/" partitions/logical-volumes! I might be missing something here, but isn't it possible to mount an LVM partition on /var/lib/libvirt, and thus keep all the images on a separate place? Alternatively use a LVM-based storage pool, so all your guests get their own individual LVs. This will also be a lot faster. Rich. -- Richard Jones, Emerging Technologies, Red Hat http://et.redhat.com/~rjones Read my programming blog: http://rwmj.wordpress.com Fedora now supports 75 OCaml packages (the OPEN alternative to F#) http://cocan.org/getting_started_with_ocaml_on_red_hat_and_fedora From rjones at redhat.com Tue Jun 30 14:51:23 2009 From: rjones at redhat.com (Richard W.M. Jones) Date: Tue, 30 Jun 2009 15:51:23 +0100 Subject: [fedora-virt] [PATCH] Change libguestfs to use virtio block devices Message-ID: <20090630145123.GA7792@amd.home.annexia.org> The following set of patches changes libguestfs to use virtio block devices by default. Device names change from /dev/sd* to /dev/vd*, but device name translation should hide this change in most cases: http://libguestfs.org/guestfs.3.html#block_device_naming The change isn't totally straightforward. The CHS for virtio disks is different from the CHS for IDE disks (even where the disks have identical size). These caused sfdisk with explicit cylinder numbers to fail, so I had to change all these. This is the reasoning behind patch 2 and most of patch 3. Patch 1: Just changes the way some messages are displayed from the test suite. Patch 2: Changes the statvfs test so it doesn't get affected by the CHS change. Patch 3: (a) We change the list-devices and list-partitions functions so that they see and return /dev/vd* devices. (b) The udev fix previously posted to this list. (c) Change the partition sizes because of the CHS change - see above. (d) Add ,if=virtio to -drive parameters so that block devices are exported as virtio disks. Patch 4: The generated code, just shown for completeness. The tests all pass except one. A single test fails because pvremove from the previous test causes sfdisk to fail (apparently the previous pvremove is still happening, so sfdisk refuses to partition the device because it is in use). I believe this is an underlying failure revealed by this change to virtio, not caused by the change itself. There doesn't appear to be any noticable increase in speed when running the tests, but I didn't measure anything. The main reason to use virtio is that it's inherently simpler than emulating IDE or SCSI devices. Rich. -- Richard Jones, Emerging Technologies, Red Hat http://et.redhat.com/~rjones libguestfs lets you edit virtual machines. Supports shell scripting, bindings from many languages. http://et.redhat.com/~rjones/libguestfs/ See what it can do: http://et.redhat.com/~rjones/libguestfs/recipes.html -------------- next part -------------- >From eee4d77263c39b866885b6e776af76abc60fe5c2 Mon Sep 17 00:00:00 2001 From: Richard W.M. Jones Date: Tue, 30 Jun 2009 15:12:48 +0100 Subject: [PATCH 1/4] Clean up the output of the C API test code. Set output mode to unbuffered so that we see ordinary output messages and errors at the same time. Align "skipped" messages. --- src/generator.ml | 10 ++++++---- 1 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/generator.ml b/src/generator.ml index 960973d..242d292 100755 --- a/src/generator.ml +++ b/src/generator.ml @@ -4278,6 +4278,8 @@ int main (int argc, char *argv[]) int fd; int nr_tests, test_num = 0; + setbuf (stdout, NULL); + no_test_warnings (); g = guestfs_create (); @@ -4459,7 +4461,7 @@ static int %s_skip (void) static int %s (void) { if (%s_skip ()) { - printf (\"%%s skipped (reason: environment variable set)\\n\", \"%s\"); + printf (\" %%s skipped (reason: environment variable set)\\n\", \"%s\"); return 0; } @@ -4467,17 +4469,17 @@ static int %s (void) (match prereq with | Disabled -> - pr " printf (\"%%s skipped (reason: test disabled in generator)\\n\", \"%s\");\n" test_name + pr " printf (\" %%s skipped (reason: test disabled in generator)\\n\", \"%s\");\n" test_name | If _ -> pr " if (! %s_prereq ()) {\n" test_name; - pr " printf (\"%%s skipped (reason: test prerequisite)\\n\", \"%s\");\n" test_name; + pr " printf (\" %%s skipped (reason: test prerequisite)\\n\", \"%s\");\n" test_name; pr " return 0;\n"; pr " }\n"; pr "\n"; generate_one_test_body name i test_name init test; | Unless _ -> pr " if (%s_prereq ()) {\n" test_name; - pr " printf (\"%%s skipped (reason: test prerequisite)\\n\", \"%s\");\n" test_name; + pr " printf (\" %%s skipped (reason: test prerequisite)\\n\", \"%s\");\n" test_name; pr " return 0;\n"; pr " }\n"; pr "\n"; -- 1.6.2.5 -------------- next part -------------- >From 69a725d5e1efd7487f32952a81d1f638091887e2 Mon Sep 17 00:00:00 2001 From: Richard W.M. Jones Date: Tue, 30 Jun 2009 15:10:31 +0100 Subject: [PATCH 2/4] Change statvfs test so it doesn't depend on device size. Current statvfs test depended on a lot of filesystem details which can change if the CHS of the underlying block device changes (eg. with the switch from IDE -> virtio). These are not really necessary to test the call, so instead just check for filesystem features. --- src/generator.ml | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/src/generator.ml b/src/generator.ml index 242d292..cbe8ca7 100755 --- a/src/generator.ml +++ b/src/generator.ml @@ -1499,8 +1499,7 @@ This is the same as the C system call."); ("statvfs", (RStatVFS "statbuf", [String "path"]), 54, [], [InitBasicFS, Always, TestOutputStruct ( - [["statvfs"; "/"]], [CompareWithInt ("bfree", 487702); - CompareWithInt ("blocks", 490020); + [["statvfs"; "/"]], [CompareWithInt ("namemax", 255); CompareWithInt ("bsize", 1024)])], "get file system statistics", "\ -- 1.6.2.5 -------------- next part -------------- >From 0a2e3c91f0a8d198e822ebabc95d3a5a6b8a0bc6 Mon Sep 17 00:00:00 2001 From: Richard W.M. Jones Date: Tue, 30 Jun 2009 13:59:29 +0100 Subject: [PATCH 3/4] Change to use virtio_blk (virtio block device) by default. virtio_blk is the fast, virt-native block device driver supported by qemu and KVM. Note that virtio_blk device names are called /dev/vd*. Existing scripts should continue working because device name translation will silently change device names of the form /dev/sd* to /dev/vd* as required. See also: http://libguestfs.org/guestfs.3.html#block_device_naming --- daemon/devsparts.c | 6 ++++-- daemon/guestfsd.c | 2 +- src/generator.ml | 30 ++++++++++++++++++------------ src/guestfs.c | 4 ++-- 4 files changed, 25 insertions(+), 17 deletions(-) diff --git a/daemon/devsparts.c b/daemon/devsparts.c index 83e4bb9..4c7a643 100644 --- a/daemon/devsparts.c +++ b/daemon/devsparts.c @@ -46,7 +46,8 @@ do_list_devices (void) while ((d = readdir (dir)) != NULL) { if (strncmp (d->d_name, "sd", 2) == 0 || - strncmp (d->d_name, "hd", 2) == 0) { + strncmp (d->d_name, "hd", 2) == 0 || + strncmp (d->d_name, "vd", 2) == 0) { snprintf (buf, sizeof buf, "/dev/%s", d->d_name); if (add_string (&r, &size, &alloc, buf) == -1) { closedir (dir); @@ -87,7 +88,8 @@ do_list_partitions (void) while ((d = readdir (dir)) != NULL) { if (strncmp (d->d_name, "sd", 2) == 0 || - strncmp (d->d_name, "hd", 2) == 0) { + strncmp (d->d_name, "hd", 2) == 0 || + strncmp (d->d_name, "vd", 2) == 0) { strncpy (devname, d->d_name, sizeof devname); devname[sizeof devname - 1] = '\0'; diff --git a/daemon/guestfsd.c b/daemon/guestfsd.c index 7eabbd4..0a3e64f 100644 --- a/daemon/guestfsd.c +++ b/daemon/guestfsd.c @@ -714,7 +714,7 @@ device_name_translation (char *device, const char *func) return 0; } - if (errno != ENXIO) { + if (errno != ENXIO && errno != ENOENT) { error: reply_with_perror ("%s: %s", func, device); return -1; diff --git a/src/generator.ml b/src/generator.ml index cbe8ca7..69fd706 100755 --- a/src/generator.ml +++ b/src/generator.ml @@ -133,7 +133,9 @@ can easily destroy all your data>." * 50MB and 10MB (respectively /dev/sda, /dev/sdb, /dev/sdc), and * a fourth squashfs block device with some known files on it (/dev/sdd). * - * Note for partitioning purposes, the 500MB device has 63 cylinders. + * Note for partitioning purposes, the 500MB device has 1015 cylinders. + * Number of cylinders was 63 for IDE emulated disks with precisely + * the same size. How exactly this is calculated is a mystery. * * The squashfs block device (/dev/sdd) comes from images/test.sqsh. * @@ -373,7 +375,8 @@ for whatever operations you want to perform (ie. read access if you just want to read the image or write access if you want to modify the image). -This is equivalent to the qemu parameter C<-drive file=filename,cache=off>. +This is equivalent to the qemu parameter +C<-drive file=filename,cache=off,if=virtio>. Note that this call checks for the existence of C. This stops you from specifying other types of drive which are supported @@ -407,7 +410,7 @@ handle is closed. We don't currently have any method to enable changes to be committed, although qemu can support this. This is equivalent to the qemu parameter -C<-drive file=filename,snapshot=on>. +C<-drive file=filename,snapshot=on,if=virtio>. Note that this call checks for the existence of C. This stops you from specifying other types of drive which are supported @@ -733,7 +736,7 @@ The full block device names are returned, eg. C"); [InitBasicFS, Always, TestOutputListOfDevices ( [["list_partitions"]], ["/dev/sda1"]); InitEmpty, Always, TestOutputListOfDevices ( - [["sfdisk"; "/dev/sda"; "0"; "0"; "0"; ",10 ,20 ,"]; + [["sfdisk"; "/dev/sda"; "0"; "0"; "0"; ",200 ,400 ,"]; ["list_partitions"]], ["/dev/sda1"; "/dev/sda2"; "/dev/sda3"])], "list the partitions", "\ @@ -748,7 +751,7 @@ call C."); [InitBasicFSonLVM, Always, TestOutputListOfDevices ( [["pvs"]], ["/dev/sda1"]); InitEmpty, Always, TestOutputListOfDevices ( - [["sfdisk"; "/dev/sda"; "0"; "0"; "0"; ",10 ,20 ,"]; + [["sfdisk"; "/dev/sda"; "0"; "0"; "0"; ",200 ,400 ,"]; ["pvcreate"; "/dev/sda1"]; ["pvcreate"; "/dev/sda2"]; ["pvcreate"; "/dev/sda3"]; @@ -767,7 +770,7 @@ See also C."); [InitBasicFSonLVM, Always, TestOutputList ( [["vgs"]], ["VG"]); InitEmpty, Always, TestOutputList ( - [["sfdisk"; "/dev/sda"; "0"; "0"; "0"; ",10 ,20 ,"]; + [["sfdisk"; "/dev/sda"; "0"; "0"; "0"; ",200 ,400 ,"]; ["pvcreate"; "/dev/sda1"]; ["pvcreate"; "/dev/sda2"]; ["pvcreate"; "/dev/sda3"]; @@ -788,7 +791,7 @@ See also C."); [InitBasicFSonLVM, Always, TestOutputList ( [["lvs"]], ["/dev/VG/LV"]); InitEmpty, Always, TestOutputList ( - [["sfdisk"; "/dev/sda"; "0"; "0"; "0"; ",10 ,20 ,"]; + [["sfdisk"; "/dev/sda"; "0"; "0"; "0"; ",200 ,400 ,"]; ["pvcreate"; "/dev/sda1"]; ["pvcreate"; "/dev/sda2"]; ["pvcreate"; "/dev/sda3"]; @@ -1141,7 +1144,7 @@ See also C."); ("pvcreate", (RErr, [String "device"]), 39, [], [InitEmpty, Always, TestOutputListOfDevices ( - [["sfdisk"; "/dev/sda"; "0"; "0"; "0"; ",10 ,20 ,"]; + [["sfdisk"; "/dev/sda"; "0"; "0"; "0"; ",200 ,400 ,"]; ["pvcreate"; "/dev/sda1"]; ["pvcreate"; "/dev/sda2"]; ["pvcreate"; "/dev/sda3"]; @@ -1154,7 +1157,7 @@ as C."); ("vgcreate", (RErr, [String "volgroup"; StringList "physvols"]), 40, [], [InitEmpty, Always, TestOutputList ( - [["sfdisk"; "/dev/sda"; "0"; "0"; "0"; ",10 ,20 ,"]; + [["sfdisk"; "/dev/sda"; "0"; "0"; "0"; ",200 ,400 ,"]; ["pvcreate"; "/dev/sda1"]; ["pvcreate"; "/dev/sda2"]; ["pvcreate"; "/dev/sda3"]; @@ -1168,7 +1171,7 @@ from the non-empty list of physical volumes C."); ("lvcreate", (RErr, [String "logvol"; String "volgroup"; Int "mbytes"]), 41, [], [InitEmpty, Always, TestOutputList ( - [["sfdisk"; "/dev/sda"; "0"; "0"; "0"; ",10 ,20 ,"]; + [["sfdisk"; "/dev/sda"; "0"; "0"; "0"; ",200 ,400 ,"]; ["pvcreate"; "/dev/sda1"]; ["pvcreate"; "/dev/sda2"]; ["pvcreate"; "/dev/sda3"]; @@ -1296,7 +1299,7 @@ Some internal mounts are not shown."); ["mounts"]], []); (* check that umount_all can unmount nested mounts correctly: *) InitEmpty, Always, TestOutputList ( - [["sfdisk"; "/dev/sda"; "0"; "0"; "0"; ",10 ,20 ,"]; + [["sfdisk"; "/dev/sda"; "0"; "0"; "0"; ",200 ,400 ,"]; ["mkfs"; "ext2"; "/dev/sda1"]; ["mkfs"; "ext2"; "/dev/sda2"]; ["mkfs"; "ext2"; "/dev/sda3"]; @@ -2015,7 +2018,10 @@ any partition tables, filesystem superblocks and so on. See also: C."); ("grub_install", (RErr, [String "root"; String "device"]), 86, [], - [InitBasicFS, Always, TestOutputTrue ( + (* Test disabled because grub-install incompatible with virtio-blk driver. + * See also: https://bugzilla.redhat.com/show_bug.cgi?id=479760 + *) + [InitBasicFS, Disabled, TestOutputTrue ( [["grub_install"; "/"; "/dev/sda1"]; ["is_dir"; "/boot"]])], "install GRUB", diff --git a/src/guestfs.c b/src/guestfs.c index 5743a07..025b7f3 100644 --- a/src/guestfs.c +++ b/src/guestfs.c @@ -706,7 +706,7 @@ guestfs_add_drive (guestfs_h *g, const char *filename) } /* cache=off improves reliability in the event of a host crash. */ - snprintf (buf, len, "file=%s,cache=off", filename); + snprintf (buf, len, "file=%s,cache=off,if=virtio", filename); return guestfs_config (g, "-drive", buf); } @@ -727,7 +727,7 @@ guestfs_add_drive_ro (guestfs_h *g, const char *filename) return -1; } - snprintf (buf, len, "file=%s,snapshot=on", filename); + snprintf (buf, len, "file=%s,snapshot=on,if=virtio", filename); return guestfs_config (g, "-drive", buf); } -- 1.6.2.5 -------------- next part -------------- >From ad9e9e19e2fab0e74f6771165ca24a60d9846b72 Mon Sep 17 00:00:00 2001 From: Richard W.M. Jones Date: Tue, 30 Jun 2009 14:01:40 +0100 Subject: [PATCH 4/4] Generated code for the virtio_blk change. --- capitests/tests.c | 472 ++++++++++++---------------- fish/cmds.c | 6 +- guestfish-actions.pod | 9 +- guestfs-actions.pod | 9 +- java/com/redhat/et/libguestfs/GuestFS.java | 8 +- perl/lib/Sys/Guestfs.pm | 9 +- python/guestfs.py | 8 +- 7 files changed, 233 insertions(+), 288 deletions(-) diff --git a/capitests/tests.c b/capitests/tests.c index 0ae6aa4..df49dfe 100644 --- a/capitests/tests.c +++ b/capitests/tests.c @@ -176,7 +176,7 @@ static int test_mknod_c_0_skip (void) static int test_mknod_c_0 (void) { if (test_mknod_c_0_skip ()) { - printf ("%s skipped (reason: environment variable set)\n", "test_mknod_c_0"); + printf (" %s skipped (reason: environment variable set)\n", "test_mknod_c_0"); return 0; } @@ -277,7 +277,7 @@ static int test_mknod_b_0_skip (void) static int test_mknod_b_0 (void) { if (test_mknod_b_0_skip ()) { - printf ("%s skipped (reason: environment variable set)\n", "test_mknod_b_0"); + printf (" %s skipped (reason: environment variable set)\n", "test_mknod_b_0"); return 0; } @@ -378,7 +378,7 @@ static int test_mkfifo_0_skip (void) static int test_mkfifo_0 (void) { if (test_mkfifo_0_skip ()) { - printf ("%s skipped (reason: environment variable set)\n", "test_mkfifo_0"); + printf (" %s skipped (reason: environment variable set)\n", "test_mkfifo_0"); return 0; } @@ -479,7 +479,7 @@ static int test_mknod_0_skip (void) static int test_mknod_0 (void) { if (test_mknod_0_skip ()) { - printf ("%s skipped (reason: environment variable set)\n", "test_mknod_0"); + printf (" %s skipped (reason: environment variable set)\n", "test_mknod_0"); return 0; } @@ -580,7 +580,7 @@ static int test_mknod_1_skip (void) static int test_mknod_1 (void) { if (test_mknod_1_skip ()) { - printf ("%s skipped (reason: environment variable set)\n", "test_mknod_1"); + printf (" %s skipped (reason: environment variable set)\n", "test_mknod_1"); return 0; } @@ -681,7 +681,7 @@ static int test_mkswap_U_0_skip (void) static int test_mkswap_U_0 (void) { if (test_mkswap_U_0_skip ()) { - printf ("%s skipped (reason: environment variable set)\n", "test_mkswap_U_0"); + printf (" %s skipped (reason: environment variable set)\n", "test_mkswap_U_0"); return 0; } @@ -751,7 +751,7 @@ static int test_mkswap_L_0_skip (void) static int test_mkswap_L_0 (void) { if (test_mkswap_L_0_skip ()) { - printf ("%s skipped (reason: environment variable set)\n", "test_mkswap_L_0"); + printf (" %s skipped (reason: environment variable set)\n", "test_mkswap_L_0"); return 0; } @@ -821,7 +821,7 @@ static int test_mkswap_0_skip (void) static int test_mkswap_0 (void) { if (test_mkswap_0_skip ()) { - printf ("%s skipped (reason: environment variable set)\n", "test_mkswap_0"); + printf (" %s skipped (reason: environment variable set)\n", "test_mkswap_0"); return 0; } @@ -890,7 +890,7 @@ static int test_initrd_list_0_skip (void) static int test_initrd_list_0 (void) { if (test_initrd_list_0_skip ()) { - printf ("%s skipped (reason: environment variable set)\n", "test_initrd_list_0"); + printf (" %s skipped (reason: environment variable set)\n", "test_initrd_list_0"); return 0; } @@ -1045,7 +1045,7 @@ static int test_du_0_skip (void) static int test_du_0 (void) { if (test_du_0_skip ()) { - printf ("%s skipped (reason: environment variable set)\n", "test_du_0"); + printf (" %s skipped (reason: environment variable set)\n", "test_du_0"); return 0; } @@ -1144,7 +1144,7 @@ static int test_tail_n_0_skip (void) static int test_tail_n_0 (void) { if (test_tail_n_0_skip ()) { - printf ("%s skipped (reason: environment variable set)\n", "test_tail_n_0"); + printf (" %s skipped (reason: environment variable set)\n", "test_tail_n_0"); return 0; } @@ -1287,7 +1287,7 @@ static int test_tail_n_1_skip (void) static int test_tail_n_1 (void) { if (test_tail_n_1_skip ()) { - printf ("%s skipped (reason: environment variable set)\n", "test_tail_n_1"); + printf (" %s skipped (reason: environment variable set)\n", "test_tail_n_1"); return 0; } @@ -1430,7 +1430,7 @@ static int test_tail_n_2_skip (void) static int test_tail_n_2 (void) { if (test_tail_n_2_skip ()) { - printf ("%s skipped (reason: environment variable set)\n", "test_tail_n_2"); + printf (" %s skipped (reason: environment variable set)\n", "test_tail_n_2"); return 0; } @@ -1537,7 +1537,7 @@ static int test_tail_0_skip (void) static int test_tail_0 (void) { if (test_tail_0_skip ()) { - printf ("%s skipped (reason: environment variable set)\n", "test_tail_0"); + printf (" %s skipped (reason: environment variable set)\n", "test_tail_0"); return 0; } @@ -1764,7 +1764,7 @@ static int test_head_n_0_skip (void) static int test_head_n_0 (void) { if (test_head_n_0_skip ()) { - printf ("%s skipped (reason: environment variable set)\n", "test_head_n_0"); + printf (" %s skipped (reason: environment variable set)\n", "test_head_n_0"); return 0; } @@ -1907,7 +1907,7 @@ static int test_head_n_1_skip (void) static int test_head_n_1 (void) { if (test_head_n_1_skip ()) { - printf ("%s skipped (reason: environment variable set)\n", "test_head_n_1"); + printf (" %s skipped (reason: environment variable set)\n", "test_head_n_1"); return 0; } @@ -2050,7 +2050,7 @@ static int test_head_n_2_skip (void) static int test_head_n_2 (void) { if (test_head_n_2_skip ()) { - printf ("%s skipped (reason: environment variable set)\n", "test_head_n_2"); + printf (" %s skipped (reason: environment variable set)\n", "test_head_n_2"); return 0; } @@ -2157,7 +2157,7 @@ static int test_head_0_skip (void) static int test_head_0 (void) { if (test_head_0_skip ()) { - printf ("%s skipped (reason: environment variable set)\n", "test_head_0"); + printf (" %s skipped (reason: environment variable set)\n", "test_head_0"); return 0; } @@ -2384,7 +2384,7 @@ static int test_wc_c_0_skip (void) static int test_wc_c_0 (void) { if (test_wc_c_0_skip ()) { - printf ("%s skipped (reason: environment variable set)\n", "test_wc_c_0"); + printf (" %s skipped (reason: environment variable set)\n", "test_wc_c_0"); return 0; } @@ -2486,7 +2486,7 @@ static int test_wc_w_0_skip (void) static int test_wc_w_0 (void) { if (test_wc_w_0_skip ()) { - printf ("%s skipped (reason: environment variable set)\n", "test_wc_w_0"); + printf (" %s skipped (reason: environment variable set)\n", "test_wc_w_0"); return 0; } @@ -2588,7 +2588,7 @@ static int test_wc_l_0_skip (void) static int test_wc_l_0 (void) { if (test_wc_l_0_skip ()) { - printf ("%s skipped (reason: environment variable set)\n", "test_wc_l_0"); + printf (" %s skipped (reason: environment variable set)\n", "test_wc_l_0"); return 0; } @@ -2690,7 +2690,7 @@ static int test_mkdtemp_0_skip (void) static int test_mkdtemp_0 (void) { if (test_mkdtemp_0_skip ()) { - printf ("%s skipped (reason: environment variable set)\n", "test_mkdtemp_0"); + printf (" %s skipped (reason: environment variable set)\n", "test_mkdtemp_0"); return 0; } @@ -2786,7 +2786,7 @@ static int test_scrub_file_0_skip (void) static int test_scrub_file_0 (void) { if (test_scrub_file_0_skip ()) { - printf ("%s skipped (reason: environment variable set)\n", "test_scrub_file_0"); + printf (" %s skipped (reason: environment variable set)\n", "test_scrub_file_0"); return 0; } @@ -2882,7 +2882,7 @@ static int test_scrub_device_0_skip (void) static int test_scrub_device_0 (void) { if (test_scrub_device_0_skip ()) { - printf ("%s skipped (reason: environment variable set)\n", "test_scrub_device_0"); + printf (" %s skipped (reason: environment variable set)\n", "test_scrub_device_0"); return 0; } @@ -2938,7 +2938,7 @@ static int test_glob_expand_0_skip (void) static int test_glob_expand_0 (void) { if (test_glob_expand_0_skip ()) { - printf ("%s skipped (reason: environment variable set)\n", "test_glob_expand_0"); + printf (" %s skipped (reason: environment variable set)\n", "test_glob_expand_0"); return 0; } @@ -3082,7 +3082,7 @@ static int test_glob_expand_1_skip (void) static int test_glob_expand_1 (void) { if (test_glob_expand_1_skip ()) { - printf ("%s skipped (reason: environment variable set)\n", "test_glob_expand_1"); + printf (" %s skipped (reason: environment variable set)\n", "test_glob_expand_1"); return 0; } @@ -3226,7 +3226,7 @@ static int test_glob_expand_2_skip (void) static int test_glob_expand_2 (void) { if (test_glob_expand_2_skip ()) { - printf ("%s skipped (reason: environment variable set)\n", "test_glob_expand_2"); + printf (" %s skipped (reason: environment variable set)\n", "test_glob_expand_2"); return 0; } @@ -3346,7 +3346,7 @@ static int test_ntfs_3g_probe_0_skip (void) static int test_ntfs_3g_probe_0 (void) { if (test_ntfs_3g_probe_0_skip ()) { - printf ("%s skipped (reason: environment variable set)\n", "test_ntfs_3g_probe_0"); + printf (" %s skipped (reason: environment variable set)\n", "test_ntfs_3g_probe_0"); return 0; } @@ -3428,7 +3428,7 @@ static int test_ntfs_3g_probe_1_skip (void) static int test_ntfs_3g_probe_1 (void) { if (test_ntfs_3g_probe_1_skip ()) { - printf ("%s skipped (reason: environment variable set)\n", "test_ntfs_3g_probe_1"); + printf (" %s skipped (reason: environment variable set)\n", "test_ntfs_3g_probe_1"); return 0; } @@ -3510,7 +3510,7 @@ static int test_sleep_0_skip (void) static int test_sleep_0 (void) { if (test_sleep_0_skip ()) { - printf ("%s skipped (reason: environment variable set)\n", "test_sleep_0"); + printf (" %s skipped (reason: environment variable set)\n", "test_sleep_0"); return 0; } @@ -3565,7 +3565,7 @@ static int test_find_0_skip (void) static int test_find_0 (void) { if (test_find_0_skip ()) { - printf ("%s skipped (reason: environment variable set)\n", "test_find_0"); + printf (" %s skipped (reason: environment variable set)\n", "test_find_0"); return 0; } @@ -3673,7 +3673,7 @@ static int test_find_1_skip (void) static int test_find_1 (void) { if (test_find_1_skip ()) { - printf ("%s skipped (reason: environment variable set)\n", "test_find_1"); + printf (" %s skipped (reason: environment variable set)\n", "test_find_1"); return 0; } @@ -3841,7 +3841,7 @@ static int test_find_2_skip (void) static int test_find_2 (void) { if (test_find_2_skip ()) { - printf ("%s skipped (reason: environment variable set)\n", "test_find_2"); + printf (" %s skipped (reason: environment variable set)\n", "test_find_2"); return 0; } @@ -3977,7 +3977,7 @@ static int test_lvresize_0_skip (void) static int test_lvresize_0 (void) { if (test_lvresize_0_skip ()) { - printf ("%s skipped (reason: environment variable set)\n", "test_lvresize_0"); + printf (" %s skipped (reason: environment variable set)\n", "test_lvresize_0"); return 0; } @@ -4150,7 +4150,7 @@ static int test_zerofree_0_skip (void) static int test_zerofree_0 (void) { if (test_zerofree_0_skip ()) { - printf ("%s skipped (reason: environment variable set)\n", "test_zerofree_0"); + printf (" %s skipped (reason: environment variable set)\n", "test_zerofree_0"); return 0; } @@ -4277,7 +4277,7 @@ static int test_hexdump_0_skip (void) static int test_hexdump_0 (void) { if (test_hexdump_0_skip ()) { - printf ("%s skipped (reason: environment variable set)\n", "test_hexdump_0"); + printf (" %s skipped (reason: environment variable set)\n", "test_hexdump_0"); return 0; } @@ -4379,7 +4379,7 @@ static int test_hexdump_1_skip (void) static int test_hexdump_1 (void) { if (test_hexdump_1_skip ()) { - printf ("%s skipped (reason: environment variable set)\n", "test_hexdump_1"); + printf (" %s skipped (reason: environment variable set)\n", "test_hexdump_1"); return 0; } @@ -4478,7 +4478,7 @@ static int test_strings_e_0_skip (void) static int test_strings_e_0 (void) { if (test_strings_e_0_skip ()) { - printf ("%s skipped (reason: environment variable set)\n", "test_strings_e_0"); + printf (" %s skipped (reason: environment variable set)\n", "test_strings_e_0"); return 0; } @@ -4584,11 +4584,11 @@ static int test_strings_e_1_skip (void) static int test_strings_e_1 (void) { if (test_strings_e_1_skip ()) { - printf ("%s skipped (reason: environment variable set)\n", "test_strings_e_1"); + printf (" %s skipped (reason: environment variable set)\n", "test_strings_e_1"); return 0; } - printf ("%s skipped (reason: test disabled in generator)\n", "test_strings_e_1"); + printf (" %s skipped (reason: test disabled in generator)\n", "test_strings_e_1"); return 0; } @@ -4609,7 +4609,7 @@ static int test_strings_0_skip (void) static int test_strings_0 (void) { if (test_strings_0_skip ()) { - printf ("%s skipped (reason: environment variable set)\n", "test_strings_0"); + printf (" %s skipped (reason: environment variable set)\n", "test_strings_0"); return 0; } @@ -4738,7 +4738,7 @@ static int test_strings_1_skip (void) static int test_strings_1 (void) { if (test_strings_1_skip ()) { - printf ("%s skipped (reason: environment variable set)\n", "test_strings_1"); + printf (" %s skipped (reason: environment variable set)\n", "test_strings_1"); return 0; } @@ -4842,7 +4842,7 @@ static int test_equal_0_skip (void) static int test_equal_0 (void) { if (test_equal_0_skip ()) { - printf ("%s skipped (reason: environment variable set)\n", "test_equal_0"); + printf (" %s skipped (reason: environment variable set)\n", "test_equal_0"); return 0; } @@ -4952,7 +4952,7 @@ static int test_equal_1_skip (void) static int test_equal_1 (void) { if (test_equal_1_skip ()) { - printf ("%s skipped (reason: environment variable set)\n", "test_equal_1"); + printf (" %s skipped (reason: environment variable set)\n", "test_equal_1"); return 0; } @@ -5062,7 +5062,7 @@ static int test_equal_2_skip (void) static int test_equal_2 (void) { if (test_equal_2_skip ()) { - printf ("%s skipped (reason: environment variable set)\n", "test_equal_2"); + printf (" %s skipped (reason: environment variable set)\n", "test_equal_2"); return 0; } @@ -5150,7 +5150,7 @@ static int test_ping_daemon_0_skip (void) static int test_ping_daemon_0 (void) { if (test_ping_daemon_0_skip ()) { - printf ("%s skipped (reason: environment variable set)\n", "test_ping_daemon_0"); + printf (" %s skipped (reason: environment variable set)\n", "test_ping_daemon_0"); return 0; } @@ -5205,7 +5205,7 @@ static int test_dmesg_0_skip (void) static int test_dmesg_0 (void) { if (test_dmesg_0_skip ()) { - printf ("%s skipped (reason: environment variable set)\n", "test_dmesg_0"); + printf (" %s skipped (reason: environment variable set)\n", "test_dmesg_0"); return 0; } @@ -5261,7 +5261,7 @@ static int test_drop_caches_0_skip (void) static int test_drop_caches_0 (void) { if (test_drop_caches_0_skip ()) { - printf ("%s skipped (reason: environment variable set)\n", "test_drop_caches_0"); + printf (" %s skipped (reason: environment variable set)\n", "test_drop_caches_0"); return 0; } @@ -5316,7 +5316,7 @@ static int test_mv_0_skip (void) static int test_mv_0 (void) { if (test_mv_0_skip ()) { - printf ("%s skipped (reason: environment variable set)\n", "test_mv_0"); + printf (" %s skipped (reason: environment variable set)\n", "test_mv_0"); return 0; } @@ -5427,7 +5427,7 @@ static int test_mv_1_skip (void) static int test_mv_1 (void) { if (test_mv_1_skip ()) { - printf ("%s skipped (reason: environment variable set)\n", "test_mv_1"); + printf (" %s skipped (reason: environment variable set)\n", "test_mv_1"); return 0; } @@ -5536,7 +5536,7 @@ static int test_cp_a_0_skip (void) static int test_cp_a_0 (void) { if (test_cp_a_0_skip ()) { - printf ("%s skipped (reason: environment variable set)\n", "test_cp_a_0"); + printf (" %s skipped (reason: environment variable set)\n", "test_cp_a_0"); return 0; } @@ -5663,7 +5663,7 @@ static int test_cp_0_skip (void) static int test_cp_0 (void) { if (test_cp_0_skip ()) { - printf ("%s skipped (reason: environment variable set)\n", "test_cp_0"); + printf (" %s skipped (reason: environment variable set)\n", "test_cp_0"); return 0; } @@ -5774,7 +5774,7 @@ static int test_cp_1_skip (void) static int test_cp_1 (void) { if (test_cp_1_skip ()) { - printf ("%s skipped (reason: environment variable set)\n", "test_cp_1"); + printf (" %s skipped (reason: environment variable set)\n", "test_cp_1"); return 0; } @@ -5883,7 +5883,7 @@ static int test_cp_2_skip (void) static int test_cp_2 (void) { if (test_cp_2_skip ()) { - printf ("%s skipped (reason: environment variable set)\n", "test_cp_2"); + printf (" %s skipped (reason: environment variable set)\n", "test_cp_2"); return 0; } @@ -6002,86 +6002,11 @@ static int test_grub_install_0_skip (void) static int test_grub_install_0 (void) { if (test_grub_install_0_skip ()) { - printf ("%s skipped (reason: environment variable set)\n", "test_grub_install_0"); + printf (" %s skipped (reason: environment variable set)\n", "test_grub_install_0"); return 0; } - /* InitBasicFS for test_grub_install_0: create ext2 on /dev/sda1 */ - { - char device[] = "/dev/sda"; - int r; - suppress_error = 0; - r = guestfs_blockdev_setrw (g, device); - if (r == -1) - return -1; - } - { - int r; - suppress_error = 0; - r = guestfs_umount_all (g); - if (r == -1) - return -1; - } - { - int r; - suppress_error = 0; - r = guestfs_lvm_remove_all (g); - if (r == -1) - return -1; - } - { - char device[] = "/dev/sda"; - char lines_0[] = ","; - char *lines[] = { - lines_0, - NULL - }; - int r; - suppress_error = 0; - r = guestfs_sfdisk (g, device, 0, 0, 0, lines); - if (r == -1) - return -1; - } - { - char fstype[] = "ext2"; - char device[] = "/dev/sda1"; - int r; - suppress_error = 0; - r = guestfs_mkfs (g, fstype, device); - if (r == -1) - return -1; - } - { - char device[] = "/dev/sda1"; - char mountpoint[] = "/"; - int r; - suppress_error = 0; - r = guestfs_mount (g, device, mountpoint); - if (r == -1) - return -1; - } - /* TestOutputTrue for grub_install (0) */ - { - char root[] = "/"; - char device[] = "/dev/sda1"; - int r; - suppress_error = 0; - r = guestfs_grub_install (g, root, device); - if (r == -1) - return -1; - } - { - char path[] = "/boot"; - int r; - suppress_error = 0; - r = guestfs_is_dir (g, path); - if (r == -1) - return -1; - if (!r) { - fprintf (stderr, "test_grub_install_0: expected true, got false\n"); - return -1; - } - } + printf (" %s skipped (reason: test disabled in generator)\n", "test_grub_install_0"); return 0; } @@ -6102,7 +6027,7 @@ static int test_zero_0_skip (void) static int test_zero_0 (void) { if (test_zero_0_skip ()) { - printf ("%s skipped (reason: environment variable set)\n", "test_zero_0"); + printf (" %s skipped (reason: environment variable set)\n", "test_zero_0"); return 0; } @@ -6211,7 +6136,7 @@ static int test_fsck_0_skip (void) static int test_fsck_0 (void) { if (test_fsck_0_skip ()) { - printf ("%s skipped (reason: environment variable set)\n", "test_fsck_0"); + printf (" %s skipped (reason: environment variable set)\n", "test_fsck_0"); return 0; } @@ -6311,7 +6236,7 @@ static int test_fsck_1_skip (void) static int test_fsck_1 (void) { if (test_fsck_1_skip ()) { - printf ("%s skipped (reason: environment variable set)\n", "test_fsck_1"); + printf (" %s skipped (reason: environment variable set)\n", "test_fsck_1"); return 0; } @@ -6419,7 +6344,7 @@ static int test_set_e2uuid_0_skip (void) static int test_set_e2uuid_0 (void) { if (test_set_e2uuid_0_skip ()) { - printf ("%s skipped (reason: environment variable set)\n", "test_set_e2uuid_0"); + printf (" %s skipped (reason: environment variable set)\n", "test_set_e2uuid_0"); return 0; } @@ -6521,7 +6446,7 @@ static int test_set_e2uuid_1_skip (void) static int test_set_e2uuid_1 (void) { if (test_set_e2uuid_1_skip ()) { - printf ("%s skipped (reason: environment variable set)\n", "test_set_e2uuid_1"); + printf (" %s skipped (reason: environment variable set)\n", "test_set_e2uuid_1"); return 0; } @@ -6623,7 +6548,7 @@ static int test_set_e2uuid_2_skip (void) static int test_set_e2uuid_2 (void) { if (test_set_e2uuid_2_skip ()) { - printf ("%s skipped (reason: environment variable set)\n", "test_set_e2uuid_2"); + printf (" %s skipped (reason: environment variable set)\n", "test_set_e2uuid_2"); return 0; } @@ -6711,7 +6636,7 @@ static int test_set_e2uuid_3_skip (void) static int test_set_e2uuid_3 (void) { if (test_set_e2uuid_3_skip ()) { - printf ("%s skipped (reason: environment variable set)\n", "test_set_e2uuid_3"); + printf (" %s skipped (reason: environment variable set)\n", "test_set_e2uuid_3"); return 0; } @@ -6799,7 +6724,7 @@ static int test_set_e2label_0_skip (void) static int test_set_e2label_0 (void) { if (test_set_e2label_0_skip ()) { - printf ("%s skipped (reason: environment variable set)\n", "test_set_e2label_0"); + printf (" %s skipped (reason: environment variable set)\n", "test_set_e2label_0"); return 0; } @@ -6901,7 +6826,7 @@ static int test_pvremove_0_skip (void) static int test_pvremove_0 (void) { if (test_pvremove_0_skip ()) { - printf ("%s skipped (reason: environment variable set)\n", "test_pvremove_0"); + printf (" %s skipped (reason: environment variable set)\n", "test_pvremove_0"); return 0; } @@ -7033,7 +6958,7 @@ static int test_pvremove_1_skip (void) static int test_pvremove_1 (void) { if (test_pvremove_1_skip ()) { - printf ("%s skipped (reason: environment variable set)\n", "test_pvremove_1"); + printf (" %s skipped (reason: environment variable set)\n", "test_pvremove_1"); return 0; } @@ -7165,7 +7090,7 @@ static int test_pvremove_2_skip (void) static int test_pvremove_2 (void) { if (test_pvremove_2_skip ()) { - printf ("%s skipped (reason: environment variable set)\n", "test_pvremove_2"); + printf (" %s skipped (reason: environment variable set)\n", "test_pvremove_2"); return 0; } @@ -7297,7 +7222,7 @@ static int test_vgremove_0_skip (void) static int test_vgremove_0 (void) { if (test_vgremove_0_skip ()) { - printf ("%s skipped (reason: environment variable set)\n", "test_vgremove_0"); + printf (" %s skipped (reason: environment variable set)\n", "test_vgremove_0"); return 0; } @@ -7421,7 +7346,7 @@ static int test_vgremove_1_skip (void) static int test_vgremove_1 (void) { if (test_vgremove_1_skip ()) { - printf ("%s skipped (reason: environment variable set)\n", "test_vgremove_1"); + printf (" %s skipped (reason: environment variable set)\n", "test_vgremove_1"); return 0; } @@ -7545,7 +7470,7 @@ static int test_lvremove_0_skip (void) static int test_lvremove_0 (void) { if (test_lvremove_0_skip ()) { - printf ("%s skipped (reason: environment variable set)\n", "test_lvremove_0"); + printf (" %s skipped (reason: environment variable set)\n", "test_lvremove_0"); return 0; } @@ -7681,7 +7606,7 @@ static int test_lvremove_1_skip (void) static int test_lvremove_1 (void) { if (test_lvremove_1_skip ()) { - printf ("%s skipped (reason: environment variable set)\n", "test_lvremove_1"); + printf (" %s skipped (reason: environment variable set)\n", "test_lvremove_1"); return 0; } @@ -7805,7 +7730,7 @@ static int test_lvremove_2_skip (void) static int test_lvremove_2 (void) { if (test_lvremove_2_skip ()) { - printf ("%s skipped (reason: environment variable set)\n", "test_lvremove_2"); + printf (" %s skipped (reason: environment variable set)\n", "test_lvremove_2"); return 0; } @@ -7941,7 +7866,7 @@ static int test_mount_ro_0_skip (void) static int test_mount_ro_0 (void) { if (test_mount_ro_0_skip ()) { - printf ("%s skipped (reason: environment variable set)\n", "test_mount_ro_0"); + printf (" %s skipped (reason: environment variable set)\n", "test_mount_ro_0"); return 0; } @@ -8045,7 +7970,7 @@ static int test_mount_ro_1_skip (void) static int test_mount_ro_1 (void) { if (test_mount_ro_1_skip ()) { - printf ("%s skipped (reason: environment variable set)\n", "test_mount_ro_1"); + printf (" %s skipped (reason: environment variable set)\n", "test_mount_ro_1"); return 0; } @@ -8164,7 +8089,7 @@ static int test_tgz_in_0_skip (void) static int test_tgz_in_0 (void) { if (test_tgz_in_0_skip ()) { - printf ("%s skipped (reason: environment variable set)\n", "test_tgz_in_0"); + printf (" %s skipped (reason: environment variable set)\n", "test_tgz_in_0"); return 0; } @@ -8265,7 +8190,7 @@ static int test_tar_in_0_skip (void) static int test_tar_in_0 (void) { if (test_tar_in_0_skip ()) { - printf ("%s skipped (reason: environment variable set)\n", "test_tar_in_0"); + printf (" %s skipped (reason: environment variable set)\n", "test_tar_in_0"); return 0; } @@ -8366,7 +8291,7 @@ static int test_checksum_0_skip (void) static int test_checksum_0 (void) { if (test_checksum_0_skip ()) { - printf ("%s skipped (reason: environment variable set)\n", "test_checksum_0"); + printf (" %s skipped (reason: environment variable set)\n", "test_checksum_0"); return 0; } @@ -8469,7 +8394,7 @@ static int test_checksum_1_skip (void) static int test_checksum_1 (void) { if (test_checksum_1_skip ()) { - printf ("%s skipped (reason: environment variable set)\n", "test_checksum_1"); + printf (" %s skipped (reason: environment variable set)\n", "test_checksum_1"); return 0; } @@ -8558,7 +8483,7 @@ static int test_checksum_2_skip (void) static int test_checksum_2 (void) { if (test_checksum_2_skip ()) { - printf ("%s skipped (reason: environment variable set)\n", "test_checksum_2"); + printf (" %s skipped (reason: environment variable set)\n", "test_checksum_2"); return 0; } @@ -8661,7 +8586,7 @@ static int test_checksum_3_skip (void) static int test_checksum_3 (void) { if (test_checksum_3_skip ()) { - printf ("%s skipped (reason: environment variable set)\n", "test_checksum_3"); + printf (" %s skipped (reason: environment variable set)\n", "test_checksum_3"); return 0; } @@ -8764,7 +8689,7 @@ static int test_checksum_4_skip (void) static int test_checksum_4 (void) { if (test_checksum_4_skip ()) { - printf ("%s skipped (reason: environment variable set)\n", "test_checksum_4"); + printf (" %s skipped (reason: environment variable set)\n", "test_checksum_4"); return 0; } @@ -8867,7 +8792,7 @@ static int test_checksum_5_skip (void) static int test_checksum_5 (void) { if (test_checksum_5_skip ()) { - printf ("%s skipped (reason: environment variable set)\n", "test_checksum_5"); + printf (" %s skipped (reason: environment variable set)\n", "test_checksum_5"); return 0; } @@ -8970,7 +8895,7 @@ static int test_checksum_6_skip (void) static int test_checksum_6 (void) { if (test_checksum_6_skip ()) { - printf ("%s skipped (reason: environment variable set)\n", "test_checksum_6"); + printf (" %s skipped (reason: environment variable set)\n", "test_checksum_6"); return 0; } @@ -9073,7 +8998,7 @@ static int test_checksum_7_skip (void) static int test_checksum_7 (void) { if (test_checksum_7_skip ()) { - printf ("%s skipped (reason: environment variable set)\n", "test_checksum_7"); + printf (" %s skipped (reason: environment variable set)\n", "test_checksum_7"); return 0; } @@ -9176,7 +9101,7 @@ static int test_checksum_8_skip (void) static int test_checksum_8 (void) { if (test_checksum_8_skip ()) { - printf ("%s skipped (reason: environment variable set)\n", "test_checksum_8"); + printf (" %s skipped (reason: environment variable set)\n", "test_checksum_8"); return 0; } @@ -9281,7 +9206,7 @@ static int test_download_0_skip (void) static int test_download_0 (void) { if (test_download_0_skip ()) { - printf ("%s skipped (reason: environment variable set)\n", "test_download_0"); + printf (" %s skipped (reason: environment variable set)\n", "test_download_0"); return 0; } @@ -9399,7 +9324,7 @@ static int test_upload_0_skip (void) static int test_upload_0 (void) { if (test_upload_0_skip ()) { - printf ("%s skipped (reason: environment variable set)\n", "test_upload_0"); + printf (" %s skipped (reason: environment variable set)\n", "test_upload_0"); return 0; } @@ -9501,7 +9426,7 @@ static int test_blockdev_rereadpt_0_skip (void) static int test_blockdev_rereadpt_0 (void) { if (test_blockdev_rereadpt_0_skip ()) { - printf ("%s skipped (reason: environment variable set)\n", "test_blockdev_rereadpt_0"); + printf (" %s skipped (reason: environment variable set)\n", "test_blockdev_rereadpt_0"); return 0; } @@ -9557,7 +9482,7 @@ static int test_blockdev_flushbufs_0_skip (void) static int test_blockdev_flushbufs_0 (void) { if (test_blockdev_flushbufs_0_skip ()) { - printf ("%s skipped (reason: environment variable set)\n", "test_blockdev_flushbufs_0"); + printf (" %s skipped (reason: environment variable set)\n", "test_blockdev_flushbufs_0"); return 0; } @@ -9613,7 +9538,7 @@ static int test_blockdev_getsize64_0_skip (void) static int test_blockdev_getsize64_0 (void) { if (test_blockdev_getsize64_0_skip ()) { - printf ("%s skipped (reason: environment variable set)\n", "test_blockdev_getsize64_0"); + printf (" %s skipped (reason: environment variable set)\n", "test_blockdev_getsize64_0"); return 0; } @@ -9673,7 +9598,7 @@ static int test_blockdev_getsz_0_skip (void) static int test_blockdev_getsz_0 (void) { if (test_blockdev_getsz_0_skip ()) { - printf ("%s skipped (reason: environment variable set)\n", "test_blockdev_getsz_0"); + printf (" %s skipped (reason: environment variable set)\n", "test_blockdev_getsz_0"); return 0; } @@ -9733,7 +9658,7 @@ static int test_blockdev_getbsz_0_skip (void) static int test_blockdev_getbsz_0 (void) { if (test_blockdev_getbsz_0_skip ()) { - printf ("%s skipped (reason: environment variable set)\n", "test_blockdev_getbsz_0"); + printf (" %s skipped (reason: environment variable set)\n", "test_blockdev_getbsz_0"); return 0; } @@ -9793,7 +9718,7 @@ static int test_blockdev_getss_0_skip (void) static int test_blockdev_getss_0 (void) { if (test_blockdev_getss_0_skip ()) { - printf ("%s skipped (reason: environment variable set)\n", "test_blockdev_getss_0"); + printf (" %s skipped (reason: environment variable set)\n", "test_blockdev_getss_0"); return 0; } @@ -9853,7 +9778,7 @@ static int test_blockdev_getro_0_skip (void) static int test_blockdev_getro_0 (void) { if (test_blockdev_getro_0_skip ()) { - printf ("%s skipped (reason: environment variable set)\n", "test_blockdev_getro_0"); + printf (" %s skipped (reason: environment variable set)\n", "test_blockdev_getro_0"); return 0; } @@ -9921,7 +9846,7 @@ static int test_blockdev_setrw_0_skip (void) static int test_blockdev_setrw_0 (void) { if (test_blockdev_setrw_0_skip ()) { - printf ("%s skipped (reason: environment variable set)\n", "test_blockdev_setrw_0"); + printf (" %s skipped (reason: environment variable set)\n", "test_blockdev_setrw_0"); return 0; } @@ -9989,7 +9914,7 @@ static int test_blockdev_setro_0_skip (void) static int test_blockdev_setro_0 (void) { if (test_blockdev_setro_0_skip ()) { - printf ("%s skipped (reason: environment variable set)\n", "test_blockdev_setro_0"); + printf (" %s skipped (reason: environment variable set)\n", "test_blockdev_setro_0"); return 0; } @@ -10057,7 +9982,7 @@ static int test_statvfs_0_skip (void) static int test_statvfs_0 (void) { if (test_statvfs_0_skip ()) { - printf ("%s skipped (reason: environment variable set)\n", "test_statvfs_0"); + printf (" %s skipped (reason: environment variable set)\n", "test_statvfs_0"); return 0; } @@ -10123,14 +10048,9 @@ static int test_statvfs_0 (void) r = guestfs_statvfs (g, path); if (r == NULL) return -1; - if (r->bfree != 487702) { - fprintf (stderr, "test_statvfs_0: bfree was %d, expected 487702\n", - (int) r->bfree); - return -1; - } - if (r->blocks != 490020) { - fprintf (stderr, "test_statvfs_0: blocks was %d, expected 490020\n", - (int) r->blocks); + if (r->namemax != 255) { + fprintf (stderr, "test_statvfs_0: namemax was %d, expected 255\n", + (int) r->namemax); return -1; } if (r->bsize != 1024) { @@ -10160,7 +10080,7 @@ static int test_lstat_0_skip (void) static int test_lstat_0 (void) { if (test_lstat_0_skip ()) { - printf ("%s skipped (reason: environment variable set)\n", "test_lstat_0"); + printf (" %s skipped (reason: environment variable set)\n", "test_lstat_0"); return 0; } @@ -10261,7 +10181,7 @@ static int test_stat_0_skip (void) static int test_stat_0 (void) { if (test_stat_0_skip ()) { - printf ("%s skipped (reason: environment variable set)\n", "test_stat_0"); + printf (" %s skipped (reason: environment variable set)\n", "test_stat_0"); return 0; } @@ -10362,7 +10282,7 @@ static int test_command_lines_0_skip (void) static int test_command_lines_0 (void) { if (test_command_lines_0_skip ()) { - printf ("%s skipped (reason: environment variable set)\n", "test_command_lines_0"); + printf (" %s skipped (reason: environment variable set)\n", "test_command_lines_0"); return 0; } @@ -10492,7 +10412,7 @@ static int test_command_lines_1_skip (void) static int test_command_lines_1 (void) { if (test_command_lines_1_skip ()) { - printf ("%s skipped (reason: environment variable set)\n", "test_command_lines_1"); + printf (" %s skipped (reason: environment variable set)\n", "test_command_lines_1"); return 0; } @@ -10622,7 +10542,7 @@ static int test_command_lines_2_skip (void) static int test_command_lines_2 (void) { if (test_command_lines_2_skip ()) { - printf ("%s skipped (reason: environment variable set)\n", "test_command_lines_2"); + printf (" %s skipped (reason: environment variable set)\n", "test_command_lines_2"); return 0; } @@ -10764,7 +10684,7 @@ static int test_command_lines_3_skip (void) static int test_command_lines_3 (void) { if (test_command_lines_3_skip ()) { - printf ("%s skipped (reason: environment variable set)\n", "test_command_lines_3"); + printf (" %s skipped (reason: environment variable set)\n", "test_command_lines_3"); return 0; } @@ -10906,7 +10826,7 @@ static int test_command_lines_4_skip (void) static int test_command_lines_4 (void) { if (test_command_lines_4_skip ()) { - printf ("%s skipped (reason: environment variable set)\n", "test_command_lines_4"); + printf (" %s skipped (reason: environment variable set)\n", "test_command_lines_4"); return 0; } @@ -11060,7 +10980,7 @@ static int test_command_lines_5_skip (void) static int test_command_lines_5 (void) { if (test_command_lines_5_skip ()) { - printf ("%s skipped (reason: environment variable set)\n", "test_command_lines_5"); + printf (" %s skipped (reason: environment variable set)\n", "test_command_lines_5"); return 0; } @@ -11226,7 +11146,7 @@ static int test_command_lines_6_skip (void) static int test_command_lines_6 (void) { if (test_command_lines_6_skip ()) { - printf ("%s skipped (reason: environment variable set)\n", "test_command_lines_6"); + printf (" %s skipped (reason: environment variable set)\n", "test_command_lines_6"); return 0; } @@ -11344,7 +11264,7 @@ static int test_command_lines_7_skip (void) static int test_command_lines_7 (void) { if (test_command_lines_7_skip ()) { - printf ("%s skipped (reason: environment variable set)\n", "test_command_lines_7"); + printf (" %s skipped (reason: environment variable set)\n", "test_command_lines_7"); return 0; } @@ -11474,7 +11394,7 @@ static int test_command_lines_8_skip (void) static int test_command_lines_8 (void) { if (test_command_lines_8_skip ()) { - printf ("%s skipped (reason: environment variable set)\n", "test_command_lines_8"); + printf (" %s skipped (reason: environment variable set)\n", "test_command_lines_8"); return 0; } @@ -11616,7 +11536,7 @@ static int test_command_lines_9_skip (void) static int test_command_lines_9 (void) { if (test_command_lines_9_skip ()) { - printf ("%s skipped (reason: environment variable set)\n", "test_command_lines_9"); + printf (" %s skipped (reason: environment variable set)\n", "test_command_lines_9"); return 0; } @@ -11758,7 +11678,7 @@ static int test_command_lines_10_skip (void) static int test_command_lines_10 (void) { if (test_command_lines_10_skip ()) { - printf ("%s skipped (reason: environment variable set)\n", "test_command_lines_10"); + printf (" %s skipped (reason: environment variable set)\n", "test_command_lines_10"); return 0; } @@ -11900,7 +11820,7 @@ static int test_command_0_skip (void) static int test_command_0 (void) { if (test_command_0_skip ()) { - printf ("%s skipped (reason: environment variable set)\n", "test_command_0"); + printf (" %s skipped (reason: environment variable set)\n", "test_command_0"); return 0; } @@ -12015,7 +11935,7 @@ static int test_command_1_skip (void) static int test_command_1 (void) { if (test_command_1_skip ()) { - printf ("%s skipped (reason: environment variable set)\n", "test_command_1"); + printf (" %s skipped (reason: environment variable set)\n", "test_command_1"); return 0; } @@ -12130,7 +12050,7 @@ static int test_command_2_skip (void) static int test_command_2 (void) { if (test_command_2_skip ()) { - printf ("%s skipped (reason: environment variable set)\n", "test_command_2"); + printf (" %s skipped (reason: environment variable set)\n", "test_command_2"); return 0; } @@ -12245,7 +12165,7 @@ static int test_command_3_skip (void) static int test_command_3 (void) { if (test_command_3_skip ()) { - printf ("%s skipped (reason: environment variable set)\n", "test_command_3"); + printf (" %s skipped (reason: environment variable set)\n", "test_command_3"); return 0; } @@ -12360,7 +12280,7 @@ static int test_command_4_skip (void) static int test_command_4 (void) { if (test_command_4_skip ()) { - printf ("%s skipped (reason: environment variable set)\n", "test_command_4"); + printf (" %s skipped (reason: environment variable set)\n", "test_command_4"); return 0; } @@ -12475,7 +12395,7 @@ static int test_command_5_skip (void) static int test_command_5 (void) { if (test_command_5_skip ()) { - printf ("%s skipped (reason: environment variable set)\n", "test_command_5"); + printf (" %s skipped (reason: environment variable set)\n", "test_command_5"); return 0; } @@ -12590,7 +12510,7 @@ static int test_command_6_skip (void) static int test_command_6 (void) { if (test_command_6_skip ()) { - printf ("%s skipped (reason: environment variable set)\n", "test_command_6"); + printf (" %s skipped (reason: environment variable set)\n", "test_command_6"); return 0; } @@ -12705,7 +12625,7 @@ static int test_command_7_skip (void) static int test_command_7 (void) { if (test_command_7_skip ()) { - printf ("%s skipped (reason: environment variable set)\n", "test_command_7"); + printf (" %s skipped (reason: environment variable set)\n", "test_command_7"); return 0; } @@ -12820,7 +12740,7 @@ static int test_command_8_skip (void) static int test_command_8 (void) { if (test_command_8_skip ()) { - printf ("%s skipped (reason: environment variable set)\n", "test_command_8"); + printf (" %s skipped (reason: environment variable set)\n", "test_command_8"); return 0; } @@ -12935,7 +12855,7 @@ static int test_command_9_skip (void) static int test_command_9 (void) { if (test_command_9_skip ()) { - printf ("%s skipped (reason: environment variable set)\n", "test_command_9"); + printf (" %s skipped (reason: environment variable set)\n", "test_command_9"); return 0; } @@ -13050,7 +12970,7 @@ static int test_command_10_skip (void) static int test_command_10 (void) { if (test_command_10_skip ()) { - printf ("%s skipped (reason: environment variable set)\n", "test_command_10"); + printf (" %s skipped (reason: environment variable set)\n", "test_command_10"); return 0; } @@ -13165,7 +13085,7 @@ static int test_command_11_skip (void) static int test_command_11 (void) { if (test_command_11_skip ()) { - printf ("%s skipped (reason: environment variable set)\n", "test_command_11"); + printf (" %s skipped (reason: environment variable set)\n", "test_command_11"); return 0; } @@ -13273,7 +13193,7 @@ static int test_file_0_skip (void) static int test_file_0 (void) { if (test_file_0_skip ()) { - printf ("%s skipped (reason: environment variable set)\n", "test_file_0"); + printf (" %s skipped (reason: environment variable set)\n", "test_file_0"); return 0; } @@ -13374,7 +13294,7 @@ static int test_file_1_skip (void) static int test_file_1 (void) { if (test_file_1_skip ()) { - printf ("%s skipped (reason: environment variable set)\n", "test_file_1"); + printf (" %s skipped (reason: environment variable set)\n", "test_file_1"); return 0; } @@ -13476,7 +13396,7 @@ static int test_file_2_skip (void) static int test_file_2 (void) { if (test_file_2_skip ()) { - printf ("%s skipped (reason: environment variable set)\n", "test_file_2"); + printf (" %s skipped (reason: environment variable set)\n", "test_file_2"); return 0; } @@ -13564,7 +13484,7 @@ static int test_umount_all_0_skip (void) static int test_umount_all_0 (void) { if (test_umount_all_0_skip ()) { - printf ("%s skipped (reason: environment variable set)\n", "test_umount_all_0"); + printf (" %s skipped (reason: environment variable set)\n", "test_umount_all_0"); return 0; } @@ -13666,7 +13586,7 @@ static int test_umount_all_1_skip (void) static int test_umount_all_1 (void) { if (test_umount_all_1_skip ()) { - printf ("%s skipped (reason: environment variable set)\n", "test_umount_all_1"); + printf (" %s skipped (reason: environment variable set)\n", "test_umount_all_1"); return 0; } @@ -13696,8 +13616,8 @@ static int test_umount_all_1 (void) /* TestOutputList for umount_all (1) */ { char device[] = "/dev/sda"; - char lines_0[] = ",10"; - char lines_1[] = ",20"; + char lines_0[] = ",200"; + char lines_1[] = ",400"; char lines_2[] = ","; char *lines[] = { lines_0, @@ -13832,7 +13752,7 @@ static int test_mounts_0_skip (void) static int test_mounts_0 (void) { if (test_mounts_0_skip ()) { - printf ("%s skipped (reason: environment variable set)\n", "test_mounts_0"); + printf (" %s skipped (reason: environment variable set)\n", "test_mounts_0"); return 0; } @@ -13940,7 +13860,7 @@ static int test_umount_0_skip (void) static int test_umount_0 (void) { if (test_umount_0_skip ()) { - printf ("%s skipped (reason: environment variable set)\n", "test_umount_0"); + printf (" %s skipped (reason: environment variable set)\n", "test_umount_0"); return 0; } @@ -14048,7 +13968,7 @@ static int test_umount_1_skip (void) static int test_umount_1 (void) { if (test_umount_1_skip ()) { - printf ("%s skipped (reason: environment variable set)\n", "test_umount_1"); + printf (" %s skipped (reason: environment variable set)\n", "test_umount_1"); return 0; } @@ -14151,7 +14071,7 @@ static int test_write_file_0_skip (void) static int test_write_file_0 (void) { if (test_write_file_0_skip ()) { - printf ("%s skipped (reason: environment variable set)\n", "test_write_file_0"); + printf (" %s skipped (reason: environment variable set)\n", "test_write_file_0"); return 0; } @@ -14253,7 +14173,7 @@ static int test_write_file_1_skip (void) static int test_write_file_1 (void) { if (test_write_file_1_skip ()) { - printf ("%s skipped (reason: environment variable set)\n", "test_write_file_1"); + printf (" %s skipped (reason: environment variable set)\n", "test_write_file_1"); return 0; } @@ -14355,7 +14275,7 @@ static int test_write_file_2_skip (void) static int test_write_file_2 (void) { if (test_write_file_2_skip ()) { - printf ("%s skipped (reason: environment variable set)\n", "test_write_file_2"); + printf (" %s skipped (reason: environment variable set)\n", "test_write_file_2"); return 0; } @@ -14457,7 +14377,7 @@ static int test_write_file_3_skip (void) static int test_write_file_3 (void) { if (test_write_file_3_skip ()) { - printf ("%s skipped (reason: environment variable set)\n", "test_write_file_3"); + printf (" %s skipped (reason: environment variable set)\n", "test_write_file_3"); return 0; } @@ -14559,7 +14479,7 @@ static int test_write_file_4_skip (void) static int test_write_file_4 (void) { if (test_write_file_4_skip ()) { - printf ("%s skipped (reason: environment variable set)\n", "test_write_file_4"); + printf (" %s skipped (reason: environment variable set)\n", "test_write_file_4"); return 0; } @@ -14661,7 +14581,7 @@ static int test_write_file_5_skip (void) static int test_write_file_5 (void) { if (test_write_file_5_skip ()) { - printf ("%s skipped (reason: environment variable set)\n", "test_write_file_5"); + printf (" %s skipped (reason: environment variable set)\n", "test_write_file_5"); return 0; } @@ -14763,7 +14683,7 @@ static int test_mkfs_0_skip (void) static int test_mkfs_0 (void) { if (test_mkfs_0_skip ()) { - printf ("%s skipped (reason: environment variable set)\n", "test_mkfs_0"); + printf (" %s skipped (reason: environment variable set)\n", "test_mkfs_0"); return 0; } @@ -14865,7 +14785,7 @@ static int test_lvcreate_0_skip (void) static int test_lvcreate_0 (void) { if (test_lvcreate_0_skip ()) { - printf ("%s skipped (reason: environment variable set)\n", "test_lvcreate_0"); + printf (" %s skipped (reason: environment variable set)\n", "test_lvcreate_0"); return 0; } @@ -14895,8 +14815,8 @@ static int test_lvcreate_0 (void) /* TestOutputList for lvcreate (0) */ { char device[] = "/dev/sda"; - char lines_0[] = ",10"; - char lines_1[] = ",20"; + char lines_0[] = ",200"; + char lines_1[] = ",400"; char lines_2[] = ","; char *lines[] = { lines_0, @@ -15103,7 +15023,7 @@ static int test_vgcreate_0_skip (void) static int test_vgcreate_0 (void) { if (test_vgcreate_0_skip ()) { - printf ("%s skipped (reason: environment variable set)\n", "test_vgcreate_0"); + printf (" %s skipped (reason: environment variable set)\n", "test_vgcreate_0"); return 0; } @@ -15133,8 +15053,8 @@ static int test_vgcreate_0 (void) /* TestOutputList for vgcreate (0) */ { char device[] = "/dev/sda"; - char lines_0[] = ",10"; - char lines_1[] = ",20"; + char lines_0[] = ",200"; + char lines_1[] = ",400"; char lines_2[] = ","; char *lines[] = { lines_0, @@ -15260,7 +15180,7 @@ static int test_pvcreate_0_skip (void) static int test_pvcreate_0 (void) { if (test_pvcreate_0_skip ()) { - printf ("%s skipped (reason: environment variable set)\n", "test_pvcreate_0"); + printf (" %s skipped (reason: environment variable set)\n", "test_pvcreate_0"); return 0; } @@ -15290,8 +15210,8 @@ static int test_pvcreate_0 (void) /* TestOutputListOfDevices for pvcreate (0) */ { char device[] = "/dev/sda"; - char lines_0[] = ",10"; - char lines_1[] = ",20"; + char lines_0[] = ",200"; + char lines_1[] = ",400"; char lines_2[] = ","; char *lines[] = { lines_0, @@ -15404,7 +15324,7 @@ static int test_is_dir_0_skip (void) static int test_is_dir_0 (void) { if (test_is_dir_0_skip ()) { - printf ("%s skipped (reason: environment variable set)\n", "test_is_dir_0"); + printf (" %s skipped (reason: environment variable set)\n", "test_is_dir_0"); return 0; } @@ -15503,7 +15423,7 @@ static int test_is_dir_1_skip (void) static int test_is_dir_1 (void) { if (test_is_dir_1_skip ()) { - printf ("%s skipped (reason: environment variable set)\n", "test_is_dir_1"); + printf (" %s skipped (reason: environment variable set)\n", "test_is_dir_1"); return 0; } @@ -15602,7 +15522,7 @@ static int test_is_file_0_skip (void) static int test_is_file_0 (void) { if (test_is_file_0_skip ()) { - printf ("%s skipped (reason: environment variable set)\n", "test_is_file_0"); + printf (" %s skipped (reason: environment variable set)\n", "test_is_file_0"); return 0; } @@ -15701,7 +15621,7 @@ static int test_is_file_1_skip (void) static int test_is_file_1 (void) { if (test_is_file_1_skip ()) { - printf ("%s skipped (reason: environment variable set)\n", "test_is_file_1"); + printf (" %s skipped (reason: environment variable set)\n", "test_is_file_1"); return 0; } @@ -15800,7 +15720,7 @@ static int test_exists_0_skip (void) static int test_exists_0 (void) { if (test_exists_0_skip ()) { - printf ("%s skipped (reason: environment variable set)\n", "test_exists_0"); + printf (" %s skipped (reason: environment variable set)\n", "test_exists_0"); return 0; } @@ -15899,7 +15819,7 @@ static int test_exists_1_skip (void) static int test_exists_1 (void) { if (test_exists_1_skip ()) { - printf ("%s skipped (reason: environment variable set)\n", "test_exists_1"); + printf (" %s skipped (reason: environment variable set)\n", "test_exists_1"); return 0; } @@ -15998,7 +15918,7 @@ static int test_mkdir_p_0_skip (void) static int test_mkdir_p_0 (void) { if (test_mkdir_p_0_skip ()) { - printf ("%s skipped (reason: environment variable set)\n", "test_mkdir_p_0"); + printf (" %s skipped (reason: environment variable set)\n", "test_mkdir_p_0"); return 0; } @@ -16097,7 +16017,7 @@ static int test_mkdir_p_1_skip (void) static int test_mkdir_p_1 (void) { if (test_mkdir_p_1_skip ()) { - printf ("%s skipped (reason: environment variable set)\n", "test_mkdir_p_1"); + printf (" %s skipped (reason: environment variable set)\n", "test_mkdir_p_1"); return 0; } @@ -16196,7 +16116,7 @@ static int test_mkdir_p_2_skip (void) static int test_mkdir_p_2 (void) { if (test_mkdir_p_2_skip ()) { - printf ("%s skipped (reason: environment variable set)\n", "test_mkdir_p_2"); + printf (" %s skipped (reason: environment variable set)\n", "test_mkdir_p_2"); return 0; } @@ -16295,7 +16215,7 @@ static int test_mkdir_p_3_skip (void) static int test_mkdir_p_3 (void) { if (test_mkdir_p_3_skip ()) { - printf ("%s skipped (reason: environment variable set)\n", "test_mkdir_p_3"); + printf (" %s skipped (reason: environment variable set)\n", "test_mkdir_p_3"); return 0; } @@ -16390,7 +16310,7 @@ static int test_mkdir_p_4_skip (void) static int test_mkdir_p_4 (void) { if (test_mkdir_p_4_skip ()) { - printf ("%s skipped (reason: environment variable set)\n", "test_mkdir_p_4"); + printf (" %s skipped (reason: environment variable set)\n", "test_mkdir_p_4"); return 0; } @@ -16485,7 +16405,7 @@ static int test_mkdir_0_skip (void) static int test_mkdir_0 (void) { if (test_mkdir_0_skip ()) { - printf ("%s skipped (reason: environment variable set)\n", "test_mkdir_0"); + printf (" %s skipped (reason: environment variable set)\n", "test_mkdir_0"); return 0; } @@ -16584,7 +16504,7 @@ static int test_mkdir_1_skip (void) static int test_mkdir_1 (void) { if (test_mkdir_1_skip ()) { - printf ("%s skipped (reason: environment variable set)\n", "test_mkdir_1"); + printf (" %s skipped (reason: environment variable set)\n", "test_mkdir_1"); return 0; } @@ -16671,7 +16591,7 @@ static int test_rm_rf_0_skip (void) static int test_rm_rf_0 (void) { if (test_rm_rf_0_skip ()) { - printf ("%s skipped (reason: environment variable set)\n", "test_rm_rf_0"); + printf (" %s skipped (reason: environment variable set)\n", "test_rm_rf_0"); return 0; } @@ -16794,7 +16714,7 @@ static int test_rmdir_0_skip (void) static int test_rmdir_0 (void) { if (test_rmdir_0_skip ()) { - printf ("%s skipped (reason: environment variable set)\n", "test_rmdir_0"); + printf (" %s skipped (reason: environment variable set)\n", "test_rmdir_0"); return 0; } @@ -16889,7 +16809,7 @@ static int test_rmdir_1_skip (void) static int test_rmdir_1 (void) { if (test_rmdir_1_skip ()) { - printf ("%s skipped (reason: environment variable set)\n", "test_rmdir_1"); + printf (" %s skipped (reason: environment variable set)\n", "test_rmdir_1"); return 0; } @@ -16976,7 +16896,7 @@ static int test_rmdir_2_skip (void) static int test_rmdir_2 (void) { if (test_rmdir_2_skip ()) { - printf ("%s skipped (reason: environment variable set)\n", "test_rmdir_2"); + printf (" %s skipped (reason: environment variable set)\n", "test_rmdir_2"); return 0; } @@ -17071,7 +16991,7 @@ static int test_rm_0_skip (void) static int test_rm_0 (void) { if (test_rm_0_skip ()) { - printf ("%s skipped (reason: environment variable set)\n", "test_rm_0"); + printf (" %s skipped (reason: environment variable set)\n", "test_rm_0"); return 0; } @@ -17166,7 +17086,7 @@ static int test_rm_1_skip (void) static int test_rm_1 (void) { if (test_rm_1_skip ()) { - printf ("%s skipped (reason: environment variable set)\n", "test_rm_1"); + printf (" %s skipped (reason: environment variable set)\n", "test_rm_1"); return 0; } @@ -17253,7 +17173,7 @@ static int test_rm_2_skip (void) static int test_rm_2 (void) { if (test_rm_2_skip ()) { - printf ("%s skipped (reason: environment variable set)\n", "test_rm_2"); + printf (" %s skipped (reason: environment variable set)\n", "test_rm_2"); return 0; } @@ -17348,7 +17268,7 @@ static int test_read_lines_0_skip (void) static int test_read_lines_0 (void) { if (test_read_lines_0_skip ()) { - printf ("%s skipped (reason: environment variable set)\n", "test_read_lines_0"); + printf (" %s skipped (reason: environment variable set)\n", "test_read_lines_0"); return 0; } @@ -17489,7 +17409,7 @@ static int test_read_lines_1_skip (void) static int test_read_lines_1 (void) { if (test_read_lines_1_skip ()) { - printf ("%s skipped (reason: environment variable set)\n", "test_read_lines_1"); + printf (" %s skipped (reason: environment variable set)\n", "test_read_lines_1"); return 0; } @@ -17594,7 +17514,7 @@ static int test_lvs_0_skip (void) static int test_lvs_0 (void) { if (test_lvs_0_skip ()) { - printf ("%s skipped (reason: environment variable set)\n", "test_lvs_0"); + printf (" %s skipped (reason: environment variable set)\n", "test_lvs_0"); return 0; } @@ -17731,7 +17651,7 @@ static int test_lvs_1_skip (void) static int test_lvs_1 (void) { if (test_lvs_1_skip ()) { - printf ("%s skipped (reason: environment variable set)\n", "test_lvs_1"); + printf (" %s skipped (reason: environment variable set)\n", "test_lvs_1"); return 0; } @@ -17761,8 +17681,8 @@ static int test_lvs_1 (void) /* TestOutputList for lvs (1) */ { char device[] = "/dev/sda"; - char lines_0[] = ",10"; - char lines_1[] = ",20"; + char lines_0[] = ",200"; + char lines_1[] = ",400"; char lines_2[] = ","; char *lines[] = { lines_0, @@ -17927,7 +17847,7 @@ static int test_vgs_0_skip (void) static int test_vgs_0 (void) { if (test_vgs_0_skip ()) { - printf ("%s skipped (reason: environment variable set)\n", "test_vgs_0"); + printf (" %s skipped (reason: environment variable set)\n", "test_vgs_0"); return 0; } @@ -18064,7 +17984,7 @@ static int test_vgs_1_skip (void) static int test_vgs_1 (void) { if (test_vgs_1_skip ()) { - printf ("%s skipped (reason: environment variable set)\n", "test_vgs_1"); + printf (" %s skipped (reason: environment variable set)\n", "test_vgs_1"); return 0; } @@ -18094,8 +18014,8 @@ static int test_vgs_1 (void) /* TestOutputList for vgs (1) */ { char device[] = "/dev/sda"; - char lines_0[] = ",10"; - char lines_1[] = ",20"; + char lines_0[] = ",200"; + char lines_1[] = ",400"; char lines_2[] = ","; char *lines[] = { lines_0, @@ -18221,7 +18141,7 @@ static int test_pvs_0_skip (void) static int test_pvs_0 (void) { if (test_pvs_0_skip ()) { - printf ("%s skipped (reason: environment variable set)\n", "test_pvs_0"); + printf (" %s skipped (reason: environment variable set)\n", "test_pvs_0"); return 0; } @@ -18359,7 +18279,7 @@ static int test_pvs_1_skip (void) static int test_pvs_1 (void) { if (test_pvs_1_skip ()) { - printf ("%s skipped (reason: environment variable set)\n", "test_pvs_1"); + printf (" %s skipped (reason: environment variable set)\n", "test_pvs_1"); return 0; } @@ -18389,8 +18309,8 @@ static int test_pvs_1 (void) /* TestOutputListOfDevices for pvs (1) */ { char device[] = "/dev/sda"; - char lines_0[] = ",10"; - char lines_1[] = ",20"; + char lines_0[] = ",200"; + char lines_1[] = ",400"; char lines_2[] = ","; char *lines[] = { lines_0, @@ -18503,7 +18423,7 @@ static int test_list_partitions_0_skip (void) static int test_list_partitions_0 (void) { if (test_list_partitions_0_skip ()) { - printf ("%s skipped (reason: environment variable set)\n", "test_list_partitions_0"); + printf (" %s skipped (reason: environment variable set)\n", "test_list_partitions_0"); return 0; } @@ -18611,7 +18531,7 @@ static int test_list_partitions_1_skip (void) static int test_list_partitions_1 (void) { if (test_list_partitions_1_skip ()) { - printf ("%s skipped (reason: environment variable set)\n", "test_list_partitions_1"); + printf (" %s skipped (reason: environment variable set)\n", "test_list_partitions_1"); return 0; } @@ -18641,8 +18561,8 @@ static int test_list_partitions_1 (void) /* TestOutputListOfDevices for list_partitions (1) */ { char device[] = "/dev/sda"; - char lines_0[] = ",10"; - char lines_1[] = ",20"; + char lines_0[] = ",200"; + char lines_1[] = ",400"; char lines_2[] = ","; char *lines[] = { lines_0, @@ -18731,7 +18651,7 @@ static int test_list_devices_0_skip (void) static int test_list_devices_0 (void) { if (test_list_devices_0_skip ()) { - printf ("%s skipped (reason: environment variable set)\n", "test_list_devices_0"); + printf (" %s skipped (reason: environment variable set)\n", "test_list_devices_0"); return 0; } @@ -18847,7 +18767,7 @@ static int test_ls_0_skip (void) static int test_ls_0 (void) { if (test_ls_0_skip ()) { - printf ("%s skipped (reason: environment variable set)\n", "test_ls_0"); + printf (" %s skipped (reason: environment variable set)\n", "test_ls_0"); return 0; } @@ -19015,7 +18935,7 @@ static int test_cat_0_skip (void) static int test_cat_0 (void) { if (test_cat_0_skip ()) { - printf ("%s skipped (reason: environment variable set)\n", "test_cat_0"); + printf (" %s skipped (reason: environment variable set)\n", "test_cat_0"); return 0; } @@ -19117,7 +19037,7 @@ static int test_touch_0_skip (void) static int test_touch_0 (void) { if (test_touch_0_skip ()) { - printf ("%s skipped (reason: environment variable set)\n", "test_touch_0"); + printf (" %s skipped (reason: environment variable set)\n", "test_touch_0"); return 0; } @@ -19216,7 +19136,7 @@ static int test_sync_0_skip (void) static int test_sync_0 (void) { if (test_sync_0_skip ()) { - printf ("%s skipped (reason: environment variable set)\n", "test_sync_0"); + printf (" %s skipped (reason: environment variable set)\n", "test_sync_0"); return 0; } @@ -19271,7 +19191,7 @@ static int test_mount_0_skip (void) static int test_mount_0 (void) { if (test_mount_0_skip ()) { - printf ("%s skipped (reason: environment variable set)\n", "test_mount_0"); + printf (" %s skipped (reason: environment variable set)\n", "test_mount_0"); return 0; } @@ -19364,6 +19284,8 @@ int main (int argc, char *argv[]) int fd; int nr_tests, test_num = 0; + setbuf (stdout, NULL); + no_test_warnings (); g = guestfs_create (); diff --git a/fish/cmds.c b/fish/cmds.c index 15df267..fe59737 100644 --- a/fish/cmds.c +++ b/fish/cmds.c @@ -203,13 +203,13 @@ void display_command (const char *cmd) pod2text ("kill-subprocess - kill the qemu subprocess", " kill-subprocess\n\nThis kills the qemu subprocess. You should never need to call this."); else if (strcasecmp (cmd, "add_drive") == 0 || strcasecmp (cmd, "add-drive") == 0 || strcasecmp (cmd, "add") == 0) - pod2text ("add-drive - add an image to examine or modify", " add-drive \n\nThis function adds a virtual machine disk image C to the\nguest. The first time you call this function, the disk appears as IDE\ndisk 0 (C) in the guest, the second time as C, and\nso on.\n\nYou don't necessarily need to be root when using libguestfs. However\nyou obviously do need sufficient permissions to access the filename\nfor whatever operations you want to perform (ie. read access if you\njust want to read the image or write access if you want to modify the\nimage).\n\nThis is equivalent to the qemu parameter C<-drive file=filename,cache=off>.\n\nNote that this call checks for the existence of C. This\nstops you from specifying other types of drive which are supported\nby qemu such as C and C URLs. To specify those, use\nthe general C call instead.\n\nYou can use 'add' as an alias for this command."); + pod2text ("add-drive - add an image to examine or modify", " add-drive \n\nThis function adds a virtual machine disk image C to the\nguest. The first time you call this function, the disk appears as IDE\ndisk 0 (C) in the guest, the second time as C, and\nso on.\n\nYou don't necessarily need to be root when using libguestfs. However\nyou obviously do need sufficient permissions to access the filename\nfor whatever operations you want to perform (ie. read access if you\njust want to read the image or write access if you want to modify the\nimage).\n\nThis is equivalent to the qemu parameter\nC<-drive file=filename,cache=off,if=virtio>.\n\nNote that this call checks for the existence of C. This\nstops you from specifying other types of drive which are supported\nby qemu such as C and C URLs. To specify those, use\nthe general C call instead.\n\nYou can use 'add' as an alias for this command."); else if (strcasecmp (cmd, "add_cdrom") == 0 || strcasecmp (cmd, "add-cdrom") == 0 || strcasecmp (cmd, "cdrom") == 0) pod2text ("add-cdrom - add a CD-ROM disk image to examine", " add-cdrom \n\nThis function adds a virtual CD-ROM disk image to the guest.\n\nThis is equivalent to the qemu parameter C<-cdrom filename>.\n\nNote that this call checks for the existence of C. This\nstops you from specifying other types of drive which are supported\nby qemu such as C and C URLs. To specify those, use\nthe general C call instead.\n\nYou can use 'cdrom' as an alias for this command."); else if (strcasecmp (cmd, "add_drive_ro") == 0 || strcasecmp (cmd, "add-drive-ro") == 0 || strcasecmp (cmd, "add-ro") == 0) - pod2text ("add-drive-ro - add a drive in snapshot mode (read-only)", " add-drive-ro \n\nThis adds a drive in snapshot mode, making it effectively\nread-only.\n\nNote that writes to the device are allowed, and will be seen for\nthe duration of the guestfs handle, but they are written\nto a temporary file which is discarded as soon as the guestfs\nhandle is closed. We don't currently have any method to enable\nchanges to be committed, although qemu can support this.\n\nThis is equivalent to the qemu parameter\nC<-drive file=filename,snapshot=on>.\n\nNote that this call checks for the existence of C. This\nstops you from specifying other types of drive which are supported\nby qemu such as C and C URLs. To specify those, use\nthe general C call instead.\n\nYou can use 'add-ro' as an alias for this command."); + pod2text ("add-drive-ro - add a drive in snapshot mode (read-only)", " add-drive-ro \n\nThis adds a drive in snapshot mode, making it effectively\nread-only.\n\nNote that writes to the device are allowed, and will be seen for\nthe duration of the guestfs handle, but they are written\nto a temporary file which is discarded as soon as the guestfs\nhandle is closed. We don't currently have any method to enable\nchanges to be committed, although qemu can support this.\n\nThis is equivalent to the qemu parameter\nC<-drive file=filename,snapshot=on,if=virtio>.\n\nNote that this call checks for the existence of C. This\nstops you from specifying other types of drive which are supported\nby qemu such as C and C URLs. To specify those, use\nthe general C call instead.\n\nYou can use 'add-ro' as an alias for this command."); else if (strcasecmp (cmd, "config") == 0) pod2text ("config - add qemu parameters", " config \n\nThis can be used to add arbitrary qemu command line parameters\nof the form C<-param value>. Actually it's not quite arbitrary - we\nprevent you from setting some parameters which would interfere with\nparameters that we use.\n\nThe first character of C string must be a C<-> (dash).\n\nC can be NULL."); @@ -674,7 +674,7 @@ void display_command (const char *cmd) pod2text ("mknod-c - make char device node", " mknod-c \n\nThis call creates a char device node called C with\nmode C and device major/minor C and C.\nIt is just a convenient wrapper around C."); else if (strcasecmp (cmd, "umask") == 0) - pod2text ("umask - set file mode creation mask (umask)", " umask \n\nThis function sets the mask used for creating new files and\ndevice nodes to C.\n\nTypical umask values would be C<022> which creates new files\nwith permissions like \"-rw-r--r--\" or \"-rwxr-xr-x\", and\nC<002> which creates new files with permissions like\n\"-rw-rw-r--\" or \"-rwxrwxr-x\".\n\nSee also L, C, C.\n\nThis call returns the previous umask."); + pod2text ("umask - set file mode creation mask (umask)", " umask \n\nThis function sets the mask used for creating new files and\ndevice nodes to C.\n\nTypical umask values would be C<022> which creates new files\nwith permissions like \"-rw-r--r--\" or \"-rwxr-xr-x\", and\nC<002> which creates new files with permissions like\n\"-rw-rw-r--\" or \"-rwxrwxr-x\".\n\nThe default umask is C<022>. This is important because it\nmeans that directories and device nodes will be created with\nC<0644> or C<0755> mode even if you specify C<0777>.\n\nSee also L, C, C.\n\nThis call returns the previous umask."); else display_builtin_command (cmd); } diff --git a/guestfish-actions.pod b/guestfish-actions.pod index 8ced2e1..e727120 100644 --- a/guestfish-actions.pod +++ b/guestfish-actions.pod @@ -26,7 +26,8 @@ for whatever operations you want to perform (ie. read access if you just want to read the image or write access if you want to modify the image). -This is equivalent to the qemu parameter C<-drive file=filename,cache=off>. +This is equivalent to the qemu parameter +C<-drive file=filename,cache=off,if=virtio>. Note that this call checks for the existence of C. This stops you from specifying other types of drive which are supported @@ -47,7 +48,7 @@ handle is closed. We don't currently have any method to enable changes to be committed, although qemu can support this. This is equivalent to the qemu parameter -C<-drive file=filename,snapshot=on>. +C<-drive file=filename,snapshot=on,if=virtio>. Note that this call checks for the existence of C. This stops you from specifying other types of drive which are supported @@ -1665,6 +1666,10 @@ with permissions like "-rw-r--r--" or "-rwxr-xr-x", and C<002> which creates new files with permissions like "-rw-rw-r--" or "-rwxrwxr-x". +The default umask is C<022>. This is important because it +means that directories and device nodes will be created with +C<0644> or C<0755> mode even if you specify C<0777>. + See also L, C, C. This call returns the previous umask. diff --git a/guestfs-actions.pod b/guestfs-actions.pod index 50eba95..5f66318 100644 --- a/guestfs-actions.pod +++ b/guestfs-actions.pod @@ -30,7 +30,8 @@ for whatever operations you want to perform (ie. read access if you just want to read the image or write access if you want to modify the image). -This is equivalent to the qemu parameter C<-drive file=filename,cache=off>. +This is equivalent to the qemu parameter +C<-drive file=filename,cache=off,if=virtio>. Note that this call checks for the existence of C. This stops you from specifying other types of drive which are supported @@ -54,7 +55,7 @@ handle is closed. We don't currently have any method to enable changes to be committed, although qemu can support this. This is equivalent to the qemu parameter -C<-drive file=filename,snapshot=on>. +C<-drive file=filename,snapshot=on,if=virtio>. Note that this call checks for the existence of C. This stops you from specifying other types of drive which are supported @@ -2240,6 +2241,10 @@ with permissions like "-rw-r--r--" or "-rwxr-xr-x", and C<002> which creates new files with permissions like "-rw-rw-r--" or "-rwxrwxr-x". +The default umask is C<022>. This is important because it +means that directories and device nodes will be created with +C<0644> or C<0755> mode even if you specify C<0777>. + See also L, C, C. This call returns the previous umask. diff --git a/java/com/redhat/et/libguestfs/GuestFS.java b/java/com/redhat/et/libguestfs/GuestFS.java index 3cb1c7f..cc94a98 100644 --- a/java/com/redhat/et/libguestfs/GuestFS.java +++ b/java/com/redhat/et/libguestfs/GuestFS.java @@ -427,7 +427,7 @@ public HashMap test0rhashtableerr () * to modify the image). *

* This is equivalent to the qemu parameter "-drive - * file=filename,cache=off". + * file=filename,cache=off,if=virtio". *

* Note that this call checks for the existence of * "filename". This stops you from specifying other types @@ -488,7 +488,7 @@ public HashMap test0rhashtableerr () * although qemu can support this. *

* This is equivalent to the qemu parameter "-drive - * file=filename,snapshot=on". + * file=filename,snapshot=on,if=virtio". *

* Note that this call checks for the existence of * "filename". This stops you from specifying other types @@ -4034,6 +4034,10 @@ public HashMap test0rhashtableerr () * "-rwxr-xr-x", and 002 which creates new files with * permissions like "-rw-rw-r--" or "-rwxrwxr-x". *

+ * The default umask is 022. This is important because it + * means that directories and device nodes will be created + * with 0644 or 0755 mode even if you specify 0777. + *

* See also umask(2), "g.mknod", "g.mkdir". *

* This call returns the previous umask. diff --git a/perl/lib/Sys/Guestfs.pm b/perl/lib/Sys/Guestfs.pm index 083a017..cd26bed 100644 --- a/perl/lib/Sys/Guestfs.pm +++ b/perl/lib/Sys/Guestfs.pm @@ -115,7 +115,8 @@ for whatever operations you want to perform (ie. read access if you just want to read the image or write access if you want to modify the image). -This is equivalent to the qemu parameter C<-drive file=filename,cache=off>. +This is equivalent to the qemu parameter +C<-drive file=filename,cache=off,if=virtio>. Note that this call checks for the existence of C. This stops you from specifying other types of drive which are supported @@ -134,7 +135,7 @@ handle is closed. We don't currently have any method to enable changes to be committed, although qemu can support this. This is equivalent to the qemu parameter -C<-drive file=filename,snapshot=on>. +C<-drive file=filename,snapshot=on,if=virtio>. Note that this call checks for the existence of C. This stops you from specifying other types of drive which are supported @@ -1480,6 +1481,10 @@ with permissions like "-rw-r--r--" or "-rwxr-xr-x", and C<002> which creates new files with permissions like "-rw-rw-r--" or "-rwxrwxr-x". +The default umask is C<022>. This is important because it +means that directories and device nodes will be created with +C<0644> or C<0755> mode even if you specify C<0777>. + See also L, C<$h-Emknod>, C<$h-Emkdir>. This call returns the previous umask. diff --git a/python/guestfs.py b/python/guestfs.py index bb9bc08..ad44df7 100644 --- a/python/guestfs.py +++ b/python/guestfs.py @@ -197,7 +197,7 @@ class GuestFS: to modify the image). This is equivalent to the qemu parameter "-drive - file=filename,cache=off". + file=filename,cache=off,if=virtio". Note that this call checks for the existence of "filename". This stops you from specifying other types @@ -234,7 +234,7 @@ class GuestFS: although qemu can support this. This is equivalent to the qemu parameter "-drive - file=filename,snapshot=on". + file=filename,snapshot=on,if=virtio". Note that this call checks for the existence of "filename". This stops you from specifying other types @@ -1948,6 +1948,10 @@ class GuestFS: "-rwxr-xr-x", and 002 which creates new files with permissions like "-rw-rw-r--" or "-rwxrwxr-x". + The default umask is 022. This is important because it + means that directories and device nodes will be created + with 0644 or 0755 mode even if you specify 0777. + See also umask(2), "g.mknod", "g.mkdir". This call returns the previous umask. -- 1.6.2.5 From rich at lat.com Tue Jun 30 14:59:55 2009 From: rich at lat.com (Rich Mahn) Date: Tue, 30 Jun 2009 10:59:55 -0400 Subject: [fedora-virt] best Fedora virtualization Message-ID: <200906301459.n5UExtQA020453@raspberry.lat.com> I am planning on running several virtual machines on a single host. I will have two or three Linux baeed virtual machines and one or two Windoze. I plan on using a F11 host system. I need most of these to run automatically on boot-up of the host system. It would be really nice if I could use something like the Ctl-Alt-FN to be able to access and switch between virtual machines. This needs to be stable. The machines that these virtual machines are intended to replace are often running hundreds of days between reboots. My gut feel is that the virt-manager suite might be the way to go, editting the apropriate xml files as required. I also see there is a qemu launcher and it seems to work okay. I suspect there are others as well. What tends to be the consensus here on the various virtual machine managers? Are there white papers somewhere that could give some insight? Thanks Rich From rjones at redhat.com Tue Jun 30 15:47:31 2009 From: rjones at redhat.com (Richard W.M. Jones) Date: Tue, 30 Jun 2009 16:47:31 +0100 Subject: [fedora-virt] best Fedora virtualization In-Reply-To: <200906301459.n5UExtQA020453@raspberry.lat.com> References: <200906301459.n5UExtQA020453@raspberry.lat.com> Message-ID: <20090630154731.GB7792@amd.home.annexia.org> On Tue, Jun 30, 2009 at 10:59:55AM -0400, Rich Mahn wrote: > I am planning on running several virtual machines on a single host. I > will have two or three Linux baeed virtual machines and one or two > Windoze. I plan on using a F11 host system. > > I need most of these to run automatically on boot-up of the host > system. It would be really nice if I could use something like the > Ctl-Alt-FN to be able to access and switch between virtual machines. > This needs to be stable. The machines that these virtual machines are > intended to replace are often running hundreds of days between > reboots. I don't know of anything that lets you use Ctrl-Alt-FN to switch between guests. If X is running then you can run several instances of virt-viewer, possibly fullscreen. For stability and long-term maintainability, I wonder if you've considered using RHEL or CentOS? That means you have to use Xen as the hypervisor, but if you use libvirt / virsh / virt-manager, the future upgrade path to KVM is reasonable. All tools stay the same, and you just need to run our forthcoming v2v tool on the guests (or reinstall the guests) when you upgrade. > My gut feel is that the virt-manager suite might be the way to go, > editting the apropriate xml files as required. I also see there > is a qemu launcher and it seems to work okay. I suspect there are > others as well. The only one we're supporting here on Fedora is libvirt / virsh / virt-manager. Use 'virsh edit ' to edit the XML for a domain. The same commands will work on RHEL / CentOS too. Rich. -- Richard Jones, Emerging Technologies, Red Hat http://et.redhat.com/~rjones libguestfs lets you edit virtual machines. Supports shell scripting, bindings from many languages. http://et.redhat.com/~rjones/libguestfs/ See what it can do: http://et.redhat.com/~rjones/libguestfs/recipes.html From rich at lat.com Tue Jun 30 18:31:45 2009 From: rich at lat.com (Rich Mahn) Date: Tue, 30 Jun 2009 14:31:45 -0400 Subject: [fedora-virt] best Fedora virtualization In-Reply-To: Your message of "Tue, 30 Jun 2009 16:47:31 BST." <20090630154731.GB7792@amd.home.annexia.org> Message-ID: <200906301831.n5UIVjjP000981@raspberry.lat.com> I thought I had virt-manager running, but I see it doesn't work correctly. I think I am either missing a package or have permissions or configuration parameters wrong. Here are some of the problems: 1. I can run virt-manager (from the command line) from a regular account fine, but if I am root, I get this error when I try the same thing: No protocol specified No protocol specified Traceback (most recent call last): File "/usr/share/virt-manager/virt-manager.py", line 371, in _show_startup_error(str(run_e), "".join(traceback.format_exc())) File "/usr/share/virt-manager/virt-manager.py", line 52, in _show_startup_error import gtk File "/usr/lib64/python2.6/site-packages/gtk-2.0/gtk/__init__.py", line 79, in _init() File "/usr/lib64/python2.6/site-packages/gtk-2.0/gtk/__init__.py", line 67, in _init _gtk.init_check() RuntimeError: could not open display 2. virsh seems to work as root. It lists the domains, anyhow. 3. When I try to create a new domain sometimes it looks like it is working until it is actually supposed to start. Then nothing seems to happen. I don't know what processes to look for via 'ps', but I suspect whatever started died almost immediately. NOTE: this is what happens if I don't specify any virtual disk storge. 4. Creating exactly the same domain with virtual disk storage, when it tries to create the domain I get the popup error "Unable to compelte install: internal error Domain didn't show up." The detail of the error is this: Unable to complete install ' internal error Domain test 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/lib64/python2.6/site-packages/libvirt.py", line 974, in createLinux if ret is None:raise libvirtError('virDomainCreateLinux() failed', conn=self) libvirtError: internal error Domain test didn't show up 5. For the first case described in 3 above, the virt-manager shows the domain as running. virsh also shows it as running. However, if I try to terminate it, shut it down, or whatever (even restart later), I get this error: Error shutting down domain: invalid domain pointer in no domain with matching id -1 and the details are: Traceback (most recent call last): File "/usr/share/virt-manager/virtManager/engine.py", line 507, in shutdown_domain vm.shutdown() File "/usr/share/virt-manager/virtManager/domain.py", line 565, in shutdown self.vm.shutdown() File "/usr/lib64/python2.6/site-packages/libvirt.py", line 472, in shutdown if ret == -1: raise libvirtError ('virDomainShutdown() failed', dom=self) libvirtError: invalid domain pointer in no domain with matching id -1 6. Looking at just qemu from the command line, I can run this as a normal user: qemu -no-reboot -boot d -cdrom cdr.iso and it works as expected, bring up a window that is a the console associated with that virtual machine. However, if I run the exact same command as root, I get these errors, and nothing is run: No protocol specified No protocol specified Could not initialize SDL - exiting As bad as this looks, I get the feeling it's just some permissions problem or a configuration problem somewhere. I'm guessing virt-manager tries to do some things as root and ends up equivalent to the command line qemu situation for root. From loganjerry at gmail.com Tue Jun 30 20:09:17 2009 From: loganjerry at gmail.com (Jerry James) Date: Tue, 30 Jun 2009 14:09:17 -0600 Subject: [fedora-virt] Disk device performance in F11 In-Reply-To: <4A49B125.8080509@redhat.com> References: <870180fe0906291038x1fa01051ude4f6ca477c82fe8@mail.gmail.com> <4A49B125.8080509@redhat.com> Message-ID: <870180fe0906301309l26d9deefkc9a8cb84881a87eb@mail.gmail.com> On Tue, Jun 30, 2009 at 12:31 AM, Dor Laor wrote: > It might be due to different image caching defaults. > Can you grab the current command line of qemu and change -drive file=xxxx,..,cache=writeback and retest? As far as I can tell, virt-manager doesn't use the -drive option, but just passes the name of the hard disk image as the last command line argument. That -drive option has a lot of parameters. I have no idea which I should set, or to what, or how to do that in the context of virt-manager. The virt-manager concept seems nice, but I abandoned it after using it for only a short time in F-10 because (a) it didn't give me an easy way to see what options it ultimately passed to qemu-kvm, and (b) it didn't give me a way to fiddle with nonstandard options. It looks like I'm probably going to abandon it again in F-11 after only using it for a short time, for exactly the same reasons. -- Jerry James http://www.jamezone.org/ From m.a.young at durham.ac.uk Tue Jun 30 21:23:32 2009 From: m.a.young at durham.ac.uk (M A Young) Date: Tue, 30 Jun 2009 22:23:32 +0100 (BST) Subject: [fedora-virt] Re: [Fedora-xen] Dom0 kernels In-Reply-To: References: <20090328163545.GM31725@salstar.sk> <20090414143618.GH351@redhat.com> Message-ID: A new build (2.6.31-0.1.2.37.rc1.git5.xendom0.fc12) is at http://koji.fedoraproject.org/koji/taskinfo?taskID=1444556 and the repository http://fedorapeople.org/~myoung/dom0/ . It is based on the new branch rebase/master of Jeremy's git repository http://git.kernel.org/?p=linux/kernel/git/jeremy/xen.git;a=summary There may still be bits missing, but the basics (net and disk support for guests) are now there. I also disabled CONFIG_DRM_RADEON_KMS and CONFIG_DRM_NOUVEAU to get the kernel to compile. Note that Jeremy's view of the state of the dom0 kernel is at http://lists.xensource.com/archives/html/xen-devel/2009-06/msg01193.html Michael Young From wildfire at progsoc.org Tue Jun 30 21:38:47 2009 From: wildfire at progsoc.org (Anand Kumria) Date: Tue, 30 Jun 2009 22:38:47 +0100 Subject: [fedora-virt] best Fedora virtualization In-Reply-To: <200906301831.n5UIVjjP000981@raspberry.lat.com> References: <20090630154731.GB7792@amd.home.annexia.org> <200906301831.n5UIVjjP000981@raspberry.lat.com> Message-ID: <971f65790906301438s1b388bd9j2d140d14e9af5aaf@mail.gmail.com> On Tue, Jun 30, 2009 at 7:31 PM, Rich Mahn wrote: > > ?I thought I had virt-manager running, but I see it doesn't > work correctly. ?I think I am either missing a package or have > permissions or configuration parameters wrong. > > ? Here are some of the problems: > > 1. ?I can run virt-manager (from the command line) from a regular account > ? ?fine, but if I am root, I get this error when I try the same thing: Don't run this command as run, it is trying to open an X display. > > 6. ?Looking at just qemu from the command line, I can run this as a normal user: > > ? ? ? ? ? ?qemu -no-reboot -boot d -cdrom cdr.iso > > ? ?and it works as expected, bring up a window that is a the console > ? ?associated with that virtual machine. ?However, if I run the exact > ? ?same command as root, I get these errors, and nothing is run: As above. Anand From abo at stacken.kth.se Thu Jun 25 17:55:24 2009 From: abo at stacken.kth.se (=?ISO-8859-1?Q?Alexander_Bostr=F6m?=) Date: Thu, 25 Jun 2009 19:55:24 +0200 Subject: [fedora-virt] 20% cpu usage spikes with idle centos 5.3 guest on F11 In-Reply-To: <870180fe0906250816k72a70fd5he1f8b8e909964278@mail.gmail.com> References: <4A42D502.8000601@conversis.de> <870180fe0906250816k72a70fd5he1f8b8e909964278@mail.gmail.com> Message-ID: <4A43BA0C.1040601@stacken.kth.se> Den 2009-06-25 17:16, Jerry James skrev: > Interesting. I also have an x86_64 CentOS 5.3 guest running under an > x86_64 F11 host. But I don't see those spikes. What I see is a > constant, apparently very steady 12% CPU usage when the guest is idle. It might help to remove the virtual sound card, I think. /abo