convert vmware image
convert vmware image
Will nagios enterprises offer support for nagiosxi converted to run on redhat virt (kvm, rhev) or ms hyper-v?
Regards,
Marius
Regards,
Marius
Re: convert vmware image
Hi Marius -
This is a possibility, but its not likely from the start. We'll listen to what people want for virtual machines and make additional options available based on that need.
This is a possibility, but its not likely from the start. We'll listen to what people want for virtual machines and make additional options available based on that need.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Re: convert vmware image
Hi,
I've managed to easily convert from vmdk to kvm (qcow2) and import into RHEV. Everything works flawlessly. Would such a configuration void the support contract?
Regards,
Marius
I've managed to easily convert from vmdk to kvm (qcow2) and import into RHEV. Everything works flawlessly. Would such a configuration void the support contract?
Regards,
Marius
Re: convert vmware image
Hi Marius -
We'll still provide support for this, as the main issue with support is the OS and installed packages. Do you have a howto for the steps you took to convert the image? We'd like to make a formal howto for other users and customers (giving you the credit of course). We could also use this internally for testing and officially supporting such an image in the future.
Thanks and Happy Holidays!
We'll still provide support for this, as the main issue with support is the OS and installed packages. Do you have a howto for the steps you took to convert the image? We'd like to make a formal howto for other users and customers (giving you the credit of course). We could also use this internally for testing and officially supporting such an image in the future.
Thanks and Happy Holidays!
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Re: convert vmware image
Hi Ethan,
Ill provide what steps we took to convert right after the holiday period.
Happy Holidays to you and the Nagios team as well!
Ill provide what steps we took to convert right after the holiday period.
Happy Holidays to you and the Nagios team as well!
Re: convert vmware image
Hi,
For those using Red Hat Enterprise Virtualization here is what I hope to be an understandable procedure for migrating your vms. The idea is to create a new vm in RHEV with a preallocated hard disk the same size or larger than the one to be imported. From here we just need to identify where the vm's disk are located in the rhev datacenter hierarchy and copy over our converted vm.
First you must convert your nagiosXI image to qcow2 in order for RHEV to import it. This is accomplished by issuing the following command:
On the RHEV manager
1. Create a new virtual machine from the RHEV manager interface.
1.a. Select RHEL 5.x as the operating system.
2. Configure network interfaces and hard disks
Note: The RHEV Guide Me wizard will pop-up after creating the vm.
2.a. Select Configure Network Interfaces and select the network and type. When selecting the netowrk type (drivers) you can use any of the provided drivers including RedHat VirtIO (recommended) as they are included in NagiosxI.
2.b. Select Configure Virtual Disks and make sure you configure your new disk to be exactly the same size or larger than the size of the NagiosXI virtual disk. In our test environment we created a 20 GB disk. Make sure that you keep the type (driver) to IDE and select preallocated disk!
Note: The hard disk must be at least the same size as the one to be imported and preallocates.
3. Identify your newly created vm and associated disk(s) in RHEVM datacenter.
NOTE: I am assuming you only have one DataCenter. If you have more than one you need to identify the ID of the datacenter that you wish to migrate into.
3.a. Using the RHEV Manager Scripting Library display your vm's id:
3.b. Using the RHEV Manager Scripting Library display your vm's disk id(s):
From the above command note the SnapshotID
The following is to be executed on one of your RHEV hosts (physical servers).
3.c. Navigate to your vm's directory on one of your RHEV hosts.
Now to find out where the datacenter is mounted run the mount command and note the output. Look for rhev in the output.
3.d. Change to the vms directory.
3.e. Enter your vm's directory. This is the VmID noted in step 3.a.
In this directory you will find the configuration file for your vm (VmID.ovf) and symbolic link to your disks. List the contents of the symbolic link and look for the SnapshotID you noted earlier. This is your disk.
4. Copy your nagiosxi-kvm.img image over to this server (scp,etc.) and dd it over the disk we just identified.
That's it. Now you should have functional NagiosXI vm ready to use from within RHEV.
Note that the path to your vm and disk is likely to vary. This depends on the storage type of your particular configuration. I was using FCP above.
If things are not clear please let me know and Ill try to clear them up
Good luck.
For those using Red Hat Enterprise Virtualization here is what I hope to be an understandable procedure for migrating your vms. The idea is to create a new vm in RHEV with a preallocated hard disk the same size or larger than the one to be imported. From here we just need to identify where the vm's disk are located in the rhev datacenter hierarchy and copy over our converted vm.
First you must convert your nagiosXI image to qcow2 in order for RHEV to import it. This is accomplished by issuing the following command:
Code: Select all
# qemu-img convert <nagiosxi.vmdk> -O qcow2 nagiosxi-kvm.img
1. Create a new virtual machine from the RHEV manager interface.
1.a. Select RHEL 5.x as the operating system.
2. Configure network interfaces and hard disks
Note: The RHEV Guide Me wizard will pop-up after creating the vm.
2.a. Select Configure Network Interfaces and select the network and type. When selecting the netowrk type (drivers) you can use any of the provided drivers including RedHat VirtIO (recommended) as they are included in NagiosxI.
2.b. Select Configure Virtual Disks and make sure you configure your new disk to be exactly the same size or larger than the size of the NagiosXI virtual disk. In our test environment we created a 20 GB disk. Make sure that you keep the type (driver) to IDE and select preallocated disk!
Note: The hard disk must be at least the same size as the one to be imported and preallocates.
3. Identify your newly created vm and associated disk(s) in RHEVM datacenter.
NOTE: I am assuming you only have one DataCenter. If you have more than one you need to identify the ID of the datacenter that you wish to migrate into.
3.a. Using the RHEV Manager Scripting Library display your vm's id:
Code: Select all
PS C:\> $vm=select-vm("Name=<your vm name>")
PS C:\> $vm
From the above note the VmID.VmId : 1c657f20-1d64-4bff-9084-93530962040f
Name : w2k30-02
Description :
HostClusterId : 1
TemplateId : 2108f097-8993-4edf-b423-a81344aef747
...
3.b. Using the RHEV Manager Scripting Library display your vm's disk id(s):
Code: Select all
PS C:\> $vm.getdiskimages()
CreationDate : 12/25/2009 7:56:57 PM
LastModified : 12/25/2009 7:56:57 PM
ActualSizeInSectors : 1048576
ActualSizeInMB : 512
ActualSizeInGB : 0
Description : VDC_w2k30-02_12/25/2009 5:54:46 PM
SnapshotId : 46e8f0df-b41f-42c5-82fe-ad808f22ef52
VmSnapshotId : a6e9fad2-e5f6-4343-be5f-5fb79d275654
SizeInGB : 10
...
From the above command note the SnapshotID
The following is to be executed on one of your RHEV hosts (physical servers).
3.c. Navigate to your vm's directory on one of your RHEV hosts.
Now to find out where the datacenter is mounted run the mount command and note the output. Look for rhev in the output.
Code: Select all
# mount
In our particular case it is the second entry that contains our datacenter. Your output will differ based on the technology used (NFS,FCP,iSCSI)......
192.168.0.162:/srv/iso on /rhev/data-center/mnt/192.168.0.162:_srv_iso type nfs (rw,soft,timeo=10,retrans=6,addr=192.168.0.162)
/dev/mapper/8233a333--d7cb--4b1d--9639--143b9ad68f98-master on /rhev/data-center/mnt/blockSD/8233a333-d7cb-4b1d-9639-143b9ad68f98/master type ext2 (rw)
....
3.d. Change to the vms directory.
Code: Select all
# cd /rhev/data-center/mnt/blockSD/8233a333-d7cb-4b1d-9639-143b9ad68f98/master/vms
# cd <VmID>
In this directory you will find the configuration file for your vm (VmID.ovf) and symbolic link to your disks. List the contents of the symbolic link and look for the SnapshotID you noted earlier. This is your disk.
4. Copy your nagiosxi-kvm.img image over to this server (scp,etc.) and dd it over the disk we just identified.
Code: Select all
# dd if=/path/to/nagiosxi-kvm.img of=/rhev/data-center/..../disk-id
That's it. Now you should have functional NagiosXI vm ready to use from within RHEV.
Note that the path to your vm and disk is likely to vary. This depends on the storage type of your particular configuration. I was using FCP above.
If things are not clear please let me know and Ill try to clear them up
Good luck.
Re: convert vmware image
egalstad
I will second a request for a Hyper-V VM.
I will second a request for a Hyper-V VM.
Re: convert vmware image
I was able to use kvm under libvirt using the provided vmdk file, though if you plan on running this for any time you would be better off using qcow2. You may even want to use a compressed base image.
qemu-img will always store the full path to the base image to the newly created disk image, so afterward you can't move the image or copy it to another server. You can however use convert to copy the image or commit to merge changes into the base image, I'm unsure if commit will also compress.
Code: Select all
qemu-img convert -c <nagiosxi.vmdk> -O qcow2 nagiosxi-kvm-<version>.img
qemu-img create -b nagiosxi-kvm-<version>.img nagiosxi-kvm.img
Re: convert vmware image
Yet another request for a port to Hyper-V VM ... (3)
Re: convert vmware image
I was hoping to get some time to do this but ... in the meantime maybe someone wants to try the following.
Set-up the vmware nagiosxi image in an esx somewhere. Configure a similar vm in your hyper-v set-up and boot both vm's with a linux livecd.
On the target VM run nc -l 7000 | dd of=/dev/sda bs=16M
On the source machine run dd if=/dev/sda bs=16M | nc 7000
I have not tried this but I see no reason why it shouldn't work.
Thanks to dyansy from redhat for this trick.
Good luck
Set-up the vmware nagiosxi image in an esx somewhere. Configure a similar vm in your hyper-v set-up and boot both vm's with a linux livecd.
On the target VM run nc -l 7000 | dd of=/dev/sda bs=16M
On the source machine run dd if=/dev/sda bs=16M | nc 7000
I have not tried this but I see no reason why it shouldn't work.
Thanks to dyansy from redhat for this trick.
Good luck