Re: [CentOS-virt] Can KVM and VirtualBox co-exist on same host?
On Wed, July 23, 2014 10:11, Tom Bishop wrote: That is the easy answer, they do conflict but it does not mean you cannot load them both up. You just cannot run them both at the same time, in order to run one vs the other you need to remove some kernal mods and insert some etc depending on which one you want to run. So the answer is yes you can if you want to you just have to do some work, here is a decent write up that goes into some detail but there may be some better examples - http://www.dedoimedo.com/computers/kvm-virtualbox.html Thanks, I found a write up on scripts that detect and unload/load the kvm and kvm-intel modules. In fact, the very one that you referenced. And I had already gathered that one probably cannot run both a kvm and a vb hypervisor on the same host at the same time. I was wondering if there was any other issues respecting having both of them installed on the same host at the same time even if only one, or neither, is running? A supplemental question: Is there any way to convert a VB guest image into a KVM guest image? The VM image in question is MicroSoft's IE6 development image for MS-XPproSP3. We have a government mandated program that is written in J# and the last OS to support that is XP. I have to get some sort of virtualised XP guest running and as the transferable licenses for that OS are somewhat scarce I thought I might try and get the legal VM version running. However, I would prefer to stick with KVM if at all possible. -- *** E-Mail is NOT a SECURE channel *** James B. Byrnemailto:byrn...@harte-lyne.ca Harte Lyne Limited http://www.harte-lyne.ca 9 Brockley Drive vox: +1 905 561 1241 Hamilton, Ontario fax: +1 905 561 0757 Canada L8E 3C3 ___ CentOS-virt mailing list CentOS-virt@centos.org http://lists.centos.org/mailman/listinfo/centos-virt
[CentOS-virt] Can KVM and VirtualBox co-exist on same host?
CentOS-6.5 VirtualBox-4.3.14 Is it possible, and if so advisable, to run KVM and VirtualBox guests on the same host system? -- *** E-Mail is NOT a SECURE channel *** James B. Byrnemailto:byrn...@harte-lyne.ca Harte Lyne Limited http://www.harte-lyne.ca 9 Brockley Drive vox: +1 905 561 1241 Hamilton, Ontario fax: +1 905 561 0757 Canada L8E 3C3 ___ CentOS-virt mailing list CentOS-virt@centos.org http://lists.centos.org/mailman/listinfo/centos-virt
Re: [CentOS-virt] MS-Win7 kvm guest gets dhcp from host bridge
On Mon, June 23, 2014 00:29, Arun Khan wrote: On Thu, Feb 20, 2014 at 3:36 AM, Dusty Mabe dustym...@gmail.com wrote: On 02/19/2014 04:01 PM, James B. Byrne wrote: The root cause of the original problem was a change in the behaviour of libvirt (and the GUI of virt-manager) when creating new vms. The host system was already bridged and had other vms previously created and attached to the bridge without exhibiting this behaviour. I infer that at some point an update to libvirt altered the default configuration to always prefer NAT. A change that I failed to notice and was not conscious of given I had previous created vms without encountering this problem. Changing the configuration of the affected vms nic Source Device to 'Specify shared device name' and then specifying the Bridge Name fixed the problem. I have already commented elsewhere on the needlessly obtuse wording used for the Source Device when bridging is required. Why it does not say 'Specify bridge name' or 'Use named bridge' instead has not been plausibly explained by the maintainers. It is particularly vexatious given that when one selects 'Specify shared device name' the GUI immediately alters to display a text box labelled 'Bridge name:' Duhhh. -- *** E-Mail is NOT a SECURE channel *** James B. Byrnemailto:byrn...@harte-lyne.ca Harte Lyne Limited http://www.harte-lyne.ca 9 Brockley Drive vox: +1 905 561 1241 Hamilton, Ontario fax: +1 905 561 0757 Canada L8E 3C3 ___ CentOS-virt mailing list CentOS-virt@centos.org http://lists.centos.org/mailman/listinfo/centos-virt
Re: [CentOS-virt] Windows 7 on a centos kvm host pauses after the installation reboot.
On Sun, June 8, 2014 19:21, Eliezer Croitoru wrote: I am using Centos 6.5 as a kvm hypervisor with local ssd disks in raid and with glusterfs based storage for couple disk images. I have tried to install Windows 7 from ISO and it seems to pass the first stage of the installation which installs the basic files and also the first reboot. After that the installation is almost finished and the desktop should be up and running after a reboot but instead the Windows 7 machine gets paused before windows shows the windows 7 logo at the boot sequence. I have tried to find for a record of the issue in the past but found only tiny records which I did not understood from, if it was solved or not. The kvm host has 16GB of ram and 100GB of disk space. For this specific host I have used a disk image ontop of glusterfs but the same happens ontop of glusterfs and ontop of local disks. I have an ubuntu kvm host with less RAM and I can install windows server 2012 (which I was unable to install on the Centos 6.5 kvm host both 2012 + windows 8 + windows 7). Two things: If anyone had or has the same issue please notify me. If anyone has a solution please share it. Thanks, Eliezer 1. Is there a CD/DVD drive associated with the VM? 2. If so, do you have a readable optical disk in the drive when starting the Windows7 guest? If the answer to 1 is yes and to 2 is no and your guest configuration file shows this: 30 disk type='block' device='cdrom' 31 driver name='qemu' type='raw'/ 32 source dev='/dev/sr0'/ 33 target dev='hdc' bus='ide'/ 34 readonly/ 35 address type='drive' controller='0' bus='1' target='0' unit='0'/ 36 /disk then remove the line 'source dev='/dev/sr0'/' and try again. HTH. -- *** E-Mail is NOT a SECURE channel *** James B. Byrnemailto:byrn...@harte-lyne.ca Harte Lyne Limited http://www.harte-lyne.ca 9 Brockley Drive vox: +1 905 561 1241 Hamilton, Ontario fax: +1 905 561 0757 Canada L8E 3C3 ___ CentOS-virt mailing list CentOS-virt@centos.org http://lists.centos.org/mailman/listinfo/centos-virt
[CentOS-virt] KVM and DHCP
CentOS-6.5 We have a KVM guest running MS-WinV7pro. This guest is joined to an Active Directory Domain. That domain provides DHCP to the members. The KVM guest does not obtain its IP from the domain but from the local host's qemu hypervisor instead. Is there anyway to get around this and have the guest MS-Win OS get its DHCP from the same place as the rest of the domain members? -- *** E-Mail is NOT a SECURE channel *** James B. Byrnemailto:byrn...@harte-lyne.ca Harte Lyne Limited http://www.harte-lyne.ca 9 Brockley Drive vox: +1 905 561 1241 Hamilton, Ontario fax: +1 905 561 0757 Canada L8E 3C3 ___ CentOS-virt mailing list CentOS-virt@centos.org http://lists.centos.org/mailman/listinfo/centos-virt
[CentOS-virt] MS-Win7 kvm guest gets dhcp from host bridge
CentOS-6.5 i86_64 qemu-kvm-0.12.1.2-2.415.el6_5.4 MS-Windows v7proSP1 We have installed a MicroSoft Win7 system as a guest and have joined it to our MS AD domain. The system runs and has internet access. However, the IPv4 address it obtains and the gateway it is assigned are both sourced from the virtual machine host system and not from our AD DC DHCP server. To clarify, the virbr0 IP address is 192.168.122.1 and the Windows guest has that address as its gateway and an IP address in the 192.168.122.0/24 netblock. This is not as we desire as the internal addresses we regularly assign to MS workstations via DHCP are supposed to belong to a different netblock entirely. This permit filtering on incoming and outgoing traffic at the gateway. I realize that there is a DHCP service running on virbr0 for the purpose of provisioning guests with system control traffic but I do not know how to limit that to its intended purpose and allow another DHCP server to provide the IP address to the windows guests. I hope that problem description is not too confusing. Can anyone provide me with some guidance on the matter? Are kvm guests required to have either static ip addresses or dhcp addresses provided by the host system? Thanks in advance. -- *** E-Mail is NOT a SECURE channel *** James B. Byrnemailto:byrn...@harte-lyne.ca Harte Lyne Limited http://www.harte-lyne.ca 9 Brockley Drive vox: +1 905 561 1241 Hamilton, Ontario fax: +1 905 561 0757 Canada L8E 3C3 ___ CentOS-virt mailing list CentOS-virt@centos.org http://lists.centos.org/mailman/listinfo/centos-virt
[CentOS-virt] Problem with cdrom device on guest
I have a kvm guest running MS-WinV7 on a CentOS-6.5 host. The WinV7 guest was installed from a CD. It installed correctly and was updated and added to an MS Active Domain without difficulty. I was able to do work on it through the virt-manager console and I was able to shut the system down from the console without problem. I cannot get it to restart however. virsh start brws-ms-v7-37v.brockley.harte-lyne.ca error: Failed to start domain brws-ms-v7-37v.brockley.harte-lyne.ca error: cannot open file '/dev/sr0': No medium found I found this bugzilla report. https://bugzilla.redhat.com/show_bug.cgi?id=709585 Which is curiously marked as CLOSED DEFERRED. The last comment in that bug contains this: Summary of findings so far: format=raw doesn't work with /dev/sr0. Omitting format=raw works. format=host_device works. Apparently, virt-manager specifically asks for raw. Things are different in RHEL-6: format=raw works, format=host_device doesn't, format=host_cdrom does (doesn't exist in RHEL-5). Now, in my configuration files there is no 'format' attribute found in any tag. I find 'type=raw' inside of many device/ tags but it seems strange to me that a RedHat bug report would use such imprecise language so as to confuse the attribute 'type' with one named 'format' so I wonder if a syntax change has occurred and if that has introduced a regression? virsh edit brws-ms-v7-37v.brockley.harte-lyne.ca show this configuration entry for device sr0: 30 disk type='block' device='cdrom' 31 driver name='qemu' type='raw'/ 32 source dev='/dev/sr0'/ 33 target dev='hdc' bus='ide'/ 34 readonly/ 35 address type='drive' controller='0' bus='1' target='0' unit='0'/ 36 /disk Despite the inference I draw from the bug report, that format ~= type, one cannot in fact change the driver attribute 'type' to any value other than raw. Any attempt to do so results in this message: unsupported configuration: unknown driver format value 'host_cdrom' Failed. Try again? [y,n,f,?]: Further, the value 'f' is not permitted so one cannot forcibly save the configuration to determine if in fact it might work. Has anyone else run into this? What is the fix? -- *** E-Mail is NOT a SECURE channel *** James B. Byrnemailto:byrn...@harte-lyne.ca Harte Lyne Limited http://www.harte-lyne.ca 9 Brockley Drive vox: +1 905 561 1241 Hamilton, Ontario fax: +1 905 561 0757 Canada L8E 3C3 ___ CentOS-virt mailing list CentOS-virt@centos.org http://lists.centos.org/mailman/listinfo/centos-virt
Re: [CentOS-virt] Time
On Wed, January 2, 2013 03:53, Robert Dinse wrote: Friday, I moved our servers to a new co-lo facility and ran into an interesting problem with virtual machines. I did an orderly shutdown of the CentOS 6.3 host, and it in turn suspends all the guests. It took about an hour and a half to move and fire up the host. The guests, being suspended, were then an hour and a half behind and it seems ntpd does not want to correct more than 1000 seconds of error so it would not automatically adjust the clocks. I tried the -g argument which is supposed to override the 1000 second limit but it did not. I ended up having to manually set the clocks close enough for ntpd to correct. Since there is no hardware clock for the virtual machines to use when they boot, it seems that shutdown and reboot of the virtual machines probably would not have avoided this. Any suggestions for addressing this particular scenerio other than having to manually set a bunch of clocks? I ran into this situation several times whilst testing KVM and the lessons I learned from the experiences can be summarized as: 1. Never allow the kvm hypervisior to handle guests during a host shutdown. Use 'virsh shutdown' on each of the guests first and then shutdown the host. Use autostart to restart guests on a host's reboot. Write a script to process 'virsh list' to feed active domains to 'virsh shutdown' if automation is required and link that to /etc/rc0.d/K10whatever. 2. In the situation where a kvm guest pause and restore sequence leads to an excessive disconnect between guest time and wall time use ntpd -q to hard set the time. From the guest's point of view you are always going ahead in time in the case of a pause and resume so this is not likely to ever cause a problem. But, having written that down, it probably will at some point. 3. Run ntpd on the host system and have its guests configured to only use that time server source. 4. On each guest have a cron job that checks for ntpd at regular intervals which reports failures and restarts the time service as necessary. We use: JOBNAME=Check ntpd status and restart if required ; \ ntpstat /dev/null \ if [[ $? -gt 0 ]]; then /sbin/service ntpd start; fi -- *** E-Mail is NOT a SECURE channel *** James B. Byrnemailto:byrn...@harte-lyne.ca Harte Lyne Limited http://www.harte-lyne.ca 9 Brockley Drive vox: +1 905 561 1241 Hamilton, Ontario fax: +1 905 561 0757 Canada L8E 3C3 ___ CentOS-virt mailing list CentOS-virt@centos.org http://lists.centos.org/mailman/listinfo/centos-virt
Re: [CentOS-virt] Time
On Wed, January 2, 2013 12:51, SilverTip257 wrote: On Wed, Jan 2, 2013 at 9:41 AM, James B. Byrne byrn...@harte-lyne.cawrote: I ran into this situation several times whilst testing KVM and the lessons I learned from the experiences can be summarized as: 1. Never allow the kvm hypervisior to handle guests during a host shutdown. Use 'virsh shutdown' on each of the guests first and then shutdown the host. Use autostart to restart guests on a host's reboot. Write a script to process 'virsh list' to feed active domains to 'virsh shutdown' if automation is required and link that to /etc/rc0.d/K10whatever. @James: Can you specifically cite why you manually power down each node? Have you tried tweaking your libvirt settings in the config file I noted in my earlier response to Robert? Two reasons. First, I am minimally familiar with kvm. The niceties of the options for it is beyond my kin for the nonce. Second, libvirt does not always work. I have had guests refuse to either suspend or shutdown from an automatic request to do so. When shutdown is done manually one discovers right away that there is a problem and which guest is causing it. Set up a central NTP server and have your hosts (and not just VMs) connect to it. It could be the VM host, but doesn't need to be. Distribute the load to your NTP server and off of the public NTP pool by running an NTP server for your servers to poll [0] ... it's a good practice and everybody is happy. I do that as well. However, I run one on each host just to serve its own guests and configure the host to run off our central ntp server. 4. On each guest have a cron job that checks for ntpd at regular intervals which reports failures and restarts the time service as necessary. We use: JOBNAME=Check ntpd status and restart if required ; \ ntpstat /dev/null \ if [[ $? -gt 0 ]]; then /sbin/service ntpd start; fi Why not configure the ntpd daemon and stick with that? It does update on its own [1]. And ntpstat prints out the interval, which matches the one mentioned at [1]. I don't believe the ntpstat script/job is necessary (I've never had to do more than set ntpd to run after configuring the servers it should poll). You misunderstand the purpose of the job. Netstat checks to see if the daemon is actually running. If it is not then netstat returns a non-zero exit code. If the ntpstat exit code is not zero then the service script is invoked to restart it. Additionally, netstat writes out to stderr that it could not find the daemon which gets emailed to support. I probably should have used [[ ! $? -eq 0 ]] but what I have written does work. We found ntpd just stoped on some guests upon occasion without any visible trace of a cause. Not frequently but when it did happen it was a nuisance to detect before clock drift on the guest caused some failure or other. This job detects these occurrences and self corrects. These are all CentOS-6.3 hosts and guests. -- *** E-Mail is NOT a SECURE channel *** James B. Byrnemailto:byrn...@harte-lyne.ca Harte Lyne Limited http://www.harte-lyne.ca 9 Brockley Drive vox: +1 905 561 1241 Hamilton, Ontario fax: +1 905 561 0757 Canada L8E 3C3 ___ CentOS-virt mailing list CentOS-virt@centos.org http://lists.centos.org/mailman/listinfo/centos-virt
Re: [CentOS-virt] AWS images and the Sydney zone
On Thu, November 22, 2012 08:31, Karanbir Singh wrote: hi guys, So it turns out that Sydney is too new a zone and not in the regular AWS image-production-pipeline. Although that should get fixed soon, in the mean time, should we go ahead and push images there ourselves ? What is the downside of doing so? -- *** E-Mail is NOT a SECURE channel *** James B. Byrnemailto:byrn...@harte-lyne.ca Harte Lyne Limited http://www.harte-lyne.ca 9 Brockley Drive vox: +1 905 561 1241 Hamilton, Ontario fax: +1 905 561 0757 Canada L8E 3C3 ___ CentOS-virt mailing list CentOS-virt@centos.org http://lists.centos.org/mailman/listinfo/centos-virt
[CentOS-virt] Cannot get kvm guests to connect to network
This cross-posted from the main Centos discussion list. I installed a new CentOS-6.3 kvm guest on a recently provisioned kvm host also running CentOS-6.3. This guest will not connect to the network and the host cannot connect to it via its public IP address. I had previously installed a guest system on thst same kvm host using the same ISO and that system connects to the network without problem. I next created a third guest instance and this too does not connect with either the kvm host or the gateway. I have shutdown all the guests, restarted networking on the host and restarted the gueests and the problem persists on the two most recently added guests but does not happen on the first guest instance. I have installed litterally dozens of kvm guests this past year and I have never encountered this situation. Has anyone else? Does anyone have any idea what might be going on? ip addr 1: lo LOOPBACK,UP,LOWER_UP mtu 16436 qdisc noqueue state UNKNOWN link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 inet 127.0.0.1/8 scope host lo inet6 ::1/128 scope host 2: eth0: BROADCAST,MULTICAST,UP,LOWER_UP mtu 1500 qdisc pfifo_fast state UP qlen 1000 link/ether 52:54:00:a0:26:47 brd ff:ff:ff:ff:ff:ff inet 216.185.71.243/24 brd 216.185.71.255 scope global eth0 inet6 fe80::5054:ff:fea0:2647/64 scope link vaslid_lft forever preferred_lft forever ip route 216.185.71.0/24 dev eth0 proto kernel scope link scr 216.185.71.243 169.254.0.0/16 dev eth0 scope link metric 1002 default via 216.185.71.1 dev eth0 netstat -r Kernel IP routing table DestinationGateway GenmaskFlags MSS Window irtt Iface 216.185.71.0 *255.255.255.0 U0 0 0 eth0 link-local *255.255.0.0U0 0 0 eth0 default216.185.71.1 0.0.0.0UG 0 0 0 eth0 service iptables stop . . . ping 216.185.71.1 PING 216.185.71.1 (216.185.71.1) 56(84) bytes of data. From 216.185.71.243 icmp_seq=2 Destination Host Unreachable From 216.185.71.243 icmp_seq=3 Destination Host Unreachable From 216.185.71.243 icmp_seq=4 Destination Host Unreachable ^C -- *** E-Mail is NOT a SECURE channel *** James B. Byrnemailto:byrn...@harte-lyne.ca Harte Lyne Limited http://www.harte-lyne.ca 9 Brockley Drive vox: +1 905 561 1241 Hamilton, Ontario fax: +1 905 561 0757 Canada L8E 3C3 ___ CentOS-virt mailing list CentOS-virt@centos.org http://lists.centos.org/mailman/listinfo/centos-virt
[CentOS-virt] KVM serial cards
I am returning to an old question and am investigating whether or not the following device even exists. I would like to find a PCI or PCIe multi-port serial card that supports MSI or MSIx. Is there such a creature? -- *** E-Mail is NOT a SECURE channel *** James B. Byrnemailto:byrn...@harte-lyne.ca Harte Lyne Limited http://www.harte-lyne.ca 9 Brockley Drive vox: +1 905 561 1241 Hamilton, Ontario fax: +1 905 561 0757 Canada L8E 3C3 ___ CentOS-virt mailing list CentOS-virt@centos.org http://lists.centos.org/mailman/listinfo/centos-virt
Re: [CentOS-virt] How many virtual guest 'cpus' can a core duo 'quad' core support
On Wed, February 22, 2012 12:25, Todd And Margo Chester Therefore, in your given case, think six not twelve. Common advice is to leave one core for the host OS/scheduler. Which leaves you with 5 physical CPUs to allocate. Thank you. I never planned to allocate to any guest more cpus that were physically available. What I was checking was that a single physical cpu with four cores actually counted as four cpus insofar as kvm itself was concerned. I have allocated guests their processors on the basis that 1 core = 1 cpu. But it occurred to me that core might actually mean something different and so I wanted to verify my understanding. -- *** E-Mail is NOT a SECURE channel *** James B. Byrnemailto:byrn...@harte-lyne.ca Harte Lyne Limited http://www.harte-lyne.ca 9 Brockley Drive vox: +1 905 561 1241 Hamilton, Ontario fax: +1 905 561 0757 Canada L8E 3C3 ___ CentOS-virt mailing list CentOS-virt@centos.org http://lists.centos.org/mailman/listinfo/centos-virt
Re: [CentOS-virt] Unable to use all the memory available
On Tue, February 21, 2012 02:23, Henry Addington wrote: Hello: As you can see from xm info below, we have almost 200GB of memory in our server running CentOS 5.2. But, we can't seem to allocate all the memory. For some reason, the total memory that can be allocated maxes out at 188.4 GB. None of the VMs has hit its own max-mem limit. Even when we set one of the VM's memory so the total is above 188.4 GB, its memory allocation stops when the total memory allocation reaches 188.4 GB. Thanks for your assistance. What is the hardware limit for the server? -- *** E-Mail is NOT a SECURE channel *** James B. Byrnemailto:byrn...@harte-lyne.ca Harte Lyne Limited http://www.harte-lyne.ca 9 Brockley Drive vox: +1 905 561 1241 Hamilton, Ontario fax: +1 905 561 0757 Canada L8E 3C3 ___ CentOS-virt mailing list CentOS-virt@centos.org http://lists.centos.org/mailman/listinfo/centos-virt
[CentOS-virt] How many virtual guest 'cpus' can a core duo 'quad' core support
CentOS-6.2 What is the maximum number of cpus can I configure for a single vm guest running on a host with this hardware? # lscpu Architecture: x86_64 CPU op-mode(s):32-bit, 64-bit Byte Order:Little Endian CPU(s):4 On-line CPU(s) list: 0-3 Thread(s) per core:1 Core(s) per socket:4 CPU socket(s): 1 NUMA node(s): 1 Vendor ID: GenuineIntel CPU family:6 Model: 23 Stepping: 10 CPU MHz: 1998.000 BogoMIPS: 5331.76 Virtualization:VT-x L1d cache: 32K L1i cache: 32K L2 cache: 2048K NUMA node0 CPU(s): 0-3 I ask this because it occurs to me that I may have missed something fundamental respecting the use of the initialism CPU vice the term Cores. -- *** E-Mail is NOT a SECURE channel *** James B. Byrnemailto:byrn...@harte-lyne.ca Harte Lyne Limited http://www.harte-lyne.ca 9 Brockley Drive vox: +1 905 561 1241 Hamilton, Ontario fax: +1 905 561 0757 Canada L8E 3C3 ___ CentOS-virt mailing list CentOS-virt@centos.org http://lists.centos.org/mailman/listinfo/centos-virt
Re: [CentOS-virt] Setting up a pci passthrough device
On Mon, February 6, 2012 18:05, Ken Bass wrote: Take a look at http://wiki.xensource.com/xenwiki/VTdHowTo Two things in particular about PCI passthrough: - Only devices with FLR capabilities are supported. - Some motherboards are buggy. They advertised that they support Vt-d but do not correctly handle it (those with a broken ACPI DMAR table) I think lspci -vv will tell you if the device supports FLR. It will show 'FLReset+' I believe. 03:00.0 Serial controller: Oxford Semiconductor Ltd OX16PCI954 (Quad 16950 UART) function 0 (Uart) (prog-if 06 [16950]) Subsystem: Oxford Semiconductor Ltd Device Control: I/O+ Mem+ BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx- Status: Cap+ 66MHz- UDF- FastB2B+ ParErr- DEVSEL=medium TAbort- TAbort- MAbort- SERR- PERR- INTx- Interrupt: pin A routed to IRQ 17 Region 0: I/O ports at d040 [size=32] Region 1: Memory at d0702000 (32-bit, non-prefetchable) [size=4K] Region 2: I/O ports at d020 [size=32] Region 3: Memory at d0701000 (32-bit, non-prefetchable) [size=4K] Capabilities: [40] Power Management version 2 Flags: PMEClk- DSI- D1- D2+ AuxCurrent=0mA PME(D0+,D1-,D2+,D3hot+,D3cold-) Status: D0 NoSoftRst- PME-Enable- DSel=0 DScale=0 PME- Kernel driver in use: serial No FLR string is present. So pci pass through is a dead end I take it? I increased the number of uarts available to the host system at boot with the 8250.nr_uarts=10 option. This gives me the following: # setserial -g /dev/ttyS* /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 /dev/ttyS1, UART: unknown, Port: 0x02f8, IRQ: 3 /dev/ttyS2, UART: unknown, Port: 0x03e8, IRQ: 4 /dev/ttyS3, UART: unknown, Port: 0x02e8, IRQ: 3 /dev/ttyS4, UART: 16950/954, Port: 0xd040, IRQ: 17 /dev/ttyS5, UART: 16950/954, Port: 0xd048, IRQ: 17 /dev/ttyS6, UART: 16950/954, Port: 0xd050, IRQ: 17 /dev/ttyS7, UART: 16950/954, Port: 0xd058, IRQ: 17 /dev/ttyS8, UART: unknown, Port: 0x, IRQ: 0 /dev/ttyS9, UART: unknown, Port: 0x, IRQ: 0 With this change I now can add one serial port (/dev/ttyS4) to a virtual guest using virt-manager and have the guest start, but no more than one. Any more that one and the guest fails to run with the same irq conflict error as before. I still have not tried to see if the serial port actually works in this case, just that the system starts. I ran across this thread relating to serial devices in qemu from some time ago: http://www.mail-archive.com/qemu-devel@nongnu.org/msg27354.html Which seems to me to imply that it is not possible for a qemu guest to have more than 2 serial ports, one of which I gather has to be the console. However, this statement attracted my attention: This is wrong. Two devices should never be manipulating the same qemu_irq object. If you want multiple devices connected to the same IRQ then you need an explicit multiplexer. e.g. arm_timer.c:sp804_set_irq. And in a later message in the same thread: Two devices have the same s-irq. Give each on its own qemu_irq, and feed it into a multiplexer that ORs them together and sends the result to the interrupt controller's qemu_irq: Is there a way to set irqs in quem to map to specific ports on a pci card as this seems to imply? How is it done? -- *** E-Mail is NOT a SECURE channel *** James B. Byrnemailto:byrn...@harte-lyne.ca Harte Lyne Limited http://www.harte-lyne.ca 9 Brockley Drive vox: +1 905 561 1241 Hamilton, Ontario fax: +1 905 561 0757 Canada L8E 3C3 ___ CentOS-virt mailing list CentOS-virt@centos.org http://lists.centos.org/mailman/listinfo/centos-virt
Re: [CentOS-virt] Setting up serial ports on kvm guests
On Wed, February 8, 2012 11:06, Ed Heron wrote: On Tue, 2012-01-31 at 14:01 -0500, James B. Byrne wrote: CentOS-6.2 We have a dedicated CentOS-5.7 host used for fax reception and transmission that we wish to move to a CentOS-6.2 virtual guest instance. The CentOS-6.2 virtual host has a 4-port serial card installed. Consider replacing your multi-serial port card with a VoIP analog gateway and use a pre-rolled Asterisk with virtual faxmodems, like Elastix. Just make sure your codec is high enough quality. We used to receive faxes using a dedicated Linux box with a Comtrol Rocketport and an USRobotics MP8. We Converted to SIP trunks and managed to get our faxes in the SIP trunks, as well. This will remove the PCI pass-through from the equation. After a brief read this seems to me the approach we should take. Recently I have discovered more about irqs, timing delays, and the difficulties/impossiblities of switching hardware from vm instances than I ever wanted to know. Given that we have three dedicated fax lines and 6 voice is there any hardware that would you suggest for a 4 core x86_64 Intel based host system? We have looked at going completely to v/f-oip but I do not have the time to deal with those intricacies and get this move completed at the same time. So, for the nonce it appears that we would have to employ an FXO gateway to connect our existing POTS lines to the host. -- *** E-Mail is NOT a SECURE channel *** James B. Byrnemailto:byrn...@harte-lyne.ca Harte Lyne Limited http://www.harte-lyne.ca 9 Brockley Drive vox: +1 905 561 1241 Hamilton, Ontario fax: +1 905 561 0757 Canada L8E 3C3 ___ CentOS-virt mailing list CentOS-virt@centos.org http://lists.centos.org/mailman/listinfo/centos-virt
Re: [CentOS-virt] Setting up a pci passthrough device
On Sat, February 4, 2012 10:39, Nenad Opsenica wrote: On 02/03/2012 05:32 PM, James B. Byrne wrote: Where does this go inside the rest of the guest configuration? virt-manager GUI places PCI device pass-through inside devices ... http://docs.redhat.com/docs/en-US/Red_Hat_Enterprise_Linux/6/html/Virtualization_Host_Configuration_and_Guest_Installation_Guide/chap-Virtualization_Host_Configuration_and_Guest_Installation_Guide-PCI_Assignment.html I have followed the instructions in the RedHat reference above to the best of my ability to understand them. I add the pci multi-port serial io card through virt-manager and it was indeed entered into the virtual machine's configuration file inside the devices tag: hostdev mode='subsystem' type='pci' managed='yes' source address domain='0x' bus='0x00' slot='0x03' function='0x0'/ /source address type='pci' domain='0x' bus='0x00' slot='0x07' function='0x0'/ /hostdev However, when I try and start the virtual machine I get this error: Error starting domain: internal error Unable to reset PCI device :00:03.0: no FLR, PM reset or bus reset available Traceback (most recent call last): File /usr/share/virt-manager/virtManager/asyncjob.py, line 44, in cb_wrapper callback(asyncjob, *args, **kwargs) File /usr/share/virt-manager/virtManager/asyncjob.py, line 65, in tmpcb callback(*args, **kwargs) File /usr/share/virt-manager/virtManager/domain.py, line 1050, in startup self._backend.create() File /usr/lib64/python2.6/site-packages/libvirt.py, line 511, in create if ret == -1: raise libvirtError ('virDomainCreate() failed', dom=self) libvirtError: internal error Unable to reset PCI device :00:03.0: no FLR, PM reset or bus reset available The steps I followed were: 1. Check VT-D extensions available and enabled in BIOS - yes 2. Restart virtual host - yes 3. Identify device - yes address domain='0x000' bus='0x00' slot='0x03' function='0x0'/ 4. Add device to virtual machine configuration - yes . . . hostdev mode='subsystem' type='pci' managed='yes' source address domain='0x' bus='0x00' slot='0x03' function='0x0'/ /source address type='pci' domain='0x' bus='0x00' slot='0x07' function='0x0'/ /hostdev memballoon model='virtio' address type='pci' domain='0x' bus='0x00' slot='0x06' function='0x0'/ /memballoon /devices /domain 5. Enable SELinux boolean - yes getsebool virt_use_sysfs virt_use_sysfs -- on 6. Start virtual machine - fails Am I making any obvious errors? Has anyone here configured and managed to get a multi-port serial card working with a virtual guest? -- *** E-Mail is NOT a SECURE channel *** James B. Byrnemailto:byrn...@harte-lyne.ca Harte Lyne Limited http://www.harte-lyne.ca 9 Brockley Drive vox: +1 905 561 1241 Hamilton, Ontario fax: +1 905 561 0757 Canada L8E 3C3 ___ CentOS-virt mailing list CentOS-virt@centos.org http://lists.centos.org/mailman/listinfo/centos-virt
[CentOS-virt] Setting up a pci passthrough device
I have been investigating pci pass-through for virtualized guests and the documentation I have found seems to me to lack a certain consistency in its example. This may be due to my not understanding what it is trying to inform me. What I wish to do is to configure a pci multi-port serial i/o card for use by a single virtual host. I start by running lspci -v on the host to identify the serial card: 03:00.0 Serial controller: Oxford Semiconductor Ltd OX16PCI954 (Quad 16950 UART) function 0 (Uart) (prog-if 06 [16950]) Subsystem: Oxford Semiconductor Ltd Device Flags: medium devsel, IRQ 17 I/O ports at d040 [size=32] Memory at d0702000 (32-bit, non-prefetchable) [size=4K] I/O ports at d020 [size=32] Memory at d0701000 (32-bit, non-prefetchable) [size=4K] Capabilities: [40] Power Management version 2 Kernel driver in use: serial I then check for possible multiple IRQ assignment: lspci -v | grep ' IRQ 17' Flags: medium devsel, IRQ 17 I next use lspci -n to identify the vendor codes: lspci -n | grep '00:03.0' 00:03.0 0780: 8086:2e24 (rev 03) So this is an Intel chipset and the device id is 2e24. Now this is the point in the example where the documentation and I part company. In the examples I have found, although the pci device ids listed from virsh nodedev-list are uniformly of the form pci__00_03_0 those used in the examples then switch and use the form pci_8086_3a6c for the subsequent steps. This pattern appears to be the prefix pci followed by the manufacturer's code followed by the device id. There is no other mapping to the pci device ids previously reported by virsh nodedev-list and lspci in the examples that I can discern. However, if I attempt to use the manufacturer and device ids in the next step of the example, substituting those used in the example with those reported on my own system, then I get a device not found reported: virsh nodedev-dumpxml pci_8086_2e24 error: Could not find matching device 'pci_8086_2e24' error: Node device not found If instead I use the pci device ids exactly as reported by virsh nodedev-list then I get what I expect: virsh nodedev-dumpxml pci__00_03_0 device namepci__00_03_0/name parentcomputer/parent capability type='pci' domain0/domain bus0/bus slot3/slot function0/function product id='0x2e24'4 Series Chipset HECI Controller/product vendor id='0x8086'Intel Corporation/vendor capability type='virt_functions' /capability /capability /device My question is: Why does the documentation change the form of the pci identifiers used in the second half of the example from those reported previously in the same example? Is this change significant? What does it mean? Am I missing something important here? -- *** E-Mail is NOT a SECURE channel *** James B. Byrnemailto:byrn...@harte-lyne.ca Harte Lyne Limited http://www.harte-lyne.ca 9 Brockley Drive vox: +1 905 561 1241 Hamilton, Ontario fax: +1 905 561 0757 Canada L8E 3C3 ___ CentOS-virt mailing list CentOS-virt@centos.org http://lists.centos.org/mailman/listinfo/centos-virt
Re: [CentOS-virt] Setting up a pci passthrough device
Evidently I should be using http://docs.redhat.com/docs/en-US/Red_Hat_Enterprise_Linux/6/html/Virtualization_Host_Configuration_and_Guest_Installation_Guide/chap-Virtualization_Host_Configuration_and_Guest_Installation_Guide-PCI_Assignment.html Which I had looked for but google apparently does not report. I had to search the RedHat web site using their search interface to locate it. The other site purports to be a rhel6 essentials book. Nonetheless, while the inconsistencies of the previous documents are resolved in this new reference the example edit of the virtual guest configuration still fails to provide a context for the insertion: # virsh edit guest1-rhel6-64 hostdev mode='subsystem' type='pci' managed='yes' source address domain='0x000' bus='0x03' slot='0x00' function='0x0'/ /source /hostdev Where does this go inside the rest of the guest configuration? domain type='kvm' nameinet08.harte-lyne.ca/name uuid6409d721-cfcf-2169-f65e-8f583b685f58/uuid descriptionInet08 [216.185.71.28] virtual hosts: none/description memory4194304/memory currentMemory4194304/currentMemory vcpu1/vcpu os type arch='x86_64' machine='rhel6.2.0'hvm/type boot dev='hd'/ /os features acpi/ apic/ pae/ /features clock offset='utc'/ on_poweroffdestroy/on_poweroff on_rebootrestart/on_reboot on_crashrestart/on_crash devices emulator/usr/libexec/qemu-kvm/emulator disk type='block' device='disk' driver name='qemu' type='raw' cache='none' io='native'/ source dev='/dev/vg_vhost01/lv_vm_inet08.harte-lyne.ca_00'/ target dev='vda' bus='virtio'/ address type='pci' domain='0x' bus='0x00' slot='0x05' function='0x0'/ /disk disk type='block' device='cdrom' driver name='qemu' type='raw'/ target dev='hdc' bus='ide'/ readonly/ address type='drive' controller='0' bus='1' unit='0'/ /disk controller type='ide' index='0' address type='pci' domain='0x' bus='0x00' slot='0x01' function='0x1'/ /controller interface type='bridge' mac address='52:54:00:bf:e9:ac'/ source bridge='br0'/ model type='virtio'/ address type='pci' domain='0x' bus='0x00' slot='0x03' function='0x0'/ /interface serial type='pty' target port='0'/ /serial serial type='dev' source path='/dev/ttyS0'/ target port='1'/ /serial console type='pty' target type='serial' port='0'/ /console input type='tablet' bus='usb'/ input type='mouse' bus='ps2'/ graphics type='vnc' port='-1' autoport='yes'/ sound model='ich6' address type='pci' domain='0x' bus='0x00' slot='0x04' function='0x0'/ /sound video model type='cirrus' vram='9216' heads='1'/ address type='pci' domain='0x' bus='0x00' slot='0x02' function='0x0'/ /video memballoon model='virtio' address type='pci' domain='0x' bus='0x00' slot='0x06' function='0x0'/ /memballoon /devices /domain I have tried placing the hostdev tags after the devices tag but the changes simply disappear. -- *** E-Mail is NOT a SECURE channel *** James B. Byrnemailto:byrn...@harte-lyne.ca Harte Lyne Limited http://www.harte-lyne.ca 9 Brockley Drive vox: +1 905 561 1241 Hamilton, Ontario fax: +1 905 561 0757 Canada L8E 3C3 ___ CentOS-virt mailing list CentOS-virt@centos.org http://lists.centos.org/mailman/listinfo/centos-virt
[CentOS-virt] Setting up serial ports on kvm guests
CentOS-6.2 We have a dedicated CentOS-5.7 host used for fax reception and transmission that we wish to move to a CentOS-6.2 virtual guest instance. The CentOS-6.2 virtual host has a 4-port serial card installed. lspci -v tshows this this: 03:00.0 Serial controller: Oxford Semiconductor Ltd OX16PCI954 (Quad 16950 UART) function 0 (Uart) (prog-if 06 [16950]) Subsystem: Oxford Semiconductor Ltd Device Flags: medium devsel, IRQ 17 I/O ports at d040 [size=32] Memory at d0702000 (32-bit, non-prefetchable) [size=4K] I/O ports at d020 [size=32] Memory at d0701000 (32-bit, non-prefetchable) [size=4K] Capabilities: [40] Power Management version 2 Kernel driver in use: serial setserial -g /dev/ttyS* shows this: /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 /dev/ttyS1, UART: 16950/954, Port: 0xd040, IRQ: 17 /dev/ttyS2, UART: 16950/954, Port: 0xd048, IRQ: 17 /dev/ttyS3, UART: 16950/954, Port: 0xd050, IRQ: 17 But, in virt-manage, when I try to add a serial device to the guest as the physical character device /dev/ttyS1 I get this error and the device is not added. XML error: unknown device type Traceback (most recent call last): File /usr/share/virt-manager/virtManager/addhardware.py, line 1026, in add_device self.vm.attach_device(self._dev) File /usr/share/virt-manager/virtManager/domain.py, line 698, in attach_device self._backend.attachDevice(devxml) File /usr/lib64/python2.6/site-packages/libvirt.py, line 400, in attachDevice if ret == -1: raise libvirtError ('virDomainAttachDevice() failed', dom=self) libvirtError: XML error: unknown device type We wish to have at least two, preferably three, andf ideally all four, serial ports enabled on the virtual guest. Does anyone know how this is accomplished? -- *** E-Mail is NOT a SECURE channel *** James B. Byrnemailto:byrn...@harte-lyne.ca Harte Lyne Limited http://www.harte-lyne.ca 9 Brockley Drive vox: +1 905 561 1241 Hamilton, Ontario fax: +1 905 561 0757 Canada L8E 3C3 ___ CentOS-virt mailing list CentOS-virt@centos.org http://lists.centos.org/mailman/listinfo/centos-virt
[CentOS-virt] Updated kvm kernael and now some guests are hung
Earlier this evening I updated our CentOS-6.2 kvm virtual host to kernel 2.6.32-220.4.1.el6. After rebooting three guests are hung. I cannot establish connections via the network (no route to host) and the virtual console is unresponsive. On two of them I was able to initiate the login process but after the password prompt the system no longer responded. On the other the system hung when I tried to run the vi editor. The console display on each of the affected guests shows a long list of hung tasks: task jbd2/dm-0-0:384 blocked for more than 120 seconds . . . task jbd2/dm-3-8:838 blocked for more than 120 seconfs task master:1226 blocked for more than . . . task miniserv.pl:1248 blocked task pickup:29136 blocked The lists on each guest vary somewhat but share most of the same processes being blocked. One has a postmaster task that does not display on any of the others. I can recover from this but I want to get these guests restarted if I possibly can. Is there a way to do this? What would cause the problem? -- *** E-Mail is NOT a SECURE channel *** James B. Byrnemailto:byrn...@harte-lyne.ca Harte Lyne Limited http://www.harte-lyne.ca 9 Brockley Drive vox: +1 905 561 1241 Hamilton, Ontario fax: +1 905 561 0757 Canada L8E 3C3 ___ CentOS-virt mailing list CentOS-virt@centos.org http://lists.centos.org/mailman/listinfo/centos-virt
Re: [CentOS-virt] Cannot remove lvs associated with deleted vm guests
This problem was finally resolved with the generous help of Bryn M. Reeves on the inux-...@redhat.com list. The difficulty was that the utility kpartx had the lvs opened via their mappings. Further, the mappings were created with the -pp option of kpartx and that option had to be provided to the delete action in order for that to work: # kpartx -d -pp /path/to/logical/volume/name Once the mappings were removed then the lvremove also worked and the volumes were removed. A small point, failure to provide the -pp option to the kpartx -d action does not raise an error. Nor does it remove the mapping however. -- *** E-Mail is NOT a SECURE channel *** James B. Byrnemailto:byrn...@harte-lyne.ca Harte Lyne Limited http://www.harte-lyne.ca 9 Brockley Drive vox: +1 905 561 1241 Hamilton, Ontario fax: +1 905 561 0757 Canada L8E 3C3 ___ CentOS-virt mailing list CentOS-virt@centos.org http://lists.centos.org/mailman/listinfo/centos-virt
[CentOS-virt] Cannot remove lvs associated with deleted vm guests
At the beginning of January I encountered a problem where several vm guests on a single host somehow managed to see the the virtual disks assigned to other guests on the same hosts. I was unable to resolve this situation and shutdown the affected guests after creating new guest instances and moving the services and data off the corrupted guests. I have since removed these guests via virt-manager but all attempts to remove from the host the logical volumes associated with the former VirtIO disks fail. The volumes are considered open by lvremove and nothing I have tried can get them to close for removal. The --force option has no effect on this situation. # /sbin/lvremove -f /dev/vg_vhost01/lv_vm_base Can't remove open logical volume lv_vm_base # dmsetup info -c vg_vhost01-lv_vm_base Name Maj Min Stat Open Targ Event UUID vg_vhost01-lv_vm_base 253 5 L--w21 0 LVM-gXMt00E1RDjpSX3INLZ35Prtg66aX36BeAOlKIkmfSNQRNol3Hni920R4YVaZr52 # dmsetup remove vg_vhost01-lv_vm_base device-mapper: remove ioctl failed: Device or resource busy Command failed There are several bugs filed on similar issues and udev is sometimes identified as the culprit. If I kill the udev daemon with T=`pidof -x udevd`; kill $T and rerun the lvremove -f command then I see this change in behaviour: # /sbin/lvremove -f /dev/vg_vhost01/lv_vm_base Found duplicate PV djM23m6YebBQ2xgPh9ORMtdX2iOu9xBQ: using /dev/mapper/vg_vhost01-lv_vm_pas.harte--lyne.cap2 not /dev/mapper/vg_vhost01-lv_vm_pgsql--dbms.harte--lyne.ca_00p2 Found duplicate PV djM23m6YebBQ2xgPh9ORMtdX2iOu9xBQ: using /dev/mapper/vg_vhost01-lv_vm_basep2 not /dev/mapper/vg_vhost01-lv_vm_pas.harte--lyne.cap2 Can't remove open logical volume lv_vm_base I need to get this system stable and return the lost disk space to the storage pool. Does anyone have any suggestions as to how to proceed? If I cannot solve this using the available system commands then prudence dictates that I have to re-install the server OS and rebuild all of the vm guests. As these guests have been laboriously transferred from other hosts during the past month this is a task I would rather not have to do. Any help is gratefully accepted. -- *** E-Mail is NOT a SECURE channel *** James B. Byrnemailto:byrn...@harte-lyne.ca Harte Lyne Limited http://www.harte-lyne.ca 9 Brockley Drive vox: +1 905 561 1241 Hamilton, Ontario fax: +1 905 561 0757 Canada L8E 3C3 ___ CentOS-virt mailing list CentOS-virt@centos.org http://lists.centos.org/mailman/listinfo/centos-virt
Re: [CentOS-virt] [CentOS] VirtIO disk 'leakage' across guests?
On Mon, January 16, 2012 17:01, Dennis Jacobfeuerborn wrote: On 01/16/2012 10:16 PM, James B. Byrne wrote: ... The xmldump for this guest instance contains this: ... Please post the xmldumps of the original guest and cloned guest right after cloning and without any modifications. Regards, Dennis Prototype dumpxml virsh # dumpxml vm-centos-6 domain type='kvm' id='34' namevm-centos-6/name uuid77692b36-d424-175f-b991-abc58fa0359b/uuid descriptionvm clone prototype root user password: protoype/description memory2097152/memory currentMemory2097152/currentMemory vcpu1/vcpu os type arch='x86_64' machine='rhel6.0.0'hvm/type boot dev='hd'/ /os features acpi/ apic/ pae/ /features clock offset='utc'/ on_poweroffdestroy/on_poweroff on_rebootrestart/on_reboot on_crashrestart/on_crash devices emulator/usr/libexec/qemu-kvm/emulator disk type='block' device='disk' driver name='qemu' type='raw' cache='none'/ source dev='/dev/vg_vhost01/lv_vm_base'/ target dev='vda' bus='virtio'/ alias name='virtio-disk0'/ address type='pci' domain='0x' bus='0x00' slot='0x05' function='0x0'/ /disk disk type='block' device='cdrom' driver name='qemu' type='raw'/ target dev='hdc' bus='ide'/ readonly/ alias name='ide0-1-0'/ address type='drive' controller='0' bus='1' unit='0'/ /disk controller type='ide' index='0' alias name='ide0'/ address type='pci' domain='0x' bus='0x00' slot='0x01' function='0x1'/ /controller interface type='bridge' mac address='52:54:00:28:7e:ce'/ source bridge='br0'/ target dev='vnet5'/ model type='virtio'/ alias name='net0'/ address type='pci' domain='0x' bus='0x00' slot='0x03' function='0x0'/ /interface serial type='pty' source path='/dev/pts/6'/ target port='0'/ alias name='serial0'/ /serial console type='pty' tty='/dev/pts/6' source path='/dev/pts/6'/ target type='serial' port='0'/ alias name='serial0'/ /console input type='tablet' bus='usb' alias name='input0'/ /input input type='mouse' bus='ps2'/ graphics type='vnc' port='5905' autoport='yes'/ sound model='ac97' alias name='sound0'/ address type='pci' domain='0x' bus='0x00' slot='0x04' function='0x0'/ /sound video model type='cirrus' vram='9216' heads='1'/ alias name='video0'/ address type='pci' domain='0x' bus='0x00' slot='0x02' function='0x0'/ /video memballoon model='virtio' alias name='balloon0'/ address type='pci' domain='0x' bus='0x00' slot='0x06' function='0x0'/ /memballoon /devices seclabel type='dynamic' model='selinux' relabel='yes' labelsystem_u:system_r:svirt_t:s0:c299,c322/label imagelabelsystem_u:object_r:svirt_image_t:s0:c299,c322/imagelabel /seclabel /domain virsh # A substantially identical clone of the prototype. This guest has had no additional storage added to it. virsh # dumpxml sshpipe.harte-lyne.ca domain type='kvm' id='19' namesshpipe.harte-lyne.ca/name uuid5fbd2bad-059c-da0d-c856-c16cfb831a9a/uuid descriptionvm clone prototype root user password: protoype/description memory2097152/memory currentMemory2097152/currentMemory vcpu1/vcpu os type arch='x86_64' machine='rhel6.0.0'hvm/type boot dev='hd'/ /os features acpi/ apic/ pae/ /features clock offset='utc'/ on_poweroffdestroy/on_poweroff on_rebootrestart/on_reboot on_crashrestart/on_crash devices emulator/usr/libexec/qemu-kvm/emulator disk type='block' device='disk' driver name='qemu' type='raw' cache='none'/ source dev='/dev/vg_vhost01/lv_vm_sshipe.harte-lyne.ca_00'/ target dev='vda' bus='virtio'/ alias name='virtio-disk0'/ address type='pci' domain='0x' bus='0x00' slot='0x05' function='0x0'/ /disk disk type='block' device='cdrom' driver name='qemu' type='raw'/ target dev='hdc' bus='ide'/ readonly/ alias name='ide0-1-0'/ address type='drive' controller='0' bus='1' unit='0'/ /disk controller type='ide' index='0' alias name='ide0'/ address type='pci' domain='0x' bus='0x00' slot='0x01' function='0x1'/ /controller interface type='bridge' mac address='52:54:00:ee:d8:32'/ source bridge='br0'/ target dev='vnet2'/ model type='virtio'/ alias name='net0'/ address type='pci' domain='0x' bus='0x00' slot='0x03' function='0x0'/ /interface serial type='pty' source path='/dev/pts/3'/ target port='0'/ alias name='serial0'/ /serial console type='pty' tty='/dev/pts/3' source path='/dev/pts/3'/ target type='serial' port='0'/ alias name='serial0'/ /console input type='tablet' bus='usb' alias name='input0'/ /input input type='mouse' bus='ps2'/ graphics
Re: [CentOS-virt] VirtIO disk 'leakage' across guests?
On Mon, January 16, 2012 13:05, James B. Byrne wrote: How is it even possible for an application running under a httpd service on one guest to see anything at all besides the VirtIO storage assigned to that guest? Has anyone else encountered this anomaly? I just cloned a guest instance. The clone prototype was set up with a single VirtIO disk of 8Gbs, divided into a 500 Mb boot and a ~7.1Gb root partition. The root partition was entirely assigned to the basic vg and two lv were created, one for swap and one for the actual root partition. When the guest was cloned there was only one VirtIO disk of 8 Gb assigned to it and this was cloned and given a new name. When I look at the newly cloned guest instance with pvdisplay this is what I see: # pvdisplay Couldn't find device with uuid umrIn6-Np0c-NC4Z-MuUo-5TBj-IKRE-XBU0De. --- Physical volume --- PV Name /dev/vda2 VG Name vg_vm_centos_6 PV Size 7.32 GiB / not usable 3.00 MiB Allocatable yes (but full) PE Size 4.00 MiB Total PE 1874 Free PE 0 Allocated PE 1874 PV UUID djM23m-6Yeb-BQ2x-gPh9-ORMt-dX2i-Ou9xBQ --- Physical volume --- PV Name unknown device VG Name vg_vm_centos_6 PV Size 31.25 GiB / not usable 3.97 MiB Allocatable yes (but full) PE Size 4.00 MiB Total PE 7999 Free PE 0 Allocated PE 7999 PV UUID umrIn6-Np0c-NC4Z-MuUo-5TBj-IKRE-XBU0De When I look at it using vgdisplay then this is what I see: # vgdisplay Couldn't find device with uuid umrIn6-Np0c-NC4Z-MuUo-5TBj-IKRE-XBU0De. --- Volume group --- VG Name vg_vm_centos_6 System ID Formatlvm2 Metadata Areas1 Metadata Sequence No 10 VG Access read/write VG Status resizable MAX LV0 Cur LV4 Open LV 2 Max PV0 Cur PV2 Act PV1 VG Size 38.57 GiB PE Size 4.00 MiB Total PE 9873 Alloc PE / Size 9873 / 38.57 GiB Free PE / Size 0 / 0 VG UUID qa6jwq-5gTp-6mMH-IWl9-OrEK-HjWc-pbaFsa What is going on and how do I fix this? The size of the ghost pv (31Gb) is showing up as the size of the clone's vg whereas the pv for the cloned instance is only 8Gb. I am only using virt-manager to manage disk storage for these guests and I have no idea why or how this mismash is happening. Any ideas? -- *** E-Mail is NOT a SECURE channel *** James B. Byrnemailto:byrn...@harte-lyne.ca Harte Lyne Limited http://www.harte-lyne.ca 9 Brockley Drive vox: +1 905 561 1241 Hamilton, Ontario fax: +1 905 561 0757 Canada L8E 3C3 ___ CentOS-virt mailing list CentOS-virt@centos.org http://lists.centos.org/mailman/listinfo/centos-virt
Re: [CentOS-virt] VirtIO disk 'leakage' across guests?
This behaviour has to be related to the fact that the volume group name does not change when guests are cloned. I do not know where the confusion originates but doing xmldumps from virsh shows that all of the guests only have their own VirtIO disks assigned to them so the cross linking is happening elsewhere and the vg name seems the likely place. However, I am at a loss as to how to avoid this. It does not appear that an option to rename the volume group is given when cloning from virt-manager. Is there a way to do this when the guest is cloned? -- *** E-Mail is NOT a SECURE channel *** James B. Byrnemailto:byrn...@harte-lyne.ca Harte Lyne Limited http://www.harte-lyne.ca 9 Brockley Drive vox: +1 905 561 1241 Hamilton, Ontario fax: +1 905 561 0757 Canada L8E 3C3 ___ CentOS-virt mailing list CentOS-virt@centos.org http://lists.centos.org/mailman/listinfo/centos-virt
Re: [CentOS-virt] VirtIO disk 'leakage' across guests?
If I log on to the newly cloned guest and I try and rename the vg used by that instance I see this: [root@vm-centos-6 ~]# vgrename vg_vm_centos_6 vg_vm_renamed Couldn't find device with uuid umrIn6-Np0c-NC4Z-MuUo-5TBj-IKRE-XBU0De. Cannot change VG vg_vm_centos_6 while PVs are missing. Consider vgreduce --removemissing. [root@vm-centos-6 ~]# vgreduce vg_vm_centos_6 --removemissing Couldn't find device with uuid umrIn6-Np0c-NC4Z-MuUo-5TBj-IKRE-XBU0De. WARNING: Partial LV lv_pgsql needs to be repaired or removed. WARNING: Partial LV lv_backups needs to be repaired or removed. WARNING: There are still partial LVs in VG vg_vm_centos_6. To remove them unconditionally use: vgreduce --removemissing --force. Proceeding to remove empty missing PVs. The xmldump for this guest instance contains this: devices emulator/usr/libexec/qemu-kvm/emulator disk type='block' device='disk' driver name='qemu' type='raw' cache='none'/ source dev='/dev/vg_vhost01/lv_vm_test-vg-rename'/ target dev='vda' bus='virtio'/ alias name='virtio-disk0'/ address type='pci' domain='0x' bus='0x00' slot='0x05' function='0x0'/ /disk disk type='block' device='cdrom' driver name='qemu' type='raw'/ target dev='hdc' bus='ide'/ readonly/ alias name='ide0-1-0'/ address type='drive' controller='0' bus='1' unit='0'/ /disk controller type='ide' index='0' alias name='ide0'/ address type='pci' domain='0x' bus='0x00' slot='0x01' function='0x1'/ The /dev entries for this vm guest are these: [root@vm-centos-6 ~]# ll /dev/vg_vm_centos_6/* lrwxrwxrwx. 1 root root 7 Jan 16 15:36 /dev/vg_vm_centos_6/lv_root - ../dm-0 lrwxrwxrwx. 1 root root 7 Jan 16 15:36 /dev/vg_vm_centos_6/lv_swap - ../dm-1 Searching for the missing uuid I find these files: # find /etc -print | xargs grep 'umrIn6-Np0c-NC4Z-MuUo-5TBj-IKRE-XBU0De' /etc/lvm/archive/vg_vm_centos_6_5-1429183950.vg: id = umrIn6-Np0c-NC4Z-MuUo-5TBj-IKRE-XBU0De /etc/lvm/archive/vg_vm_centos_6_2-807578735.vg: id = umrIn6-Np0c-NC4Z-MuUo-5TBj-IKRE-XBU0De /etc/lvm/archive/vg_vm_centos_6_4-1687335328.vg: id = umrIn6-Np0c-NC4Z-MuUo-5TBj-IKRE-XBU0De /etc/lvm/archive/vg_vm_centos_6_3-650133889.vg: id = umrIn6-Np0c-NC4Z-MuUo-5TBj-IKRE-XBU0De /etc/lvm/archive/vg_vm_centos_6_6-1907108135.vg: id = umrIn6-Np0c-NC4Z-MuUo-5TBj-IKRE-XBU0De /etc/lvm/backup/vg_vm_centos_6: id = umrIn6-Np0c-NC4Z-MuUo-5TBj-IKRE-XBU0De Looking in the files of /etc/lvm/archive created by the vgrename command shows a complete mess of lvs from different vm guests non of which have anything in common with the test vm guest, other than they all share the same volume group name. Evidently, cloning vm instances for the purpose of setting up a new vm guest to run with other vms cloned from the same prototype is not a good idea, -- *** E-Mail is NOT a SECURE channel *** James B. Byrnemailto:byrn...@harte-lyne.ca Harte Lyne Limited http://www.harte-lyne.ca 9 Brockley Drive vox: +1 905 561 1241 Hamilton, Ontario fax: +1 905 561 0757 Canada L8E 3C3 -- *** E-Mail is NOT a SECURE channel *** James B. Byrnemailto:byrn...@harte-lyne.ca Harte Lyne Limited http://www.harte-lyne.ca 9 Brockley Drive vox: +1 905 561 1241 Hamilton, Ontario fax: +1 905 561 0757 Canada L8E 3C3 ___ CentOS-virt mailing list CentOS-virt@centos.org http://lists.centos.org/mailman/listinfo/centos-virt
[CentOS-virt] server host keys for kvm clones
Respecting cloning vm guests, I see in /etc/ssh the following: ssh_host_dsa_key ssh_host_dsa_key.pub ssh_host_key ssh_host_key.pub ssh_host_rsa_key ssh_host_rsa_key.pub Is there a simple script somewhere to regenerate all the server host keys for the new guest after cloning? -- *** E-Mail is NOT a SECURE channel *** James B. Byrnemailto:byrn...@harte-lyne.ca Harte Lyne Limited http://www.harte-lyne.ca 9 Brockley Drive vox: +1 905 561 1241 Hamilton, Ontario fax: +1 905 561 0757 Canada L8E 3C3 ___ CentOS-virt mailing list CentOS-virt@centos.org http://lists.centos.org/mailman/listinfo/centos-virt
Re: [CentOS-virt] server host keys for kvm clones
On Wed, January 4, 2012 14:08, James B. Byrne wrote: Is there a simple script somewhere to regenerate all the server host keys for the new guest after cloning? The init script /etc/rc.d/init.d/sshd handles it. I discover that simply removing the existing ssh keys from /etc/ssh and restarting the sshd service causes the host keys to be regenerated. Another step to add to post cloning housekeeping. -- *** E-Mail is NOT a SECURE channel *** James B. Byrnemailto:byrn...@harte-lyne.ca Harte Lyne Limited http://www.harte-lyne.ca 9 Brockley Drive vox: +1 905 561 1241 Hamilton, Ontario fax: +1 905 561 0757 Canada L8E 3C3 ___ CentOS-virt mailing list CentOS-virt@centos.org http://lists.centos.org/mailman/listinfo/centos-virt
[CentOS-virt] turning off udev for eth0
I have set up a kvm host and configured a standard clone prototype for generating new guests. One persistent (pun intended) annoyance when cloning is the behaviour of udev with respect to the virtual network interface. The prototype is configured with just eth0 having a dedicated IP addr. When the prototype is cloned udev creates rules for both eth0 and eth1 in the clone. Because eth1 does not exist in the cloned guest one has to manually edit /etc/udev/rules.d/70-persistent-net.rules to get rid of the bogus entries and then restart the clone instance to have the changes take effect. All this does is return the new guest to the prototype eth0 configuration. Is there no way to alter udev's behaviour? Is udev even needed on a server system using virtual hardware? Altering the rules file not a big deal in itself but it adds needless busywork when setting up a new guest. -- *** E-Mail is NOT a SECURE channel *** James B. Byrnemailto:byrn...@harte-lyne.ca Harte Lyne Limited http://www.harte-lyne.ca 9 Brockley Drive vox: +1 905 561 1241 Hamilton, Ontario fax: +1 905 561 0757 Canada L8E 3C3 ___ CentOS-virt mailing list CentOS-virt@centos.org http://lists.centos.org/mailman/listinfo/centos-virt
Re: [CentOS-virt] Confusion over steps to add new logical volume to guest VM
On Mon, December 19, 2011 18:04, Jeff Boyce wrote: Greetings - I am hoping someone can confirm for me the steps that I am using to add an LV to an existing Guest in KVM, and what I am seeing as I do some of these steps. I think that you will find it easier to create guest storage volumes entirely from within virt-manager or virsh and not try and manipulate them directly on the host. I have done so in the past but it adds a layer of complexity to the process that yields no discernible benefits. Here is what I have hit upon in my own explorations of kvm: 1. Create a virtual storage pool and add it to the host. I use an lv on the host. 2. Create initial guest instance and allocate a new volume from the storage pool using virt-manager - details - storage window through the guest storage browser. Name the new storage volume to something related to the vm guest name. 3. Complete creating the vm guest. 4. To add additional storage to an existing vm guest first open the guest's - details - hardware menu tab and then select Add Storage. 5. In the guest hardware storage window select VirtIO type, raw format, and press the browse button. 6. In the host storage window select the storage pool to allocate storage from. 7. Select add a New Volume. 8. Assign a storage volume name (some variant of the base storage volume such that all volumes assigned to a single guest appear together in the host storage volume window works best for me) and set the new volume size. Refresh the host storage display, select the new volume name, and return to the guest storage window. 9. Push the Finish button. Restart the guest. 10. Now open the guest console, find the newly added device (fdisk -l ), say /dev/vdb for example, and partition it using fdisk or parted. I always make one partition for the entire device. Refresh the devices using parted. 11. Now add the newly partitioned device to the guest's own vg using the normal lvm tools. 12. Now create new or expand existing lvs on the guest using lvm. The only trouble I had, well towards the end the only trouble that I had left, was discovering that a VirtIO storage volume is not automatically partitioned when created. Until it had a partition I could not add it to the guest's vg even though I could see the device. HTH. -- *** E-Mail is NOT a SECURE channel *** James B. Byrnemailto:byrn...@harte-lyne.ca Harte Lyne Limited http://www.harte-lyne.ca 9 Brockley Drive vox: +1 905 561 1241 Hamilton, Ontario fax: +1 905 561 0757 Canada L8E 3C3 ___ CentOS-virt mailing list CentOS-virt@centos.org http://lists.centos.org/mailman/listinfo/centos-virt
[CentOS-virt] How to add additional Serial Ports to a KVM guest?
The vm host shows this: # setserial -g /dev/ttyS* /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 /dev/ttyS1, UART: 16950/954, Port: 0xd040, IRQ: 17 /dev/ttyS2, UART: 16950/954, Port: 0xd048, IRQ: 17 /dev/ttyS3, UART: 16950/954, Port: 0xd050, IRQ: 17 # # ll /dev/ttyS* crw-rw. 1 root dialout 4, 64 Nov 10 12:18 /dev/ttyS0 crw-rw. 1 root dialout 4, 65 Nov 10 12:18 /dev/ttyS1 crw-rw. 1 root dialout 4, 66 Nov 10 12:18 /dev/ttyS2 crw-rw. 1 root dialout 4, 67 Nov 10 12:18 /dev/ttyS3 By default serial 0 o guests is assigned to pty and has a device path of '-'. I have installed on the host a 4-port serial card, as evidenced above. When I add the first additional port to the guest (serial 1) and use '/dev/ttyS1' as the path the guest will boot. However, if I add a second serial port (serial 2) using path '/dev/ttyS2' then I get this error and the guest will not start: Traceback (most recent call last): File /usr/share/virt-manager/virtManager/engine.py, line 878, in run_domain vm.startup() File /usr/share/virt-manager/virtManager/domain.py, line 1313, in startup self._backend.create() File /usr/lib64/python2.6/site-packages/libvirt.py, line 333, in create if ret == -1: raise libvirtError ('virDomainCreate() failed', dom=self) libvirtError: internal error Process exited while reading console log output: char device redirected to /dev/pts/1 isa irq 4 already assigned How does one configure additional serial ports on a kvm guest? -- *** E-Mail is NOT a SECURE channel *** James B. Byrnemailto:byrn...@harte-lyne.ca Harte Lyne Limited http://www.harte-lyne.ca 9 Brockley Drive vox: +1 905 561 1241 Hamilton, Ontario fax: +1 905 561 0757 Canada L8E 3C3 ___ CentOS-virt mailing list CentOS-virt@centos.org http://lists.centos.org/mailman/listinfo/centos-virt
[CentOS-virt] Transfer of LVM based guests
I am investigating the procedure to follow when moving a KVM guest instance from one host to another where the guest uses LVM as its storage. As a preliminary cut I have cobbled the following together from various sources located through Google searches: 1. Log in to vmhost_old 2. Shutdown guest 3. Create an LVM snapshot of the guest volume 3.a. lvcreate -s -L 300m -n LVM_guest_snapshot guest_lv 4. Convert snapshot to a file image 4.add if=/dev/vhost/LVM_guest_snapshot of=/tmp/fs/LVM_guest_snapshot.img bs=4096 5. Remove the original snapshot 5.alvremove /dev/vhost/LVM_guest_snapshot 6. Move the snapshot image file to the new KVM host. Note that for large vm guest images tape transport is probably better than network transfers. 7. Log in to vhost_new 8. Create a new lv on the new vhost 8.alvcreate -n guest_name_lv -L 60G vhost_new_vg 9. Copy transferred image to new LV 9.add if=tmp/LVM_guest_snapshot.img of=/dev/vhost_new/guest_name_lv bs=4096 10. Copy guest xml file from vhost_old via sftp 10.a. get /etc/libvirt/qemu/guest_name.xml \ /etc/libvirt/qemu/guest_name.xml 11. Start new guest? Is there anything obviously wrong or omitted from this? -- *** E-Mail is NOT a SECURE channel *** James B. Byrnemailto:byrn...@harte-lyne.ca Harte Lyne Limited http://www.harte-lyne.ca 9 Brockley Drive vox: +1 905 561 1241 Hamilton, Ontario fax: +1 905 561 0757 Canada L8E 3C3 ___ CentOS-virt mailing list CentOS-virt@centos.org http://lists.centos.org/mailman/listinfo/centos-virt
[CentOS-virt] CentOS-6 KVM virt-manager will not shutdown guest
I have a CentOS-6 guest VM configured on a CentOS-6 host. If I run virt-manager then I can start the guest VM but once it is running I cannot get a shutdown command to have effect. To shutdown the running guest I either must select Force Off from the Shut Down menu or open the guest console and issue shutdown from the command line. Is there some setting that is required to have Shut Down have effect when issued from within virt-manager? is this a bug or a configuration problem? When I issue the shutdown command to the guest then there is no entry made in /var/log/messages. It just has no effect. However, if I issue a reboot command from the same menu then I get an error: libvirtd: 16:43:51.027: error: VirLibConnError 450 : this function is not supported by the connection driver: virDominReboot Am I to infer that Reboot and Shutdown options actually are not available to use from the virt-manager Shut Down menu, notwithstanding that they are present? -- *** E-Mail is NOT a SECURE channel *** James B. Byrnemailto:byrn...@harte-lyne.ca Harte Lyne Limited http://www.harte-lyne.ca 9 Brockley Drive vox: +1 905 561 1241 Hamilton, Ontario fax: +1 905 561 0757 Canada L8E 3C3 ___ CentOS-virt mailing list CentOS-virt@centos.org http://lists.centos.org/mailman/listinfo/centos-virt
[CentOS-virt] Network configuration on KVMs
In the Redhat EL6 virtualization guide ( http://docs.redhat.com/docs/en-US/Red_Hat_Enterprise_Linux/6/html/Virtualization/sect-Virtualization-Network_Configuration-Bridged_networking_with_libvirt.html ) I read this: # Configure iptables Configure iptables to allow all traffic to be forwarded across the bridge. # iptables -I FORWARD -m physdev --physdev-is-bridged -j ACCEPT # service iptables save # service iptables restart Disable iptables on bridges Alternatively, prevent bridged traffic from being processed by iptables rules. In /etc/sysctl.conf append the following lines: net.bridge.bridge-nf-call-ip6tables = 0 net.bridge.bridge-nf-call-iptables = 0 net.bridge.bridge-nf-call-arptables = 0 Reload the kernel parameters configured with sysctl. # sysctl -p /etc/sysctl.conf However, later in the same guide ( http://docs.redhat.com/docs/en-US/Red_Hat_Enterprise_Linux/6/html/Virtualization/ch16s04.html ) I read this: * Enabling IP forwarding (net.ipv4.ip_forward = 1) is also required for shared bridges and the default bridge. Note that installing libvirt enables this variable so it will be enabled when the virtualization packages are installed unless it was manually disabled. Note Note that enabling IP forwarding is not required for physical bridge devices. When a guest is connected through a physical bridge, traffic only operates at a level that does not require IP configuration such as IP forwarding. Which leaves me a little confused. Is this talking about some form of network device other than the installed NIC? How is this information integrated with the requirement given in section 10.3? Can someone explain to me how these two sections relate to one another? A second difficulty I encounter is that the first vm guest that I created does not seem to have any interface configuration file for etho in /etc/sysconfig/network-scripts. In fact, I see no ifcfg-x files at all. Am I supposed to create these by hand or have I somehow missed a configuration step in virt-manager? -- *** E-Mail is NOT a SECURE channel *** James B. Byrnemailto:byrn...@harte-lyne.ca Harte Lyne Limited http://www.harte-lyne.ca 9 Brockley Drive vox: +1 905 561 1241 Hamilton, Ontario fax: +1 905 561 0757 Canada L8E 3C3 ___ CentOS-virt mailing list CentOS-virt@centos.org http://lists.centos.org/mailman/listinfo/centos-virt
Re: [CentOS-virt] Centos-6, LVM and KVM guest image
On Mon, August 29, 2011 17:09, James B. Byrne wrote: CentOS-6.0 I created an lv (120 Gb) to hold the image of a KVM guest instance. I mounted this at /var/lib/libvirt/images/lv_guest01. When I do a df I see the lv is mounted at the desired location. When I run the virtual machine manager from the desktop I am given the option to install the image into the root directory tree or to browse for an alternative location. When I browse to the mount point of the lv then the virtual machine manger becomes non-responsive and I get a swirling circular pattern in the right hand pane of the file browser. This has been reported upstream as a bug, 734529. The issue arises when one browses to an empty directory. The file browser enters an indefinite wait state without displaying anything in the browser window or providing any message as to what the user need do next. One may navigate back out of the directory but the need for this action is not made evident. If, instead, one browses to an existing FILE then one may use that file as the virtual machine image store. Therefore, the work around for my situation is to create the logical volume, mount it, then create an empty file having the desired name within it and only then start the process of creating a new virtual machine. -- *** E-Mail is NOT a SECURE channel *** James B. Byrnemailto:byrn...@harte-lyne.ca Harte Lyne Limited http://www.harte-lyne.ca 9 Brockley Drive vox: +1 905 561 1241 Hamilton, Ontario fax: +1 905 561 0757 Canada L8E 3C3 ___ CentOS-virt mailing list CentOS-virt@centos.org http://lists.centos.org/mailman/listinfo/centos-virt
Re: [CentOS-virt] KVM with bridge in one interface
I am having a couple of iptables issues with this type of setup myself. The RH manual says to insert a rule into the FORWARD chain like this: -A FORWARD -m physdev --physdev-is-bridged -j ACCEPT However, for the host does this not mean that every packet is accepted. As far as I can discern from the documentation, when one sets up a physically bridged network on a kvm host then every packet arrives across the bridge interface and, insofar as the host is concerned, anything that it does not orginate itself is forwarded. I may be wrong on this, but the behaviour of my ssh filters since putting that command in the FORWARD chain indicates that something along those lines is occurring. The i/f eth0 seems to have no relevence to iptables rules for the host instance. -- *** E-Mail is NOT a SECURE channel *** James B. Byrnemailto:byrn...@harte-lyne.ca Harte Lyne Limited http://www.harte-lyne.ca 9 Brockley Drive vox: +1 905 561 1241 Hamilton, Ontario fax: +1 905 561 0757 Canada L8E 3C3 ___ CentOS-virt mailing list CentOS-virt@centos.org http://lists.centos.org/mailman/listinfo/centos-virt
[CentOS-virt] iptables and kvm
I am experimenting with a kvm virtual machine. At the moment I trying to configure iptables for the the host instance. In Xen terms I would call this Dom0 but I do not know the appropriate KVM term, if any. The setup I have is a single NIC (eth0) host bridged (bridge0). I want iptables to allow all host generated traffic (! bridge0 I think) and to check all other traffic for brute force attempts coming in over the LAN. I have the following rules in /etc/sysconfig/iptables: . . . -A GENERAL -m comment ! -i bridge0 -j ACCEPT . . . -A GENERAL -m comment -m state -i bridge0 --state NEW -j KNOCKD -A GENERAL -p tcp -m comment -m tcp -m multiport -m state -m recent -i bridge0 --state NEW --dports 20,21,22,23,110,143 --set --name IN_THROTTLE --rsource and so forth. But when I reload the config file and do an iptables --list | grep bridge then I see nothing. I cannot discern what it is that I am doing wrong. Obviously there is something about bridge0 as an interface option that iptables does not like but it is not giving me any error message. What am I doing wrong and what is the correct way to accomplish this? -- *** E-Mail is NOT a SECURE channel *** James B. Byrnemailto:byrn...@harte-lyne.ca Harte Lyne Limited http://www.harte-lyne.ca 9 Brockley Drive vox: +1 905 561 1241 Hamilton, Ontario fax: +1 905 561 0757 Canada L8E 3C3 ___ CentOS-virt mailing list CentOS-virt@centos.org http://lists.centos.org/mailman/listinfo/centos-virt
[CentOS-virt] How to connect a guest to a fixed routable address?
I am experimenting with kvm on a quad x86_64 running CentOS-5.5. I have created my first virtual guest and it seems to run fine. Now I wish to assign that particular guest to a fixed, public IP address. There seems to be at least two ways to proceed and I am soliciting comments on the preferred approach. In the first instance I can use brctl to create a bridged 'shared physical device' and presumably add that device to the network configuration of the guest, assigning the IP connection details there. In the second, I can continue to use the virtual networking system, albeit with fixed private as opposed to DHCP assigned addresses. In this case I gather that I must use ifconfig to add public IP addresses to the eth0 interface of the host and use iptables to route the public to the private address. Firstly, are my inferences correct? Are there any other approaches that I cannot discern? If these are the only two methods then which is the preferred one? I get the sense that bridging works in a manner that permits only one guest to access that physical device, however the documentation is not explicit on the matter. I have looked extensively for guidance but I suspect that a great deal of what I have read is somewhat dated and likely to cause me more trouble than help. -- *** E-Mail is NOT a SECURE channel *** James B. Byrnemailto:byrn...@harte-lyne.ca Harte Lyne Limited http://www.harte-lyne.ca 9 Brockley Drive vox: +1 905 561 1241 Hamilton, Ontario fax: +1 905 561 0757 Canada L8E 3C3 ___ CentOS-virt mailing list CentOS-virt@centos.org http://lists.centos.org/mailman/listinfo/centos-virt
Re: [CentOS-virt] CentOS-5.4, KVM, QEMU, Virt-Manager and kvm-qemu-img
On Tue, November 10, 2009 05:34, Kenni Lund wrote: Yep, you do want tun/tap. But if you create a regular bridge and tells virt-manager or libvirt to use this for your virtual machines, virt-manager/libvirt will take care of the tun/tap setup. This is what I have done. One of difficulties I still have is discovering where I set the IP addresses for the virtual machines. It seems that I get some variant of 192.168.122.x where I need an actual routable address in the 216.185.71.0/24 space. ifcfg-br0 # kvm virtual host bridged network connection DEVICE=br0 TYPE=Bridge BOOTPROTO=static BROADCAST=216.185.71.255 #HWADDR=xx:xx:xx:xx:xx:xx IPADDR=216.185.71.22 #IPV6INIT=yes #IPV6_AUTOCONF=yes NETMASK=255.255.255.0 NETWORK=216.185.71.0 ONBOOT=yes ifcfg-eth0 # Bridged ethernet for KVM virtual hosts # Intel Corporation 82566DC Gigabit Network Connection DEVICE=eth0 #BOOTPROTO=static #BROADCAST=216.185.71.255 HWADDR=xx:xx:xx:xx:xx:xx #IPADDR=216.185.71.22 #IPV6INIT=yes #IPV6_AUTOCONF=yes #NETMASK=255.255.255.0 #NETWORK=216.185.71.0 ONBOOT=yes BRIDGE=br0 -- *** E-Mail is NOT a SECURE channel *** James B. Byrnemailto:byrn...@harte-lyne.ca Harte Lyne Limited http://www.harte-lyne.ca 9 Brockley Drive vox: +1 905 561 1241 Hamilton, Ontario fax: +1 905 561 0757 Canada L8E 3C3 ___ CentOS-virt mailing list CentOS-virt@centos.org http://lists.centos.org/mailman/listinfo/centos-virt
Re: [CentOS-virt] CentOS-5.4, KVM, QEMU, Virt-Manager and kvm-qemu-img
On Tue, November 10, 2009 10:12, Kenni Lund wrote: Ok, once you get a grasp of it, I'm sure you'll find it pretty simple :) Install kvm + virt-manager + libvirt, setup a bridge, use virt-manager to create a new virtual machine which uses the bridge. Now you're done, nothing more needed. The problem being is that I have already done all that and it simply does not work as expected. So I infer that there a few important details that everyone is leaving out of their descriptions, possibly because they assume them as preconditions. Regards, -- *** E-Mail is NOT a SECURE channel *** James B. Byrnemailto:byrn...@harte-lyne.ca Harte Lyne Limited http://www.harte-lyne.ca 9 Brockley Drive vox: +1 905 561 1241 Hamilton, Ontario fax: +1 905 561 0757 Canada L8E 3C3 ___ CentOS-virt mailing list CentOS-virt@centos.org http://lists.centos.org/mailman/listinfo/centos-virt
Re: [CentOS-virt] CentOS-5.4, KVM, QEMU, Virt-Manager and kvm-qemu-img
On Tue, November 10, 2009 11:55, Kenni Lund wrote: Hmm, try to have a look at this: http://www.linux-kvm.com/content/using-bridged-networking-virt-manager Got it. Thanks. I will give this a read tonight while I am relaxing with the Red Hat Virtualization guide. Regards, -- *** E-Mail is NOT a SECURE channel *** James B. Byrnemailto:byrn...@harte-lyne.ca Harte Lyne Limited http://www.harte-lyne.ca 9 Brockley Drive vox: +1 905 561 1241 Hamilton, Ontario fax: +1 905 561 0757 Canada L8E 3C3 ___ CentOS-virt mailing list CentOS-virt@centos.org http://lists.centos.org/mailman/listinfo/centos-virt
Re: [CentOS-virt] CentOS-5.4, KVM, QEMU, Virt-Manager and kvm-qemu-img
On Mon, November 9, 2009 20:31, Kai Schaetzl wrote: James B. Byrne wrote on Mon, 9 Nov 2009 16:23:55 -0500 (EST): Lastly, why is qemu 4.5M but kvm-qemu-img is only 125K? I would assume it's just the module that works on image files. AFAIK, you don't need qemu if you have KVM. The same way you don't need KVM if you use Xen ... This is not the sense I gather from the various kvm websites. For example, http://www.linux-kvm.org/page/Main_Page states this: KVM also requires a modified QEMU although work is underway to get the required changes upstream. Now, I am not sure what this means as I lack any context. Does it mean that one needs a specialized qemu now and expresses hope that the standard qemu will incorporate the necessary changes sometime later? Or does it mean that qemu is needed now but that no qemu will be needed when upstream incorporates the recommended changes? As the date of this text is not later than 2008 July 21 is it out of date? Have the necessary changes been incorporated by upstream by now? Since upstream is not defined it may mean the qemu project or it might refer to the Linux kernel team. I suspect that the former is the case and that qemu will be required to support kvm in the foreseeable future, if not forever. -- *** E-Mail is NOT a SECURE channel *** James B. Byrnemailto:byrn...@harte-lyne.ca Harte Lyne Limited http://www.harte-lyne.ca 9 Brockley Drive vox: +1 905 561 1241 Hamilton, Ontario fax: +1 905 561 0757 Canada L8E 3C3 ___ CentOS-virt mailing list CentOS-virt@centos.org http://lists.centos.org/mailman/listinfo/centos-virt
Re: [CentOS-virt] CentOS-5.4, KVM, QEMU, Virt-Manager and kvm-qemu-img
On Mon, November 9, 2009 20:31, Kai Schaetzl wrote: I would assume it's just the module that works on image files. AFAIK, you don't need qemu if you have KVM. The same way you don't need KVM if you use Xen ... The rpm package note for kvm-qemu-img says this: Summary : Qemu disk image utility Description : This package contains qemu-img, the qemu command line tool for manipulating disk images, built from the qemu source code included on the KVM source. This package should be useful for systems that don\'t have a qemu package but need qemu-img. So, it would appear as if kvm-qemu-img is intended as a lightweight replacement for the full qemu package where all the functionality of the latter is not required. However, as I wish to use virt-manager clearly the full qemu package is required. -- *** E-Mail is NOT a SECURE channel *** James B. Byrnemailto:byrn...@harte-lyne.ca Harte Lyne Limited http://www.harte-lyne.ca 9 Brockley Drive vox: +1 905 561 1241 Hamilton, Ontario fax: +1 905 561 0757 Canada L8E 3C3 ___ CentOS-virt mailing list CentOS-virt@centos.org http://lists.centos.org/mailman/listinfo/centos-virt