Re: [fedora-virt] Routing to guests
by Robert Thiem
> From: Philip Rhoades
> I can ssh from/to the host/guest OK but how do I set up a route (or
> whatever is necessary) so that another machine:
> eth0: 192.168.0.12
> can ssh to the guest? - "ssh 192.168.122.68" gives "no route to host" -
> http://docs.fedoraproject.org/virtualization-guide/f12/en-US/html/ but
> the problem does not seem to be covered there.
Alexander is correct in saying that bridging would allow you to do that.
There are two networking discussed in the guide.
The first is a NAT (network address translation), in which the guests are
given "private" ip addresses and any outbound traffic appears to be coming
from the host machine's IP address. This is the same as the setup on your
ADSL router where the internal network machines get addresses of
192.168.x.x but the internet sees your requests as coming from the IP
address of your router.
There should be lots of documentation in linux firewalling guides under
sections on NAT (or possibly called IP Masquerading in some). Have a look
at these for information on port forwarding to reveal services
inside the virtual (such as ssh).
The other option is bridging. This shares the physical network interface
of the host with the guest. In this case the VM acts as though it's a
machine plugged into the same subnet as the host, its services are
accessible like those of the host and it's as vulnerable to attack as the
host.
Robert
11 years, 8 months
Restored Windows Server 2003 VM goes black
by Greg Scott
I tried a P2V migration last week and here might be a better spot to
document the results. I have an aging physical host running Windows
2003 Server and I want to P2V that host in to a libvirt VM. The
physical host uses a Compaq Smart Array 532 Controller with a Compaq
Logical Volume SCSI disk device. The logical volume is a RAID 5 set.
I first tried using the new virt-p2v approach, but haven't been
successful. So I tried doing it the old-fashioned way. On a RHEL 6.1
host, I built a libvirt Windows 2003 VM from scratch using a virtio
system drive. Then, on the physical host, I ran ntbackup and backed up
all the system drive files to a network share viewable from my newly
provisioned VM. I also backed up the system state. From the 2003 VM, I
restored the system drive files and system state and rebooted.
When rebooting, the VM flashes a couple of POST SeaBIOS lines, then the
console window goes black. No BSOD, just black. Virt-manager shows the
VM is still powered on, but the console window just sits there, black,
until I force the VM to power off. I tried pressing F8 to see if I
could get to a Windows boot menu, but this never worked. I have a hunch
something is going on with the new system virtual drive and the driver
for the old system drive.
I can boot the VM from a virtual CD and launch the Windows recovery
console, and from there I can see the Windows installation. The login
uses the new password, so I think the ntbackup - restores did their
jobs. I tried a fixboot and fixmbr, but neither of these did any good.
I tried another ntbackup - restore, this time using an IDE system drive
in my VM (the restore took 50 percent more time than with virtio), but
this also made no difference.
I ended up re-enabling the NIC on the physical host again and now I'm
trying to come up with a plan C. Are there any other ideas I'm not
thinking of?
Thanks
- Greg Scott
11 years, 10 months
How to make libvirt read /etc/hosts?
by Christoph Wickert
Hi,
I'd like to give my VMs reliable addresses over DHCP and so far I was
only able to do this by defining them in the libvirt's network config
with 'virsh net-edit'. But as libvirt runs dnsmasq and dnsmasq usually
reads /etc/hosts, it should be sufficient to just edit the hosts file.
Unfortunately this doesn't work. Why does dnsmasq ignore /etc/hosts when
started from libvirt?
Regards,
Christoph
11 years, 11 months
Virt Disk Performance
by Ken Smith
Hi, I have two virtual machine setups, one is FC13 and the other is
FC14, using kvm and guests created using the Virtual Machine Manager.
I have noticed that the disk performance is slower than I would have
expected. Here are some figures
FC14 Host (i7, 8Gb memory, Two 1Tb sata disks in soft Raid0)
Host, 9.76 MBytes/Sec
Centos 5.6 Guest, 6.45 MBytes/Sec
RedHat 8 Guest, 0.426 Mbytes/Sec
FC13 Host (i7, 4Gb Memory, One 1Tb sata disk)
Host, 47.6 MBytes/Sec
Centos 5.6 Guest, 12.52 MBytes/Sec
RedHat 7.3 Guest, 1.42 MBytes/Sec
FC6 Guest, 16 MBytes/Sec
Centos 6 Guest, 15.72 MBytes/Sec
The tests were run by copying large files (650 Mbytes) and timing the
result.
I didn't expect the legacy 2.4 kernel guests to perform so slowly.
The performance of the soft raid0 host machine is disappointing.
On the FC13 host, without Raid, the guest performance at 1/3 of the host
is also a surprise.
What experience and guidance is out there on this area?
Many thanks
Ken
--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
11 years, 11 months
[ANNOUNCE] libguestfs 1.14 released - tools for managing virtual machines and disk images
by Richard W.M. Jones
libguestfs is a library and a set of tools for reading, writing,
managing, inspecting, rescuing, resizing and aligning disk images,
and offline and live virtual machines.
I'm pleased to announce the release of libguestfs 1.14, the next
stable release of libguestfs. There are many changes and new features
in this release -- see below.
You can get source and binaries from the website:
http://libguestfs.org/
Source: http://libguestfs.org/download/1.14-stable/
Fedora: http://koji.fedoraproject.org/koji/packageinfo?packageID=8391
Debian 6: http://libguestfs.org/download/binaries/debian-packages/
Ubuntu 11.10: http://libguestfs.org/download/binaries/ubuntu1110-packages/
Release notes for libguestfs 1.14.0
-----------------------------------
These release notes only cover the differences from the previous
stable/dev branch split (1.12.0). For detailed changelogs, please see
the git repository, or the ChangeLog file distributed in the tarball.
New features
virt-alignment-scan is a new tool to check the alignment of
partitions within virtual machines or disk images.
virt-sparsify is a new tool to make virtual machine disk images
sparse.
virt-sysprep is a new tool to make cloning guests from a template
simpler.
erlang bindings.
virt-cat:
- virt-cat can now handle Windows paths and drive letters (RHBZ#693359).
virt-filesystems:
- the MBR partition type byte is displayed in --long output.
virt-make-fs:
- virt-make-fs now sets the MBR partition type byte correctly,
improving compatibility with Windows (RHBZ#746295).
virt-resize:
- virt-resize can now work with guests using extended and logical
partitions, in particular Ubuntu guests.
- virt-resize can now align the first partition of Windows guests,
improving performance. The new virt-resize --align-first option
controls this behaviour.
- The virt-resize --machine-readable flag makes it possible to use
virt-resize from other programs.
- Partitions are now aligned to 128 sectors (usually 64K) by
default. This improves efficiency on high-end storage. The new
virt-resize --alignment option allows the alignment to be
adjusted.
virt-win-reg:
- The syntax for deleting registry keys and values is documented
in the man page (RHBZ#737944).
guestfish:
- New commands setenv, unsetenv, to set environment variables.
- The input file and line number is printed in error messages.
- guestfish progress bars are now a "mini-library" used by other
tools too.
guestmount:
- the --live option (for access to live VMs) now works.
library:
- non-printing characters are escaped correctly in debug output.
- GUESTFS_EVENT_ENTER is a new event type generated whenever a
libguestfs function is called.
- the library contains systemtap/DTrace probes.
- the library can now be compiled without hivex (RHBZ#723474).
inspection:
- Improve detection of Windows disks.
- Adds support for:
ttylinux - a minimal Linux
Mageia (thanks Michael Scherer)
OpenSUSE and zypper (thanks Michael Scherer, Vincent Untz)
Ubuntu logos (thanks Michael Scherer)
NetBSD and pkgsrc (thanks Michael Scherer)
- Handle some guest types that use /dev/root in /etc/fstab.
- Fix handling of guests with > 26 disks (thanks Matthew Booth)
- Add support for guests with HP Smart Array disks (thanks Matthew Booth)
febootstrap:
- FEBOOTSTRAP_KERNEL, FEBOOTSTRAP_MODULES environment variables can
be set in order to choose which kernel to use for the appliance.
misc:
- ArchLinux support now working with Linux 3.0 (thanks Erik Nolte)
- libvirt disks marked <readonly/> are now added readonly when
using the virt-tools '-d' option.
Security
(no security problems were found or fixed in this release)
New APIs
compress-out, compress-device-out, copy-device-to-device,
copy-device-to-file, copy-file-to-device, copy-file-to-file,
get-smp, part-to-partnum, set-smp.
The mount API no longer implicitly adds -o sync,noatime options.
add-domain has a new 'readonlydisk' optional parameter to control
how <readonly/> disks are handled.
Internals
- Coverity was run on the source and more bugs were identified and
fixed.
- PCRE library is now required to build libguestfs.
- APIC is now the default for the appliance. You can also enable
SMP support in the appliance.
- OCaml bindings now correctly acquire GC lock during callbacks.
- Out of tree builds should now work correctly (thanks Hilko Bengen).
- ./configure --with-extra="..." can be used by packagers to set
the extra version string.
- zero, zero-device APIs: if the blocks already contain zeroes,
don't write zeroes, so that we don't unnecessarily make the
underlying storage non-sparse.
- is-zero, is-zero-device APIs: optimize these so zero detection is
faster.
Bugs fixed
- 748266 libguestfs should detect versions of qemu which require -machine pc option
- 747290 libguestfs ignores <readonly/> in libvirt XML
- 747287 Misleading error message when permission denied opening a disk image
- 746295 virt-make-fs doesn't set partition ID
- 744795 guestmount --live is not usable
- 737944 virt-win-reg hyphen (delete key) syntax may be wrong, and is not documented
- 733297 ruby event handlers fail with "exception in callback: wrong argument type Proc (expected Data)"
- 731744 libguestfs should escape special/non-printing characters in debug output
- 729887 appliance crashes running aug_init with flags=4
- 729075 libguestfs confuses Hp_recovery partition with Windows root filesystem
- 727178 error: luks_open: cryptsetup: error while loading shared libraries: libfipscheck.so.1: cannot open shared object file: No such file or directory
- 726739 libguestfs: error: aug_get: no matching node, trying to find hostname
- 723474 If hivex and/or pcre not installed, libguestfs fails to compile
- 693359 virt-cat and virt-edit don't handle case sensitive NTFS paths properly
- 678231 virt-inspector reports unknown filesystem UUID
- 671082 libguestfs does not work with kernel-rt
- 666578 libguestfs: unknown filesystem label SWAP-sda2
- 642821 virt-resize falls over on a disk image with a logical swap partition
--
Richard Jones, Virtualization Group, Red Hat http://people.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
11 years, 11 months
F15 virt-preview
by Frank Murphy
Hi,
If I use "halt -p" on the Fedora Guests.
I get disconnected from Virt-Manager.
click connect, and the running vms are there again.
Here what vmm says:
Error polling connection 'qemu:///system': Unable to read from
monitor: Connection reset by peer
Traceback (most recent call last):
File "/usr/share/virt-manager/virtManager/engine.py", line 440, in _tick
conn.tick()
File "/usr/share/virt-manager/virtManager/connection.py", line 1507, in tick
vm.tick(now)
File "/usr/share/virt-manager/virtManager/domain.py", line 1531, in tick
info = self._backend.info()
File "/usr/lib64/python2.7/site-packages/libvirt.py", line 1411, in info
if ret is None: raise libvirtError ('virDomainGetInfo() failed', dom=self)
libvirtError: Unable to read from monitor: Connection reset by peer
What would I bz against.
--
Regards,
Frank Murphy
UTF_8 Encoded
Friend of fedoraproject.org
11 years, 11 months
Bug or what?
by Tom Horsley
If I try to install a new virtual machine (I'm running on
fedora 15 with all update, but no virt-preview) using
the virt-manager and going through the new VM wizard
pages, I get errors if I take a path it apparently
doesn't like:
If I tell it to use existing or other storage and
browse local and pick a qcow2 image file I manually
created outside of virt-manager thusly:
qemu-img create -f qcow2 testf16b.img 20G
qemu-img info testf16b.img
image: testf16b.img
file format: qcow2
virtual size: 20G (21474836480 bytes)
disk size: 140K
cluster_size: 65536
When I advance to actually creating the virtual machine,
it tells me there is no disk space. Looking at the hardware
info it says: Storage size 0.19 MB
If, on the other hand, when I get to the storage def
page, I use virt-manager to create a new qcow2 image
file via the gui dialog, then when I go to start the
actual install, the hardware info page does indeed
know that the image is a 20G virtual disk.
If this is a bug, what would I report it against?
If it isn't a bug, how the heck do I install a new
virtual machine pointing to an arbitrary disk image
file?
11 years, 11 months
fedora-virt-preview repo needs libusb1-1.0.9-0.2.git212ca37c.fc15.i686?
by Bill McGonigle
Hi,
Can libusb1-1.0.9-0.2.git212ca37c.fc15.i686 be included in the fedora-virt-preview repo so that yum will allow an update when the i686 version is installed (wine.x86_64 drags it in)?
I get:
Error: Protected multilib versions:
libusb1-1.0.9-0.2.git212ca37c.fc15.x86_64 != libusb1-1.0.8-7.fc15.i686
I suppose this could occur for any generic lib* packages that the repo replaces from base.
-Bill
-----
[root@zpm ~]# yum --noplugins --disablerepo=* --enablerepo=fedora --enablerepo=updates --enablerepo=fedora-virt-preview update
updates | 3.5 kB 00:00
Setting up Update Process
Resolving Dependencies
--> Running transaction check
---> Package libusb1.x86_64 0:1.0.8-7.fc15 will be updated
---> Package libusb1.x86_64 0:1.0.9-0.2.git212ca37c.fc15 will be an update
---> Package libvirt.x86_64 0:0.9.4-1.fc15 will be updated
---> Package libvirt.x86_64 0:0.9.6-2.fc15 will be an update
--> Processing Dependency: libwsman_curl_client_transport.so.1()(64bit) for package: libvirt-0.9.6-2.fc15.x86_64
--> Processing Dependency: libwsman_client.so.1()(64bit) for package: libvirt-0.9.6-2.fc15.x86_64
--> Processing Dependency: libwsman.so.1()(64bit) for package: libvirt-0.9.6-2.fc15.x86_64
---> Package libvirt-client.x86_64 0:0.9.4-1.fc15 will be updated
---> Package libvirt-client.x86_64 0:0.9.6-2.fc15 will be an update
---> Package libvirt-devel.x86_64 0:0.9.4-1.fc15 will be updated
---> Package libvirt-devel.x86_64 0:0.9.6-2.fc15 will be an update
---> Package libvirt-python.x86_64 0:0.9.4-1.fc15 will be updated
---> Package libvirt-python.x86_64 0:0.9.6-2.fc15 will be an update
---> Package python-virtinst.noarch 0:0.600.0-4.fc15 will be updated
---> Package python-virtinst.noarch 0:0.600.0-5.fc15 will be an update
---> Package qemu-common.x86_64 2:0.15.0-1.fc15 will be updated
---> Package qemu-common.x86_64 2:0.15.0-4.fc15 will be an update
--> Processing Dependency: libusbredirparser.so.0()(64bit) for package: 2:qemu-common-0.15.0-4.fc15.x86_64
---> Package qemu-img.x86_64 2:0.15.0-1.fc15 will be updated
---> Package qemu-img.x86_64 2:0.15.0-4.fc15 will be an update
---> Package qemu-kvm.x86_64 2:0.15.0-1.fc15 will be updated
---> Package qemu-kvm.x86_64 2:0.15.0-4.fc15 will be an update
---> Package qemu-system-x86.x86_64 2:0.15.0-1.fc15 will be updated
---> Package qemu-system-x86.x86_64 2:0.15.0-4.fc15 will be an update
---> Package seabios.x86_64 0:0.6.2-2.fc15 will be updated
---> Package seabios.x86_64 0:0.6.2-3.fc15 will be an update
---> Package seabios-bin.noarch 0:0.6.2-2.fc15 will be updated
---> Package seabios-bin.noarch 0:0.6.2-3.fc15 will be an update
---> Package spice-glib.x86_64 0:0.5-6.fc15 will be updated
---> Package spice-glib.x86_64 0:0.7.39-1.fc15 will be an update
--> Processing Dependency: libcacard.so.0()(64bit) for package: spice-glib-0.7.39-1.fc15.x86_64
---> Package spice-gtk.x86_64 0:0.5-6.fc15 will be updated
---> Package spice-gtk.x86_64 0:0.7.39-1.fc15 will be an update
---> Package spice-gtk-python.x86_64 0:0.5-6.fc15 will be updated
---> Package spice-gtk-python.x86_64 0:0.7.39-1.fc15 will be an update
---> Package spice-server.x86_64 0:0.9.0-1.fc15 will be updated
---> Package spice-server.x86_64 0:0.9.1-1.fc15 will be an update
---> Package virt-manager.noarch 0:0.9.0-5.fc15 will be updated
---> Package virt-manager.noarch 0:0.9.0-6.fc15 will be an update
---> Package virt-manager-common.noarch 0:0.9.0-5.fc15 will be updated
---> Package virt-manager-common.noarch 0:0.9.0-6.fc15 will be an update
---> Package virt-manager-tui.noarch 0:0.9.0-5.fc15 will be updated
---> Package virt-manager-tui.noarch 0:0.9.0-6.fc15 will be an update
--> Running transaction check
---> Package libcacard.x86_64 0:0.1.2-1.fc15 will be installed
---> Package libwsman1.x86_64 0:2.2.4-3.fc15 will be installed
---> Package usbredir.x86_64 0:0.3.1-1.fc15 will be installed
--> Finished Dependency Resolution
Error: Protected multilib versions: libusb1-1.0.9-0.2.git212ca37c.fc15.x86_64 != libusb1-1.0.8-7.fc15.i686
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest
--
Bill McGonigle, Owner
BFC Computing, LLC
http://bfccomputing.com/
Telephone: +1.855.SW.LIBRE
Email, IM, VOIP: bill(a)bfccomputing.com
VCard: http://bfccomputing.com/vcard/bill.vcf
Social networks: bill_mcgonigle/bill.mcgonigle
11 years, 11 months
unattended install w/ 'virt-install' just hangs on the serial console [F16 guest on F16 host]
by Kashyap Chamarthy
Hi,
I was trying virt-install an F16 guest on an Fedora-16 latest host. It just basically
hangs after 'setfilecon' on a non-existent device. Refer the virsh serial console o/p
==> Version Info <==
######################################################################
[root@moon ~]# uname -r ; rpm -q qemu-kvm libvirt python-virtinst
3.1.0-0.rc9.git0.0.fc16.x86_64
qemu-kvm-0.15.0-5.fc16.x86_64
libvirt-0.9.6-2.fc16.x86_64
python-virtinst-0.600.0-5.fc16.noarch
[root@moon ~]#
######################################################################
Below is a snippet of serial console o/p where the virt-install hung.
#######################################################################
.
.
.
.
Starting Initialize storage subsystems (RAID, LVM, etc.) failed, see 'systemctl status
fedora-storage-init-late.service' for details.
[0/386]
[ 4.235192] systemd[1]: Unit fedora-storage-init-late.service entered failed state.
Started POSIX Message Queue File System.
Started Debug File System.
Started Huge Pages File System.
Started Security File System.
Starting Monitoring of LVM2 mirrors, snapshots etc. using dmeventd or progress polling...
Started Load legacy module configuration.
Starting File System Check on Root Device...
Starting Setup Virtual Console...
Started Load Kernel Modules.
Started FUSE Control File System.
Started Configuration File System.
[ 4.350713] systemd-fsck[297]: Root directory is writable, skipping check.
Starting Apply Kernel Variables...
Started Set Up Additional Binary Formats.
Starting STDOUT Syslog Bridge...
[ 4.405194] systemd-vconsole-setup[303]: /bin/loadkeys failed with error code 1.
[ 4.408727] systemd-vconsole-setup[303]: /bin/setfont failed with error code 1.
Started STDOUT Syslog Bridge.
Started udev Coldplug all Devices.
Started File System Check on Root Device.
Started Setup Virtual Console.
Started Apply Kernel Variables.
Starting Remount Root FS...
Starting udev Wait for Complete Device Initialization...
[ 4.517828] mount[328]: warning: can't open /etc/fstab: No such file or directory
[ 4.551845] EXT4-fs (dm-0): re-mounted. Opts: user_xattr,acl,barrier=1,data=ordered
Started Remount Root FS.
[ 4.586326] lvm[296]: No volume groups found
Started Monitoring of LVM2 mirrors, snapshots etc. using dmeventd or progress polling.
Started Reconfigure the system on administrator request.
Started Relabel all filesystems, if necessary.
Started Mark the need to relabel after reboot.
Starting Load Random Seed...
Starting Recreate Volatile Files and Directories...
Started Load Random Seed.
[ 4.703010] systemd-tmpfiles[345]: Successfully loaded SELinux database in 39ms 665us,
size on heap is 468K.
Started Recreate Volatile Files and Directories.
[ 5.424048] vda: unknown partition table
Started udev Wait for Complete Device Initialization.
Starting Software RAID Monitor Takeover...
Started anaconda performance monitor.
Starting System Logging Service...
Starting Shell on tty2...
[ 5.879702] udevd[298]: setfilecon /dev/vcs2 failed: No such file or directory
Started Shell on tty2.
Looking for the virtio ports... done.
Starting Anaconda version 16.20.
#######################################################################
==> Script I used <==
# virt-install --connect=qemu:///system \
--network=bridge:br0 \
--initrd-inject=/export/fed.ks \
--extra-args="ks=file:/fed.ks console=tty0 console=ttyS0,115200" \
--name=$domname \
--disk /export/vmimgs/$domname.img,size=20 \
--ram 2048 \
--vcpus=2 \
--check-cpu \
--accelerate \
--hvm \
--location=$location1 \
--nographics
#######################################################################
==> Kickstart <==
# cat fed.ks
install
text
reboot
lang en_US.UTF-8
keyboard us
network --bootproto dhcp
rootpw redhat
firewall --enabled --ssh
selinux --enforcing
timezone --utc America/New_York
bootloader --location=mbr --append="console=tty0 console=ttyS0,115200 rd_NO_PLYMOUTH"
zerombr
clearpart --all --initlabel
autopart
%packages
@core
%end
#######################################################################
Am I missing something? Any hints here?
/kashyap
11 years, 11 months