LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Virtualization and Cloud (https://www.linuxquestions.org/questions/linux-virtualization-and-cloud-90/)
-   -   Virtualization (https://www.linuxquestions.org/questions/linux-virtualization-and-cloud-90/virtualization-4175667751/)

Goodlinux 01-15-2020 05:17 AM

Virtualization
 
Hello;

I have a spit and deleted VM.
how Can i restore it?

Knowing that our system consists of:

- two redundant servers.
- OS RHEL Linux 5.0
- QEMU hypervisor

Thanks

My contact: +213553286111
E-mail: badraoui.mokhtar@gmail.com

pierre2 01-16-2020 12:36 AM

you most probably can't restore it.. which is why you should have had an back-up of it.

berndbausch 01-16-2020 03:13 AM

How precisely did you delete the VM? How did you launch it in the first place? Did you also delete the VM's image, that is the file that serves as the VM's root disk?

Goodlinux 01-16-2020 02:27 PM

Hello and thank you for reply

I deleted this VM only from Virt-Manager.

This VM was deleted because i tried to clone it without made shutdown before.

To restore or create it again, probably we need ISO file and .qcow2 disk ????

Cdt.

jefro 01-16-2020 03:10 PM

See if the virtual hard drive files exist still on your drive.

To create a VM you'd need to make a virtual hard drive image if your VM manager has that ability on machine creation or just make or get a file(set of files)

The .iso could be useful but someone may already have an already made vm appliance out there for this. You'd have to configure to what you need. Pretty old stuff.

Goodlinux 01-16-2020 03:31 PM

Hello, thank you for reply

I have a disk image .qcow2 format and .xml file for this VM.
also, a had a restore file for this vm

I can send you pictures if you need

also, i had two VM in service are the same to deleted VM.

For your information VM OS Redhat linux 5

Thanks

berndbausch 01-16-2020 04:00 PM

If you have both the image and xml files, recreating the VM should be as simple as running virsh define XML-FILE, then to start it virsh start NAME-OF-VM.

Goodlinux 01-17-2020 02:27 PM

Hello;
Thanks for reply

Can you give me your email to send you somme pictures



Thanks

berndbausch 01-17-2020 07:29 PM

If you have pictures that show your problem, please post them here.

Goodlinux 01-18-2020 12:10 PM

Hi,

Please, could you show me how i can post here my pictures ?

I can't post my pictures by https URL

Thanks

Goodlinux 01-18-2020 01:30 PM

Hi,

To create the new VM, we need this files:

OS.ISO : for example REDHAT LINUX.iso

and the Image .qcow2 file.

is it true ?????

Thanks

Goodlinux 01-19-2020 11:40 AM

hello,

Please, see this configuration of my system :

oms1,root,root# cd /var/lib/libvirt/images
oms1,root,root# ls

in white color----------> NAMEVM1.img NAMEVM2.img
in blue color------------> NAMEVM1 NAMEVM2

oms1,root,root# virsh --connect qemu:///system list
Id name state
-------------------------------------------
2 NAMEVM1 running
3 NAMEVM2 running

but we had before that situation three VM.
i deleted one and i want to restore it.

Also i have this file:
BackupVM_NAMEVM3 ------------------------> Derectory: trace


Thanks

berndbausch 01-19-2020 03:34 PM

It looks like you only have two images. The third image seems to be gone. Without the image, or a backup, you may be able to recreate the VM, but not the data that was in its image.

This is a bit confusing, because earlier you said:
Quote:

Originally Posted by Goodlinux (Post 6079218)
I have a disk image .qcow2 format and .xml file for this VM.
also, a had a restore file for this vm

virsh list --all also lists VMs that are shutdown, but I doubt your deleted VM will appear.

Goodlinux 01-20-2020 05:21 AM

Hello;

I will explain you my problem with another way.


I have two servers redondants.
Each server contains three VM.
Each VM use RedHat linux5 OS.

The third VM was lost because i tried to clone it and i had an error.
After i deleted this VM and i tried to recreate it, i had this message: No boutable device

The question is: could i to create this VM or restore it and waht i need to do that ?

Thank you very much

berndbausch 01-20-2020 07:26 AM

Quote:

Originally Posted by Goodlinux (Post 6080621)
The question is: could i to create this VM or restore it and waht i need to do that ?

You can recreate the virtual machine if you remember the parameters that were used to create it in the first place, or if you still have an XML file somewhere.

You can recreate the virtual machine's data if you have a copy of the qcow2 file or a backup.

Now, you said earlier:
Quote:

I have a disk image .qcow2 format and .xml file for this VM.
With that, it should be possible. You specify the image in the XML file. You define the VM with virsh define YOURFILE.xml. Then start it with virsh start VMNAME. I am sure it can also be done with virt-manager, but I don't know how without some research.


All times are GMT -5. The time now is 01:07 PM.