[libvirt-users] small webGUI?
by Stefan G. Weichinger
Greetings,
at a customer we run a single VM for a specific application.
Unfortunately this VM does not start automatically with the host
although I checked the relevant box within virtual machine manager.
I assume upgrading libvirt might help (we run 0.8.7-r1 right now, gentoo
linux).
Aside from that it would be good to have a simple WebGUI for the users
to let them press START just in case. They run Windows on their machines
so I can't give them VMM ...
Could you point me at the most simple GUI to do that?
I'd prefer something very lightweight without too much requirements (for
example I'd like to avoid installing mysql for that ;-) ).
Thank you, Stefan
13 years, 3 months
[libvirt-users] with current libvirt git virsh expects vbox, refuses kvm define
by Whit Blauvelt
Okay, just installed libvirt from today's git on two Ubuntu systems. The
first one went fine (except for continuation of the problem that virsh and
virt-manager cannot connect to 0.8.3 systems that's been there in the 0.9.x
libvirts) ... but on the second, after install, "virsh list --all" presents
nothing. And:
# virsh define tu1004.xml
error: Failed to define domain from tu1004.xml
error: internal error unexpected domain type kvm, expecting vbox
These are _exactly_ the same xml files as are still working on the first
system. And in both cases the new libvirt was built with defaults. Long ago
the second system did have VirtualBox on it, so that may have been found
while it was setting up config, but that's no good reason for KVM to fail
here, right?
Must be a thing with the git. Ran the 0.9.3 release built on this system
previously without this problem.
Whit
13 years, 3 months
Re: [libvirt-users] VirtualBox headless
by Guilherme Santos
My objective is also to run headless virtual machines through libvirt
library.
I am using an Ubuntu 10.04 distro and libvirt 0.9.2.
Before asking you guys about it, I searched on the web and found this:
Hi,
>
> thanks for your hint.
>
> I read the lines in the documentation, but unfortunately editing the xml
>
> within virsh lead to the errors.
>
> The Solution to a headless domain was to edit the XML file from bash and
> then
>
> #virsh: define <domainname.xml>
>
> to reload the new values for the graphics type of the machine.
>
> Obvioulsy something went wrong when editing "live"....
>
> Regards,
> Christian
>
> Am 24.06.2010 18:27, schrieb Jean-Baptiste Rouault:
> > Hi,
> >
> > Something like this should work, as can be seen in the
>
> > documentation here : http://libvirt.org/formatdomain.html#elementsGraphics
> >
> > <drivers>
> > <graphics type='rdp' autoport='yes' />
>
> > </drivers>
> >
> > Regards,
> >
> > Jean-Baptiste
> >
> >
> >> Hello,
> >>
> >> I'm trying to use the VirtualBox/vbox driver together with libvirt 0.8.1
> >> on a Ubuntu Lucid Machine, VirtualBox Release 3.1.
>
> >>
> >> The goal is to run the virtual machines headless and to connect using RDP.
> >>
> >> When starting a virtual domain using 'virsh start <domainname>' the GUI
> >> of VirtualBox will pop up and I see no option to prevent this. If X is
>
> >> not running, the virsh command will terminate with 'unknown failure'.
> >>
> >> I've found some hints on inclusion of the headless statement in the
> >> 'graphics' part of the XML definition file, but when I tree to adopt
>
> >> this, the editing of the file will crash.
> >>
> >> Has anyone achieved to manage VBox machines with libvirt on a headless
> >> server ?
> >>
> >> Thanks in advance for some hints or experiences with this issue,
>
> >> Christian
> >>
>
>
Unfortunately this isn't working for me.
Following is my XML configuration:
<domain type='vbox'>
<name>THEDOMAIN</name>
<uuid>33f6e188-1479-46f4-9d90-4d5a2d3a30f2</uuid>
<memory>393216</memory>
<currentMemory>393216</currentMemory>
<vcpu>1</vcpu>
<os>
<type arch='i686'>hvm</type>
<boot dev='hd'/>
<boot dev='cdrom'/>
</os>
<features>
<acpi/>
</features>
<clock offset='localtime'/>
<on_poweroff>destroy</on_poweroff>
<on_reboot>destroy</on_reboot>
<on_crash>destroy</on_crash>
<devices>
<disk type='file' device='disk'>
<source file='/local/vbox-shared.vdi' />
<target dev='hda' bus='ide'/>
</disk>
<disk type='file' device='cdrom'>
<source file='/local/ubuntu-11.04-desktop-i386.iso' />
<target dev='hdc' bus='ide'/>
</disk>
<interface type='user'>
<mac address='08:00:27:9a:d0:63'/>
<model type='Am79C973'/>
</interface>
<input type='mouse' bus='ps2'/>
<graphics type='rdp' autoport='yes' />
<video>
<model type='vbox' vram='12' heads='1'>
<acceleration accel3d='no' accel2d='no'/>
</model>
</video>
</devices>
</domain>
When I run command
*virsh start THEDOMAIN*
it is popping up the following error message:
*OpenRemoteSession/LaunchVMProcess failed, domain can't be started*
As it wasn't working I also tried other options, but unfortunately, using
all other graphic type options (except for 'spice', which I didn't try) the
GUI is launched.
I don't think I'll be needing a RDP connection, neither anything similar to
that, except if these are necessary to basic management of the vm through
virsh (start, stop, reboot, create and revert snapshots).
Isn't there one simple way to run a virtual machine domain headless without
vnc, spice or rdp servers?
If not, which could be going wrong in my xml configuration?
To help understanding of my desired behavior, what I need is to do through
virsh what can be done using
*VBoxManage startvm THEDOMAIN --headless*
or
*VBoxHeadless startvm THEDOMAIN*,
because will use other hypervisors in the future, so it is a critical thing
to me.
Thanks in advance for the help,
Guilherme Santos
13 years, 3 months
[libvirt-users] Wanted: method for qemu hook script to know if called for migration
by Whit Blauvelt
Hi,
"Before a QEMU guest is started, the qemu hook script is called"
(http://libvirt.org/hooks.html)...
In writing a simple bash script to prevent a VM on shared storage from being
started on one host if it's already running on another, it's easy enough to
check if virsh on the other host reports the particular VM as "shut off"
there, and go ahead if that's the case. What's I'm having trouble coming up
with is a simple method to allow a migration from the second system over to
the first with that script in place.
As the doc says, /etc/libvirt/hooks/qemu is "Executed when a QEMU guest is
started, stopped, or migrated," so when it's simply being started, it makes
sense to be sure it's not already running on the second system, and prevent
the start if it's not. Works fine for me. But when a migration is requested,
the script is called in the same way as when it's being started. What I need
is a way, from within the script, to tell whether it's a migration context,
so that then the start will be allowed, despite the VM's already being
running on the second system.
Any ideas how to do that? Unfortunately what's passed to the script directly
is just "[vmname] start begin -" in both cases. And I don't see that a
separate migrate process shows up in the process tables until after getting
beyond the qemu hook script.
As a feature suggestion, it would be nice if that fourth input variable,
currently "-", was something like "migrate" in this instance.
Thanks,
Whit
13 years, 3 months
[libvirt-users] python-libvirt for 0.9.3 leaking file descriptors
by Igor Serebryany
i've reported this issue before, so i guess this is a regression. looks
like the python bindings for 0.9.3 are leaking file descriptors:
root@cloud1:~# python
Python 2.6.6 (r266:84292, Dec 26 2010, 22:31:48)
[GCC 4.4.5] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import libvirt
>>> libvirt.getVersion()
9003
>>> def openclose():
... c = libvirt.open('qemu:///system')
... c.close()
...
>>> import os
>>> os.system('lsof -p %d | wc -l' % os.getpid())
37
>>> openclose()
>>> os.system('lsof -p %d | wc -l' % os.getpid())
40
>>> openclose()
>>> os.system('lsof -p %d | wc -l' % os.getpid())
43
every time I open and close a connection to libvirt, i loose 3 file
descriptors. these are a socket and two fifo pipes. i'm using the -3
build on debian sid.
can someone test this on a fedora machine? curious if this is something
inside libvirt or a problem with the build...
thanks,
--igor
13 years, 3 months
[libvirt-users] insert ISO into a KVM guest
by Jeff
There's got to be a simple way to attach an ISO to a KVM guest. I just haven't yet discovered it.
I've tried adding the following stanza to my guest XML file, under the <devices> stanza and starting the guest:
<disk type='file' device='cdrom'>
<driver name='qemu' type='raw' />
<source file='/etc/libvirt/qemu/isos/kvm1.iso' />
<target dev='hda' bus='ide' />
<readonly />
</disk>
But I get the following:
error: Failed to start domain rhel6guest
error: internal error process exited while connecting to monitor: char device redirected to /dev/pts/3
qemu: could not open disk image /etc/libvirt/qemu/isos/kvm1.iso: Permission denied
A perms issue should be easy to address one would think, but I've tried every possible combination of perms changes including 777. Changed ownership from root to qemu:qemu (though I'm running as root). I'm not running SELinux.
Anyone have any insights on how to mount a simple ISO into a KVM guest? Both at build time AND while the guest is running?
Thanks
Jeff
13 years, 3 months
[libvirt-users] Ping not working after a migration
by Adnan Pasic
Hello guys,
maybe you can help me with following issue. I have
created a little cloud with a host and two worker nodes using opennebula. The setup went
successfully until now, I am able to create VM's and move them via
normal and live migration.
Another (possibly) important information is that I configured my virtual bridge on both worker nodes like this:
auto br0 iface br0 inet static address 192.168.0.[2|3] netmask 255.255.255.0 network 192.168.0.0 broadcast 192.168.0.255 #gateway 192.168.0.1 bridge_ports eth0 bridge_stp on bridge_maxwait 0
The command "brctl show" gives me following things back:
bridge name bridge id STP enabled interfaces
br0 8000.003005c34278 yes eth0
vnet0 (<- only appears on node with running VM)
virbr0 8000.000000000000 yes
According to thelibvirt wiki this setting is good as is. However, the issue I'm having is that when I create a VM and assign a static IP to it, which looks like e.g. 192.168.0.5,
I firstly am able to ping this VM from both worker nodes, and also when I perform a live migration the ping stops for a few seconds (until the nodes realize the new route to this VM) and then
starts pinging normally again.
However, when I perform a normal migration the ping doesn't recover anymore, but answers repeatedly with: Destination Host Unreachable
Do you know what could be the problem? Where is the difference between a normal and live migration and how can the ping after live migrating still work, but after a normal migration not?
Thanks a lot!
Regards, Adnan
13 years, 3 months
[libvirt-users] Split a qcow2-image?
by Stefan G. Weichinger
Hello,
I converted a W2003-Server to a vmdk-image, I didn't think too much back
then ...
Now I have 2 windows-drives C: and E: inside one vmdk-image-file, which
was converted to qcow2.
I have installed drivers and stuff into that VM already and would like
to avoid to start over again with the vmdk-file ->
Is there a way to split that one qcow2 into 2 separate files, one for
each windows-harddisk?
or plan B: can I possibly enlarge the part of C: inside that qcow2?
I use qemu-kvm on gentoo linux, and libvirt-0.9.3-r1.
I would appreciate any help on this topic!
Thanks Stefan
13 years, 3 months
[libvirt-users] VM creation using libvirtd for the qemu-KVM hypervisor
by bala suru
Hi,
I have some basic doubt at the VM creation using libvirtd for the qemu-KVM
hypervisor .
I need to create a VM which can read the data uart/file and store/send to
other VM .. How to create this kind of VM and how to write the data in/out
of the VM ..
I need suggestion to do this .
regards
Bala
13 years, 3 months