[libvirt-users] VNC ports
by Jeff
I am needing to explicitly assign VNC ports to my virtual guests so that I can connect to them externally via a VNC client, and not virt-viewer. Since I will have multiple KVM Hosts with access to the same shared storage (to facilitate migrations) I need to ensure I have unique VNC ports assigned to each guest so that I don't overlap somehow.
I had planned to use a range of ports starting at 51000 for this purpose. While it works to assign port 51001, for example, to a guest and connect via my VNC client, when I run 'virsh vncdisplay guestname' it gives me back a different number that is specified in the XML file:
#virsh vncdisplay win2k8guest
:45101
#virsh dumpxml win2k8guest |grep vnc
<graphics type='vnc' port='51001' autoport='no' />
Is there a logical reason for this that I'm not getting? I know when I have the port set to 5907, for example, it returns something expected:
#virsh vncdisplay win2k8guest
:7
But since I am likely going to need a good number of ports, I want to use a non-registered port range. Any insights?
13 years, 3 months
[libvirt-users] How do I disable auto-logout ....
by William A. Mahaffey III
.... I have a 64-bit CentOS 5.6 VM running on a 64-bit FC14 host. I
notice that it has an automatic logout feature after a period of
idleness, see below:
[wam@centos-5, CFD, 5:52:45pm] 1183 % ll -tr LIST LIST.Update
/usr/local/bin/P* /usr/local/bin/*WAM* ; ps -u wam -lf ; uname -a ; date
ls: No match.
F S UID PID PPID C PRI NI P SZ:RSS WCHAN STIME
TTY TIME CMD
5 S wam 2270 2266 0 15 0 * 22540:1788 ? 15:48 ?
00:00:04 sshd: wam@pts/0
0 S wam 2271 2270 0 15 0 * 3144:2720 rt_sig 15:48 pts/0
00:00:00 -tcsh
0 R wam 18249 2271 0 15 0 0 2621:896 - 17:52 pts/0
00:00:00 ps -u wam -lf
Linux centos-5.6-vm 2.6.18-238.el5 #1 SMP Thu Jan 13 15:51:15 EST 2011
x86_64 x86_64 x86_64 GNU/Linux
Fri Aug 12 17:52:50 CDT 2011
[wam@centos-5, CFD, 5:52:50pm] 1184 % auto-logout
Connection to 192.168.122.213 closed.
[wam@Q6600, ~, 6:52:51pm] 1014 %
[wam@Q6600, ~, 9:40:49pm] 1014 %
[wam@Q6600, ~, 9:40:49pm] 1014 % ssh2 -l wam 192.168.122.213
Last login: Fri Aug 12 15:48:11 2011 from 192.168.122.1
[wam@centos-5, ~, 9:40:54pm] 1135 %
I checked man pages on both host & VM, but came up blank. I have another
box running CentOS 5.6 native & it doesn't do this, so I suspect it is
something w/ the VM environment. How do I disable that :-) ? Thanks in
advance.
--
William A. Mahaffey III
----------------------------------------------------------------------
"The M1 Garand is without doubt the finest implement of war
ever devised by man."
-- Gen. George S. Patton Jr.
13 years, 3 months
[libvirt-users] Problems setting up a VM ....
by William A. Mahaffey III
.... New to this list & definitely new to virtualization :-/ .... I am
trying to setup a 64-bit CentOS 5.6 VM on a 64-bit FC14 server host, all
patched up as of a couple of weeks ago. uname -a on the host shows:
[wam@Q6600, CFD, 9:24:23am] 540 % uname -a
Linux Q6600 2.6.35.11-83.fc14.x86_64 #1 SMP Mon Feb 7 07:06:44 UTC 2011
x86_64 x86_64 x86_64 GNU/Linux
[wam@Q6600, CFD, 9:52:43am] 541 %
I access the server by ssh on my LAN. I was working on this last Sunday
& got stuck, see below. I posted this question to a couple of other
lists & had no takers, so here I am here. The server runs in runlevel 3
& has no gfx card onboard, so I am working from the command line. I had
a couple of abortive attempts at setup, which got as far as initializing
my disk storage for the VM, then the following:
[root@Q6600:/etc, Sun Aug 07, 05:08 PM] 1339 # virt-install -n
CentOS-5.6-64bitVM -r 2048 --arch=x86_64 --cpu core2duo,disable=vmx
--vcpus=1,maxvcpus=1,sockets=1,cores=2,threads=1 --os-type=linux
--os-variant=rhel5 --disk
path=/home/VMs/CentOS.5.6-64bit-VM/disk.img,size=50 --cdrom
/home/ISOs/CentOS-5.6/64bit/CentOS-5.6-x86_64-bin-DVD-1of2.iso
--autostart --prompt
This will overwrite the existing path
'/home/VMs/CentOS.5.6-64bit-VM/disk.img'
Do you really want to use this disk (yes or no)
yes
Starting install...
Creating
domain...
| 0 B 00:00
Gtk-Message: Failed to load module "pk-gtk-module": libpk-gtk-module.so:
cannot open shared object file: No such file or directory
Gtk-Message: Failed to load module "canberra-gtk-module":
libcanberra-gtk-module.so: cannot open shared object file: No such file
or directory
(virt-viewer:20165): Pango-WARNING **: failed to choose a font, expect
ugly output. engine-type='PangoRenderFc', script='latin'
Domain installation still in progress. You can reconnect to
the console to complete the installation process.
[root@Q6600:/etc, Sun Aug 07, 05:14 PM] 1339 # virsh --connect
qemu:///system
Welcome to virsh, the virtualization interactive terminal.
Type: 'help' for help with commands
'quit' to quit
virsh # list
Id Name State
----------------------------------
11 CentOS-5.6-64bitVM running
virsh # help
The install began OK, right after the 'Pango-WARNING' message, in a
separate window, quite readable, started booting & scrolling text past
*FAST*, for about 15 sec., then hung, right after a line about 'serial
port ....' (I couldn't click-&-drag to capture text from the VM window,
going from memory). I let it sit for about 5 min. to be sure it was
really hung, then clicked the VM window out, whereupon the message about
'installation still in progress' & the rest appeared. I poked around in
virsh a bit as you can see, but couldn't figure anything out. I tried
(re)connecting to the console of the VM & that hung, I had to kill the
virsh command from another window. I attach syslog output from the
proceedings. I am *sure* this is pilot error, but I am stuck for now.
Any assistance appreciated :-) ....
--
William A. Mahaffey III
----------------------------------------------------------------------
"The M1 Garand is without doubt the finest implement of war
ever devised by man."
-- Gen. George S. Patton Jr.
13 years, 3 months
[libvirt-users] virInitialize dumps core intermittently.
by Sharad Mishra
Hi,
I have a host with 6 VMs set to autostart. When this host reboots, it
starts libvirtd, pegasus cimom and libvirt-cim. It also restarts the VMs.
Intermittently we noticed a core during start up that points to the last
call made by libvirt-cim to "virInitialize". I am thinking that it is a
timing issue where virInitialize is called while libvirt is trying to
autostart the VMs.
Is this a known issue?
Thanks,
Sharad Mishra
13 years, 3 months
[libvirt-users] iscsi w/ libvirt
by Stefan G. Weichinger
"Playing" with a NAS capable of iscsi ... trying to make use of it
within the virtual machine manager.
Could someone point me at or provide me an example/screenshot of adding
iscsi to my KVM-host?
I think I still don't get it.
Should I add an iscsi-LUN as a storage-pool? Or as single disk to a VM?
Could someone pls point me at some docs to make me understand?
Thanks a lot, Stefan
13 years, 3 months
[libvirt-users] the naming convention libvirt names a block based storage volume
by Yih-Herng Chuang
Seems like different libvirt versions generate a storage volume name in
different format. We would like to learn how libvirt names a storage
volume under a block based storage pool. So that we may properly extract
the LUN identifier out of the volume name for now and in the future.
On host A loaded with libvirt 0.8.7
# virsh vol-list SanPool1
Name Path
-----------------------------------------
unit:0:0:11 /dev/disk/by-id/wwn-0x600a0b800013071a000035ec4e32b832
On host B loaded with libvirt 0.8.1
# virsh vol-list SanPool1
Name Path
-----------------------------------------
1.0.0.0 /dev/disk/by-id/wwn-0x60080e500017e1d40000d0b74d873b13
Regards,
--Yih
Yih-Herng Chuang
IBM Center for Microsoft Technologies
3600 Carillon Point, Kirkland WA 98033
(DID) (425) 803-7285
(TIE) 977-7285
YihHerng(a)us.ibm.com
13 years, 3 months
[libvirt-users] virt-manager - how to add /dev/mapper as a storage pool
by Marc Haber
Hi,
I would like to be able to configure VMs running off dm-crypt devices
that were unlocked in the host. Unlocked dm-crypt devices show up in
/dev/mapper/devicename, with devicename being the second parameter
given to cryptsetup luksOpen.
The LVM storage pool type insists on searching in /dev/vgname and
cannot be tricked into reading /dev/mapper by giving it a fake VG
named mapper; the LVM storage pool type "dir" mishandles
/dev/mapper/control ("illegal seek").
Is there a workaround to be able to use such devices in virt-manager
without having to define a single storage pool for every device used?
Greetings
Marc
--
-----------------------------------------------------------------------------
Marc Haber | "I don't trust Computers. They | Mailadresse im Header
Mannheim, Germany | lose things." Winona Ryder | Fon: *49 621 72739834
Nordisch by Nature | How to make an American Quilt | Fax: *49 3221 2323190
13 years, 3 months
[libvirt-users] XML file location
by Jeff
Can anyone tell me how to change the default directory which stores the guest XML files? I want to keep them with the guest image files on a shared NFS filesystem.
Thanks,
Jeff
13 years, 3 months
[libvirt-users] Create volume wit libvirt API for Python
by Anatoliy Guskov
Please help! How create volume with libvirt API for python?
conn = libvirt.open(qemu:///system)
vol = libvirt.virStoragePool(conn)
conf_file = 'disk.xml'
f = open(conf_file)
xml = f.read()
pool = "default"
vol.createXML(pool,xml)
xml file disk.xml:
<volume>
<name>name.img</name>
<key>/var/lib/libvirt/images/name.img</key>
<source>
</source>
<capacity>21474836480</capacity>
<allocation>21474840576</allocation>
<target>
<path>/var/lib/libvirt/images/name.img</path>
<format type='raw'/>
</target>
</volume>
This script not work :-(
Thanks for help!
13 years, 3 months