[libvirt-users] virtual machine seems to run, but can't connect to it
by Douglas Russell
I'm using ubuntu 12.04LTS
I setup a bridged network:
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
auto eth0
iface eth0 inet dhcp
auto br0
iface br0 inet dhcp
bridge_ports eth0
bridge_stp off
bridge_fd 0
bridge_maxwait 0
Seems to work.
Then I created a virtual machine using Ubuntu's vmbuilder tool like so:
vmbuilder kvm ubuntu \
--suite 'precise' \
--flavour 'virtual' \
--arch 'amd64' \
--dest 'myvm' \
--hostname 'myvm' \
--mem '2048' \
--rootsize '4096' \
--swapsize '1024' \
--mirror 'http://archive.ubuntu.com/ubuntu' \
--name 'MyName' \
--user 'myuser' \
--pass 'password' \
--bridge 'br0' \
--addpkg acpid \
--addpkg vim \
--addpkg openssh-server \
--addpkg avahi-daemon \
--libvirt 'qemu:///system' \
--ip '192.168.0.100'
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.
Any ideas? I'd be happy to provide further information.
Thanks.
12 years
[libvirt-users] Health check
by Ali Nikzad
Hi,
I want to write an application that Health checks a virtual machine to see
whether the VM is up and running or not. I am using ESXi as my hypervisor.
Are there any libvirt API functions that I can use for this purpose?
Regards,
Ali
12 years
Re: [libvirt-users] Re-sizing qcow2 images
by Rajesh Kumar Mallah
----- "Chandana De Silva" <chandana(a)desilva.id.au> wrote:
| From: "Chandana De Silva" <chandana(a)desilva.id.au>
| To: "Rajesh Kumar Mallah" <mallah(a)tradeindia.com>
| Cc: libvirt-users(a)redhat.com
| Sent: Sunday, October 28, 2012 3:35:05 PM
| Subject: Re: [libvirt-users] Re-sizing qcow2 images
|
| Hello Rajesh,
|
| Thanks for the the suggestions.
|
|
| On 28/10/12 17:43, Rajesh Kumar Mallah wrote:
| > If you have a spare guest you may consider temporarily attaching the
| said cow2 image to that guest
| Do you mean detach from guest A and attach to guest B ?
Yes.
| > and use the partition tools (like parted , fdisk,cfdisk etc)
| > and filesystem tools (like xfs_grow , resize2fs etc) to grow the
| filesystem.
| Assuming it will be possible to detach and attach, I still have the
| problem of parted giving the incompatible feature error. These disk
| have GPT partitions so I can use fdisk
I am not sure about the "incompatible feature error" . May be you could try
fdisk or cfdisk. It is usually a good idea to "free" the device before
doing partition resizes. We had done it (resizing cow2) once and it was
successful , we had to although convert from cow2 to raw , append a new
dd'ed file and user fdisk over the raw image. eventually it worked.
what is the size of your cow2 device if its not huge you may consider backing it
up and restore to a larger device.
hope it helps.
mallah.
12 years
Re: [libvirt-users] Re-sizing qcow2 images
by Rajesh Kumar Mallah
Hi,
If you have a spare guest you may consider temporarily attaching the said
cow2 image to that guest and use the partition tools (like parted , fdisk,cfdisk etc)
and filesystem tools (like xfs_grow , resize2fs etc) to grow the filesystem.
use partprobe to reread the partition table into the kernel once partition editing
tools are used.
re-read of mounted root partions mostly do not work for me. hence i suggested using
a separte vm for the image.
Regards,
Rajesh Kumar Mallah
Tel. 91-11-46710500 (Ext:303)
Cell +919811255597
Website: http://www.tradeindia.com/
\|/ \|/ \|/ stop printing \|/ \|/ \|/
| | | start planting | | |
----- "Chandana De Silva" <chandana(a)desilva.id.au> wrote:
| From: "Chandana De Silva" <chandana(a)desilva.id.au>
| To: libvirt-users(a)redhat.com
| Sent: Sunday, October 28, 2012 8:13:50 AM
| Subject: [libvirt-users] Re-sizing qcow2 images
|
| 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
|
|
| _______________________________________________
| libvirt-users mailing list
| libvirt-users(a)redhat.com
| https://www.redhat.com/mailman/listinfo/libvirt-users
12 years
[libvirt-users] hypervisor driver not found
by p.venkatasrinivas@tcs.com
Hi,
I installed Virtual box software in linux open suse. Unable to connect to
the
vbox hypervisor driver.
Version-Release number of selected component (if applicable):
libvirt-0.9.0
How reproducible:
when i am giving the following command for virsh:
virsh -connect vbox:///session then the following error is coming.
error: no hypervisor driver available for vbox:///session
error: failed to connect to the hypervisor
Even I installed virtualbox the above error is coming. I am not able to
find vbox hypervisor driver. Can anyone suggest where can i find vbox
dirver.
Awaiting Response
Thanks and Regards,
Srinivas.
=====-----=====-----=====
Notice: The information contained in this e-mail
message and/or attachments to it may contain
confidential or privileged information. If you are
not the intended recipient, any dissemination, use,
review, distribution, printing or copying of the
information contained in this e-mail message
and/or attachments to it are strictly prohibited. If
you have received this communication in error,
please notify us by reply e-mail or telephone and
immediately and permanently delete the message
and any attachments. Thank you
12 years
[libvirt-users] virsh responds slowly
by Chun-Hung Chen
Dear all,
I have observed the virsh responds slowly with "virsh list" and used
"strace virsh list" will find that it is waiting on the socket. I also use
"netstat |grep libvirt" and see an opened socket /var/run/libvirt-sock-ro
is always on and will not disappear. Is it caused by an abnormal
termination of virsh API? Otherwise, if there is any possible issue? I have
checked the cpu utilization, it is low and no waiting io.
Regards,
Chun-Hung
12 years, 1 month
[libvirt-users] KVM raw on DRDB on LVM logical volume?
by Whit Blauvelt
Hi,
I'm trying to get KVM VMs set up right on top of DRBD, with a dedicated DRBD
mirror instance on top of a dedicated pair of LVM LVs per VM - allowing, for
instance, primary-secondary DRBD assignments at the same granularity as the
VMs. In other words, I want to put VMs in raw format directly to the DRBD
block device, just as they are commonly put to an LV block device, with the
DRBD block device stacked on the LV block device.
DRBD is happy to stack on an LV (just as libvirt-KVM-QEMU is happy to). But
when I take an existing KVM LV, set up DRBD for it (DRBD can typically be
placed on a partition with an existing file system, which it inherits), and
then use "virsh edit" to replace the source dev, like so:
<disk type='block' device='disk'>
<driver name='qemu' type='raw'/>
<source dev='/dev/VolumeGroup/SomeVolume'/>
<target dev='hda' bus='ide'/>
<address type='drive' controller='0' bus='0' unit='0'/>
</disk>
changing the center line to
<source dev='/dev/drbd/by-res/SomeDom'/>
(or /dev/drbdN - to which that's a symlink), then I get
# virsh start sql
error: Failed to start domain SomeDom
error: unable to open disk path /dev/drbd/by-res/SomeDom: Wrong medium type
If this were a normal file system, setting up DRBD with it, then remounting
it through the DRBD device would work. But libvirt doesn't want to "mount"
it. This is with virsh 0.9.12. I don't know what constitutes "Wrong medium
type" here. I had thought it the general case that raw files for KVM can be
written to block devices generally, which is what a DRBD device is, just as
much as an LV device is.
Is this then a case where I have to change something else in the XML? Or a
case where it would work except that libvirt doesn't recognize that this is
a media type that will work, yet is is, so that the answer would be to alter
libvirt's source and recompile? Or would getting this scheme to work require
the trouble of stacking things like
VM
LV
VG
PV
DRBD
LV
VG
PV
DISK
instead of simply like
VM
DRBD
LV
VG
PV
DISK
Since there's a strict 1 VM-1 DRBD-1 LV correspondence, I'm hoping those
extra layers won't be necessary to get DRBD into the stack.
Thanks,
Whit
12 years, 1 month
[libvirt-users] Please help: Libvirt event for disk change is not being registered by DomainEventRegisterAny()
by Abhishek Srivastava
Hi,
I am writing an application which would monitor the changes on the domain
on the KVM hypervisor through libvirt events.
Recently I have upgraded my libvirt from 9.4 to 9.10 and I have this issue.
While *de-registering* for DomainEventDiskChangeCallback, I get a libvirt
error saying
'libvirtError: internal error domain event 2 not registered;'
where 2 is the callbackid returned by virConnectDomainEventRegisterAny()
for the disk change event type.
This error didn’t occur when I used libvirt 0.9.4-23.el6_2.6
Can you please enlighten me on the recent changes that has been made?
Also, is the diskchange event a part of the domains life cycle event?
Any help on this issue will be highly appreciated.
Thanks and regards,
Abhishek
12 years, 1 month
[libvirt-users] Disk-only internal snapshot
by Davide Guerri
Hi all,
it's possible to do an internal snapshot with the --disk-only option (for
qcow2 images)?
The following command
virsh snapshot-create-as my-dom my-snap my-description
creates an internal snapshot but the following
virsh snapshot-create-as my-dom my-snap my-description --disk-only
creates an external snapshot.
Thanks,
Davide.
12 years, 1 month
[libvirt-users] cannot start domain with SR-IOV interface
by Radhika Niranjan
Hi,
I've been using libvirt (versions 0.9.11.5, and recently upgraded to
0.10.2), and have been attaching an SR-IOV VF to my VM with the following
device configuration:
<hostdev mode='subsystem' type='pci' managed='yes'>
<source>
<address domain='0x0000' bus='0x07' slot='0x10' function='0x0'/>
</source>
<address type='pci' domain='0x0000' bus='0x00' slot='0x05'
function='0x0'/>
</hostdev>
I had no problems with bringing up the VM and using the VF with this
configuration.
Recently I noticed that I would be able to assign a mac address to the
SR-IOV VF if I used the interface configuration and changed over to using:
<interface type='hostdev'>
<mac address='52:54:00:d3:23:4f'/>
<source>
<address type='pci' domain='0x0000' bus='0x07' slot='0x10'
function='0x0'/>
</source>
<model type='virtio'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x03'
function='0x0'/>
</interface>
My VM fails to start up with this interface configuration. The error
reported is:
error: Failed to start domain exp85-1
error: An error occurred, but the cause is unknown
When I look into /var/log/messages I see the following messages:
Oct 15 15:25:48 dcswitch85 libvirtd[17709]: 2012-10-15 22:25:48.145+0000:
17713: error : virFileReadAll:457 : Failed to open file
'/var/run/libvirt/qemu/p1p1_vf0': No such file or directory
Oct 15 15:25:48 dcswitch85 libvirtd[17709]: 2012-10-15 22:25:48.146+0000:
17713: error : qemuRemoveCgroup:740 : internal error Unable to find cgroup
for exp85-1
Oct 15 15:25:48 dcswitch85 libvirtd[17709]: 2012-10-15 22:25:48.146+0000:
17713: warning : qemuProcessStop:4136 : Failed to remove cgroup for exp85-1
I was wondering if anyone else has faced this problem or has a solution to
this.
I'm using Fedora17, KVM, and an 82599EB Intel NIC.
Thanks much in advance.
With best regards
Radhika
12 years, 1 month