[libvirt-users] overriding shutdown for LXC
by erkan yanar
Moin Im using lxc@libvirt for LXC-applicationcontainer.
Works quite nice for now, beside shutting down the container,
which is not implemented. Hooks don't help here, as far as I found out.
Is there a way to override/define the shutdown function?
Regards
Erkan
--
über den grenzen muß die freiheit wohl wolkenlos sein
11 years, 11 months
Re: [libvirt-users] libvirt-users Digest, Vol 34, Issue 35
by Chandana De Silva
You _can_ do NAT.
Set up a different libvirt network on each machine, like this;
10.128.80.65 will have a libvirt network 192.168.65.0/24
10.128.80.66 will have a libvirt network 192.168.66.0/24
Set up each of these networks as routed networks.
Now set up routing/iptables rules on each host to send traffic to each
other, and NAT into the internal routed network
On 31/10/12 01:46, libvirt-users-request(a)redhat.com wrote:
> Message: 1
> Date: Tue, 30 Oct 2012 07:10:55 +0000
> From: ??<zhang_zhang(a)live.com>
> To:<libvirt-users(a)redhat.com>
> Subject: [libvirt-users] Can VMs on different machines communicate
> with each other without IP?
> Message-ID:<BLU172-W4666B32A6C9C8E75734C67FC620(a)phx.gbl>
> Content-Type: text/plain; charset="gb2312"
>
>
> Dear all,
> I confront a somehow strange situation:
> I have two machines configured with ip 10.128.80.65 and 10.128.80.66 respectively. Each has several VMs running on it. The problem is that I have no more ip ( such as 10.128.80.67...) to allocate to VMs, but VMs need to communicate with each other even when they are on different machines.
> Two network options exist: NAT and bridge.
> 1) NAT
> But VMs on different machine cannot communicate with each other.
> 2)bridge
> But there is no more ip for vm to be bridged to host machine.
> Is there any other way to work around this problem?
>
>
> many thanks!
11 years, 11 months
[libvirt-users] error: Cannot open network interface control socket
by 何鑫
Hi all, I try to use gdb to debug libvirt's source code, but when I tend to create a domain with xml, it shows "error: internal error Network 'default' is not active", so I use the net-related commands as below."virsh # net-start defaulterror: Failed to start network defaulterror: Cannot open network interface control socket: Operation not permitted"
Then I check my URI, which is "qemu:///session", because adding "sudo virsh". I try to change URI to "qemu:///system" by clicking "virsh # connect qemu:///system". The following logs shown below:virsh # connect qemu:///systemerror: Failed to connect to the hypervisorerror: Failed to connect socket to '/usr/local/libvirt/var/run/libvirt/libvirt-sock': No such file or directory
Could you please tell me the reason?
Thanks a lot!
Corey
11 years, 11 months
[libvirt-users] Failed to connect socket to '/usr/local/libvirt/var/run/libvirt/libvirt-sock':
by 何鑫
Hi all, When I tend to use "virsh # connect qemu:///system", the debug info shown below:Failed to connect socket to '/usr/local/libvirt/var/run/libvirt/libvirt-sock': No such file or directory
I use libvirt-bin's file "libvirt-sock" linking to the directory(usr/local/libvirt/var/run/libvirt) where virsh needs to search it, then the problem solved. But I need to debug libvirt with gdb tracing libvirt's source code, to avoid the effects of libvirt-bin, I should remove libvirt-bin. As a result, the symbolic of libvirt-sock is missed. Also I can't copy "libvirt-sock", because "cp: cannot open `/var/run/libvirt/libvirt-sock' for reading: No such device or address". So could you please give me some advise to add the file "libvirt-sock" after the source installation in ubuntu? Thanks a lot!
Corey
11 years, 11 months
Re: [libvirt-users] virtual machine seems to run, but can't connect to it
by Douglas Russell
Thanks,
I just figured it out. It turns out that my institution issues 192.
addresses to MAC addresses it doesn't recognize. I had not realized this so
assumed that the IP address was coming from the VM setup somehow. Onto the
next problem now! But I'll post separately about that.
Thanks for the help
On 30 October 2012 04:11, Rudy Godoy <rudy(a)stone-head.org> wrote:
> On Mon, Oct 29, 2012 at 10:53:29AM +0000, Douglas Russell wrote:
> > I'm using ubuntu 12.04LTS
> >
> > I setup a bridged network:
> >
>
> <snip>
>
> >
> > It generates fine and starts up seemingly without a problem as well when
> I
> > run
> >
> > virsh start myvm
> >
> > I am then able to resolve it's IP with MDNS and try
> >
> > ping myvm.local
> >
> > So presumably the VM is running? But for some reason I can't communicate
> > with it, I can't SSH in, I don't even get a response to my ping.
> >
>
> What does displays:
> # virsh dominfo myvm
>
> Can you connect to the console?
>
> # virsh console myvm
>
> regards
>
>
> --
> Rudy Godoy
> http://stone-head.org
>
11 years, 11 months
[libvirt-users] Re-sizing qcow2 images
by Chandana De Silva
Hello All,
I am using Centos 6.3 with libvirt 0.910 and qemu-kvm 0.12
I had to resize a qcow2 disk, and came across several issues;
I used this command to resize the image:
sudo -i /usr/bin/qemu-img /var/lib/libvirt/images/mydisk.img resize
+100G . The disk is attached using virtio.
I then tried to use parted from within the guest to resize the partition.
The first problem was that the guest os did not see the increase disk size.
Is there something that I need to do, to force the guest to see the
higher disk size ?
I got round this by re-starting the guest, but it would be better if
there is some way to force the guest to see the new size.
The second problem was that parted gave an error : Error: Filesystem has
an incompatible feature enable.
Some reading showed that this was caused by the "resize_inode" feature
on the file system. I removed this feature using debugfs, and rans fsck,
but parted still gave the same error: Error: Filesystem has an
incompatible feature enable.
I would like some advice on how this is supposed to be done.
Thanks in advance.
Chandana
11 years, 11 months
[libvirt-users] Re-sizing qcow2 images
by Chandana De Silva
Hello Hristo,
Thanks for your comments. I was really looking for an on-line resizing
tool. Eric Blake's later response seem to cover this.
Regards
Chandana
On 30/10/12 03:00,
Hristo Deshev<hristo(a)deshev.com>
> For my resizes I use libguestfs's virt-resize [1] tool. It's been
> working flawlessly so far -- it resizes both the image file/device and
> partitions inside that image. I can't recommend it enough.
>
> Best,
> Hristo
11 years, 11 months
[libvirt-users] virt-manager fails to connect to dbus
by sean darcy
On Fedora 17 updated:
virt-manager-0.9.4-2.fc17.noarch
libvirt-0.10.2.1-1.fc17.x86_64
after a reboot, virt-manager no longer starts. Used to!
virt-manager &
[1] 1676
[root@sixcore ~]#
(virt-manager:1676): GConf-WARNING **: Client failed to connect to the
D-BUS daemon:
Failed to connect to socket /tmp/dbus-0v4E2bXlqf: Connection refused
Traceback (most recent call last):
File "/usr/share/virt-manager/virt-manager.py", line 386, in <module>
main()
File "/usr/share/virt-manager/virt-manager.py", line 321, in main
config = virtManager.config.vmmConfig(appname, appversion, ui_dir)
File "/usr/share/virt-manager/virtManager/config.py", line 98, in
__init__
self.conf.add_dir(self.conf_dir, gconf.CLIENT_PRELOAD_NONE)
GError: No D-BUS daemon running
[root@sixcore ~]# systemctl status dbus.service
dbus.service - D-Bus System Message Bus
Loaded: loaded (/usr/lib/systemd/system/dbus.service; enabled)
Active: active (running) since Mon, 29 Oct 2012 16:53:41 -0400; 2s ago
Process: 1669 ExecStartPre=/bin/rm -f /var/run/messagebus.pid
(code=exited, status=0/SUCCESS)
Process: 1666 ExecStartPre=/bin/dbus-uuidgen --ensure (code=exited,
status=0/SUCCESS)
Main PID: 1672 (dbus-daemon)
CGroup: name=systemd:/system/dbus.service
└ 1672 /bin/dbus-daemon --system --address=systemd: --nofork
--systemd-activation
Any help appreciated,
sean
11 years, 11 months
[libvirt-users] libvirt and thin provisionned LVM
by Daniel Berteaud
Hi there.
I'm trying to use thin provisionned LVM for som eguests, and I'm having a problem.
Until now, I use LVM pool with success. Here's my pool definition:
<pool type='logical'>
<name>data</name>
<uuid>7f18e030-9d2d-805e-c65f-d12d0681b0a9</uuid>
<capacity unit='bytes'>0</capacity>
<allocation unit='bytes'>0</allocation>
<available unit='bytes'>0</available>
<source>
<name>data</name>
<format type='lvm2'/>
</source>
<target>
<path>/dev/data</path>
<permissions>
<mode>0700</mode>
<owner>-1</owner>
<group>-1</group>
</permissions>
</target>
</pool>
Everything is working, until I create a thin privisionned pool like this:
lvcreate --thin data/pool -L 50G
Now, as soon as this is created, I cannot refresh my pool from libvirt POV:
LANG=C_ALL virsh pool-refresh data
error: Failed to start pool sys
error: erreur interne Child process (/sbin/vgchange -aln vg_gerard) status unexpected: exit status 5
If I remove this LV, everything is working again.
I'm using libvirt 0.9.10, the default one in CentOS 6.3 (x86_64).
Has anybody managed to get it working ?
Is this something fixed in more recent release ?
Regards, Daniel
--
Daniel Berteaud
FIREWALL-SERVICES SARL.
Société de Services en Logiciels Libres
Technopôle Montesquieu
33650 MARTILLAC
Tel : 05 56 64 15 32
Fax : 05 56 64 15 32
Web : http://www.firewall-services.com
11 years, 11 months