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, 4 months
virt-preview for Fedora 15 users back in sync
by Justin Forbes
For those of you using the virt-preview repository for Fedora 15,
binutils was updated, which allowed me to build seabios and put the rest
of the stack in sync. You should notice updates on most packages today,
and things will stay in sync with F16 moving forward.
For those of you not using virt-preview, who might want to run the
latest/greatest virt stack from Fedora 16 on a Fedora 15 host,
instructions are located at:
https://fedoraproject.org/wiki/Virtualization_Preview_Repository
Thanks,
Justin
11 years, 8 months
150 second timeout
by Jerry James
I have a Fedora 15 x86_64 system, 8 GB of RAM, 4 CPUs, 1 terabyte
disk. I run several virtual machines on it, used to check
cross-system compatibility of some software I develop for my employer.
I run "yum upgrade" on the host every work day, so it is up to date
as of today (August 31).
I have a RHEL 6.1 guest that I am using very heavily right now. I run
it with virt-manager. The guest's disk is a logical volume with no
(host) filesystem. The guest's memory is drawn from a 1 GB hugetlbfs.
The host has a Nehalem CPU, which is exposed (to the extent possible)
to the guest. The display uses spice + qxl drivers in the guest.
Recently, the guest has gotten stuck from time to time. I'll be
typing away and suddenly the guest's display will freeze. When this
happens, I can still use the mouse to perform functions on the host,
but pressing keys has no effect. Exactly 150 seconds later, the guest
will unfreeze (sort of; see below) and I can change keyboard focus to
other host applications again. At that point, the guest window will
*partially* repaint, but will still not change in response to mouse or
keyboard actions. I have to close that window and then click in
virt-manager to open a new window. At that point, I can see that all
of the key presses I made while it was frozen were received and acted
on by the guest, so it is only the display that froze.
I have other Linux guests. None of them display this behavior. Is
this some kind of incompatibility between the RHEL 6.1 qxl drivers and
Fedora 15 spice? Does a 150 second timeout ring a bell with anyone?
Is there some way to get the keyboard focus away from the guest when
this happens so I can at least do something useful on the host?
Thanks,
--
Jerry James
http://www.jamezone.org/
11 years, 8 months
Native systemd service files for libvirt
by Jóhann B. Guðmundsson
If anyone is interested here are native systemd unit files for libvirt
for testing copy/create each # section in it's corresponding file in
/lib/systemd/system directory on F15+ host and run systemctl daemon
reload and systemctl start libvirtd.service for example to start the
libvirtd service.
# libvirtd.service
[Unit]
Description=Libvirt Virtualization Daemon
After=syslog.target network.target
[Service]
EnvironmentFile=-/etc/sysconfig/libvirtd
ExecStart=/usr/sbin/libvirtd $LIBVIRTD_ARGS
ExecReload=/bin/kill -HUP $MAINPID
[Install]
WantedBy=multi-user.target
# libvirt-guests.service run this first cp /etc/init.d/libvirt-guests
/usr/libexec/ ( if package this is were it should end up )
[Unit]
Description=Suspend Active Libvirt Guests
After=syslog.target network.target libvirtd.service
[Service]
Type=oneshot
EnvironmentFile=-/etc/sysconfig/libvirt-guests
ExecStart=/usr/libexec/libvirt-guests start
ExecStop=/usr/libexec/libvirt-guests stop
RemainAfterExit=yes
[Install]
WantedBy=multi-user.target
#libvirt-qpid.service
[Unit]
Description=Libvirt QPID Gateway
After=syslog.target network.target libvirtd.service
[Service]
EnvironmentFile=-/etc/sysconfig/libvirt-qpid
ExecStart=/usr/sbin/libvirt-qpid $LIBVIRT_QPID_ARGS
[Install]
WantedBy=multi-user.target
JBG
11 years, 9 months
SNAFU & VDQ : VirtualBox repair or replacement??
by Beartooth
I seem to've scrod up really royally this time. So royally I'll
have to build up to my Very Dumb Question (VDQ).
Thanks to a clueful friend, I had an installation up and running
under Fedora 14. Then something (unrelated afaik : I had an app open on
my virtual XP, but was doing something else entirely -- I disremember
just what) went bonkers, and crashed X. I had to log back in.
Now when I click on the desktop launcher, I see the VB popup I
used to -- but only for a second or two.
Poking around, I found that /usr/lib/virtualbox/VirtualBox
belonged to root, not my userid.
It must have been a major borass to try (as root) doing
"[root@HBsk3 virtualbox]# chown -R btth:btth VirtualBox" because it not
only didn't help, but "chown -R root:root VirtualBox" didn't fix it.
Now, when I click the launcher, I get an error box saying :
Effective UID is not root (euid=500 egid=500 uid=500 gid=500) (rc=-10)
Please try reinstalling VirtualBox.
I tried. rpm can't seem to do that. rpm -e VirtualBox tells me
it's not installed; but rpm -Uvh on what I had told me it was already
installed.
I went to the website and downloaded
VirtualBox-4.1-4.1.2_73507_fedora14-1.x86_64.rpm --which, fortunately,
was more recent than what I had.
But now both rpm -Uvh and rpm -ivh give me multiple screenfuls of
errors like this :
file /usr/share/virtualbox/src/vboxhost/vboxnetflt/
VBoxNetFltInternal.h from install of
VirtualBox-4.1-4.1.2_73507_fedora14-1.x86_64 conflicts with file from
package VirtualBox-4.0-4.0.12_72916_fedora14-1.x86_64
Should I just delete those earlier rpms from /home/btth? Go to /
usr/share (or maybe /usr/lib, or both) and delete virtualbox? Or what?
Put an f in the rpm command??
--
Beartooth Staffwright, Not Quite Clueless Power User
I have precious (very precious!) little idea where up is.
11 years, 9 months
Problems with vnc over ssl
by lidumil@vsehomir.cz
Hello,
I'm using the configuration of libvirt for F15 which I was using on
F14 (libvirt 0.8.8 vs 0.8.3) . Everything is working fine except the
vnc. The vnc is running, but not over ssl. Does anybody have a hint,
what have been changed in libvirt and what I need to do to enable this
option? Thanks.
This is my config:
vnc_listen = "0.0.0.0"
vnc_tls = 1
vnc_tls_x509_cert_dir = "/somepath" //all necessary files are there
user = "root"
group = "root"
This is the log of one of the quests running on the hypervizor:
2011-08-13 03:59:40.567: starting up
LC_ALL=C PATH=/sbin:/usr/sbin:/bin:/usr/bin QEMU_AUDIO_DRV=none
/usr/libexec/qemu-kvm -S -M pc-0.14 -enable-kvm -m 512 -smp
1,sockets=1,cores=1,threads=1 -name vm27
-uuid 00000000-0000-0000-0000-000000000027 -nodefconfig -nodefaults
-chardev socket,id=charmonitor,path=/var/lib/libvirt/qemu/vm27.monitor,server,nowait
-mon chardev
=charmonitor,id=monitor,mode=control -rtc base=utc -boot dc -drive
file=/somepath/someimage.img,if=none,id=drive-ide0-0-0,format=qcow2
-device ide-drive,b
us=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0 -drive
if=none,media=cdrom,id=drive-ide0-1-0,readonly=on,format=raw -device
ide-drive,bus=ide.1,unit=0,drive=drive-i
de0-1-0,id=ide0-1-0 -netdev tap,fd=21,id=hostnet0 -device
rtl8139,netdev=hostnet0,id=net0,mac=52:54:00:00:00:1b,bus=pci.0,addr=0x3
-chardev pty,id=charserial0 -devic
e isa-serial,chardev=charserial0,id=serial0 -usb -vnc
0.0.0.0:4127,password,tls,x509=/data/libvirt/certs -k en-us -vga
cirrus -device virtio-balloon-pci,id=balloon0,
bus=pci.0,addr=0x4
char device redirected to /dev/pts/11
2011-08-13 21:15:33.638: shutting down
The system is fully updated and these are all the packages which had
been installed on the minimal instalation of F15:
yum install libvirt gnutls-devel libxml2-devel qemu-kvm qemu-kvm-tools
'*guestf*' -y
yum install net-snmp ntp kernel-devel sysstat postfix perl-Net-SCP
wget make gcc gcc-c++ java mc rsync not-yet-commons-ssl -y
yum install compat-libstdc* pciutils pam pam.i686 libstdc++.i686
zlib.i686 compat-libstdc++-33.i686 -y
The restart of libvirtd in /var/log/messages writes this:
Aug 15 00:26:22 f100 libvirtd: 00:26:22.109: 14924: warning :
qemudDispatchSignalEvent:406 : Shutting down on signal 15
Aug 15 00:26:23 f100 libvirtd: Could not find keytab file:
/etc/libvirt/krb5.tab: No such file or directory
Aug 15 00:26:23 f100 libvirtd: 00:26:23.239: 17058: info : libvirt
version: 0.8.8, package: 7.fc15 (Fedora Project, 2011-07-06-15:17:26,
x86-17.phx2.fedoraproject.org)
Aug 15 00:26:23 f100 libvirtd: 00:26:23.239: 17058: error :
virGetHostname:2634 : internal error getaddrinfo failed for 'f100':
Name or service not known
11 years, 9 months
CentOS 6 install via virt-install - "No usable disks have been found."
by Bill McGonigle
Hi, all,
I'm not seeing disks under CentOS 6 when trying to install. I'm using:
xen-4.0.2-1.fc14.x86_64
2.6.32.39-175.xendom0.fc13.x86_64
installing using:
virt-install --debug -n sully --mac=02:00:0A:01:01:10 -f
/var/lib/xen/images/sully -s 12 -r 2048 --vcpus=2 --nographics -p
--os-type=linux --os-variant=rhel6 --location
http://librescu.bfccomputing.com/cobbler/ks_mirror/centos6-x86_64/
It sounded like:
https://bugzilla.redhat.com/show_bug.cgi?id=678374
so I tried dropping the --nonsparse option, but I'm using a newer
version of python-virtinstall:
python-virtinst-0.500.6-1.fc14.noarch
than should be required, and I'm seeing this with and with the option
anyway.
I do see the disk image is created, and attached to the DomU. e.g.:
[2011-07-26 01:01:47 18534] DEBUG (DevController:97) DevController:
writing {'domain': 'sully', 'frontend':
'/local/domain/18/device/vbd/51712', 'uuid':
'3380cea8-a322-292d-cc5d-8bb084306976', 'bootable': '1', 'dev': 'xvda',
'state': '1', 'params': 'aio:/var/lib/xen/images/sully', 'mode': 'w',
'online': '1', 'frontend-id': '18', 'type': 'tap'} to
/local/domain/0/backend/tap/18/51712.
and I can see the disk image if I dump configuration from virsh.
I do see this in the DomU kernel messages:
XENBUS: Device with no driver: device/vbd/51712
XENBUS: Device with no driver: device/vif/0
XENBUS: Device with no driver: device/console/0
but I see reports online that say not to worry about those, initrd will
load the modules.
The initrd does have:
./kernel/drivers/xen
./kernel/drivers/xen/xenfs
./kernel/drivers/net/xen-netfront.ko.gz
./kernel/drivers/block/xen-blkfront.ko.gz
on it.
I tried adding:
xen_emul_unplug=never
to the kernel parameters per a previous thread here, but that didn't
seem to change anything.
It seems like others are having success with CentOS 6 in general:
http://grantmcwilliams.com/tech/virtualization/xen-howtos/538-centos-6-vi...
so I suspect it's got something to do with Xen 4.0.2, but I'm not sure
where to look right now.
Any suggestions?
-Bill
--
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, 9 months
Suspending VMs on host shutdown
by Tom Hughes
The current default behaviour of libvirt, courtesy of the libvirt-guests
service, is to suspend any running VMs when the host is shutdown.
The only problem with this is that qemu doesn't seem to guarantee that a
VM suspended with one version of qemu can be restored by a later
version, so if you have a running VM but qemu has been updated since it
was started then you may find that rebooting the host leaves you with an
unbootable guest.
My specific example was that this morning qemu-kvm updated from
0.15.0-1.fc15 to 0.15.0-0.3.201108040af4922.fc15 and shortly after that
I restarted my host only to find that the VM that had been running for
some time wouldn't start. Looking at the logs showed:
Unknown savevm section or instance 'kvmclock' 0
load of migration failed
The actual error in virt-manager or virsh was worse than useless, just
saying that it had lost contact with the monitor:
virsh # start dove
error: Failed to start domain dove
error: Unable to read from monitor: Connection reset by peer
There also doesn't seem to be any way to tell libvirt to ignore the
saved image and do a new boot.
The only way I was able to get things running again was to find the
saved memory image on disk and move it out of the way so that libvirt
would boot the VM from the disk image instead of trying to restore it.
Tom
--
Tom Hughes (tom(a)compton.nu)
http://compton.nu/
11 years, 9 months
connect XP -- how?
by Beartooth
I have VirtualBox 4.0.12 installed under Fedora 14; it brings up
XP, which runs the legacy software that interacts with my old Garmin
GPSs. But somehow, nothing I try manages to establish an Internet
connection. (It says it can't find any network cards.)
One guess is that there's some permission toggle in VB itself,
rather than in the virtual XP, that I need to switch; but I have no idea
what nor where.
I've gone through Devices > Network Adapters, trying each choice
with everything I can think of in the virtual XP to set up a connection,
but gotten nowhere.
Clue, please?
--
Beartooth Staffwright, Not Quite Clueless Power User
I have precious (very precious!) little idea where up is.
11 years, 9 months
qemu-kvm VNC connection VERY SLOW on F14
by KC8LDO
I've seen posts on the Internet about the virt-manager VNC viewer connection
being slow to the point of almost being useless on Fedora-14. I can work
around it by using tigervnc connecting to the local console, it's really
fast on an i7-870 when running within a remote desktop using Xrdp. Is there
any news of a fix in the works for this? Also I've had a couple of crashes
too of the VM. Not sure what I did exactly to cause this other than running
tignervnc at the same time the virt-manager viewer was connected to the same
VM.
Regards;
Leland C. Scott
"If you love wealth more than liberty, the tranquility of servitude better
than the
animating contest of freedom, depart from us in peace. We ask not your
counsel
nor your arms. Crouch down and lick the hand that feeds you. May your chains
rest
lightly upon you and may posterity forget that you were our countrymen."
Samuel Adams, (1722-1803)
11 years, 9 months