Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Thanks for your input, riahc3. I do not intend to fix something that is not broken. I just want to take reasonable measures and find ways to avoid a complete mess should this device decide it stops booting tomorrow. Any thoughts are appreciated!
Location: Montreal, Quebec and Dartmouth, Nova Scotia CANADA
Distribution: Arch, AntiX, ArtiX
Posts: 1,356
Rep:
Quote:
Originally Posted by Jay1969
Appreciate the documentation, Rick. The thing is I am not even sure how to get these files on an external HD. I have an old 500GB that I could reformat to a Linux-recognizable file system (can you recommend anything?)... Then, do I boot on Linux live CD link Knoppix? And (this is where I am at sea) how can I get to understand and use the command lines. I miss the Windows GUI in times like these...
Hey Jay ... you wouldn't need to format your external HDD with a linux file-system, unless your PM/Debian server has no ntfs module (ntfs-3g). Even if that's the case, you can install ntfs-3g.
You can also format your hard drive as ext4 if required - I could suggest the easiest ways if you want to go that route.
As far as booting a live ISO to do what you want to do - you could, but you could probably just use the existing system as it is. If you are unfamiliar with the PM interface, the command line should let you do what you need to, as long as you have to appropriate user codes and passwords. Again, if you decide to try this, let us know.
In the end, you CAN boot a live ISO to copy stuff from the server. It may be less intuitive, but possible.
A suggestion - if you DO start troubleshooting this yourself - a complete backup of the server is probably a good idea beforehand. You mentioned Clonezilla - this is a good option - you can create images with that and store them on another media. Or perhaps your server already has some kind of backup system, other than the VM snapshot utility you already described ?
Rick, I do want to format the XHD as ext4 partition. What methods to you have in mind?
No other backups beside the built-in engine in ProxMox (which crashes when I attempt to create a fresh image, as I mentioned earlier). I need to get these snapshots out of there ASAP and copy them on external supports.
Before attempting anything, I will look into Clonezilla and find ways to clone the VM hd to an XHDD.
The most common filesystems should work like ext3. I'd recommend running a check on that HDD before trusting it with your data. running a program like badblocks should help with that.
As for take a quick backup of the disks, open your proxmox console of the vhost that has the running VM's, first you're going to want to make sure the VM's shut down for obvious reasons.
mount the disk as usual, the VM files are located at "/var/lib/vz/images/<VM ID>"
Then use a tool such as rsync (It should be already installed on the proxmox box), rsync is good because it does checksums of copied data. meaning no possible corruption from the copy.
so just throw a quick "rsync -avc /var/lib/vz/images/ /mnt/backup --progress" and watch the copy happen, just umount the drive before pulling it out.
An Alternative can be to mount the disk like before, but then under the datacentre -> storage tab on the web interface you can add a new storage block, then use the built in backup utility to run the backups.
If you need any more information feel free to PM. I mostly specialise in VMWare but I have personal experience with my proxmox server.
Location: Montreal, Quebec and Dartmouth, Nova Scotia CANADA
Distribution: Arch, AntiX, ArtiX
Posts: 1,356
Rep:
Jay - AB49K above has ProxMox experience - you're in luck :-)
I would definitely take him up on his offer to help.
Formatting your external HD to ext3 or 4 can be done various ways : using the linux server itself or an easy way from any other computer, use a GParted live ISO CD.
Further to the conservation above, I was able to successfully clone one of the HDD on which Proxmox (PM) and the VMs reside. I then used one of the old computers and a spare HDD to restore the Clonezilla image.
I can reasonably assume it worked since I formatted the HDD prior to restoring the image. When Clonezilla finished his job, computer booted PM without any problems. Darn good news!
I was then presented with the PM command line interface. PM advised using a browser and log to the server’s IP address to manage the VMs, i.e. https://AAA.BB.CC.DD:8006/. I am used to this since this is how I reboot/shutdown the VM.
I then punched in my credentials and PM advised that it could not communicate with the UPS, which is normal since it is a new hardware in a new setup. It all leads me to believe that the restoration was perfect.
Now the tricky part is that I cannot—in my view—get the Clonezilla-restored server online since it uses the same IP address as our actual server—which is still online.
To circumvent this, I directly hooked my laptop to the Clonezilla-restored server using an Ethernet cable. I did not use any router, etc. Still, I cannot access the PM GUI. I am lost here. I am sure it is a silly little setting that keeps me from accessing PM’s GUI.
Location: Montreal, Quebec and Dartmouth, Nova Scotia CANADA
Distribution: Arch, AntiX, ArtiX
Posts: 1,356
Rep:
Quote:
Originally Posted by Jay1969
Further to the conservation above, I was able to successfully clone one of the HDD on which Proxmox (PM) and the VMs reside. I then used one of the old computers and a spare HDD to restore the Clonezilla image.
I can reasonably assume it worked since I formatted the HDD prior to restoring the image. When Clonezilla finished his job, computer booted PM without any problems. Darn good news!
I was then presented with the PM command line interface. PM advised using a browser and log to the server’s IP address to manage the VMs, i.e. https://AAA.BB.CC.DD:8006/. I am used to this since this is how I reboot/shutdown the VM.
I then punched in my credentials and PM advised that it could not communicate with the UPS, which is normal since it is a new hardware in a new setup. It all leads me to believe that the restoration was perfect.
Now the tricky part is that I cannot—in my view—get the Clonezilla-restored server online since it uses the same IP address as our actual server—which is still online.
To circumvent this, I directly hooked my laptop to the Clonezilla-restored server using an Ethernet cable. I did not use any router, etc. Still, I cannot access the PM GUI. I am lost here. I am sure it is a silly little setting that keeps me from accessing PM’s GUI.
Any thoughts?
Thank you!
I could suggest ways for you to use a distinct, static IP address for the 2nd machine, but I believe it would be preferable to wait for advice from member AB49K, who is familiar with your main application - ProxMox.
Good to hear you've come this far, though - congrats !
@AB49K @Rickkkk I just browsed the cloned HDD's structure and cannot find the VM files, which are supposed to be located at "/var/lib/vz/images/<VM ID>" — There is no 'vz' folder... No wonder why the virtual server won't start.
My guess is that the parameters were tweaked in order to store the VMs on the data drives (Disk 3&4), which I didn't clone (4TB).
If I do clone the 4TB, I am gonna have a problem trying to restore the image since Clonezilla needs a target drive as big or bigger than the source. I do not have such a drive on hands.
Should I try to extract the VMs from the 4TB through copy/paste booting on a Knoppix Live and saving the /var/lib/vz/images folder to an external HDD? Do I need to create a special partition/format the HDD to ext3 to accept the VMs?
Location: Montreal, Quebec and Dartmouth, Nova Scotia CANADA
Distribution: Arch, AntiX, ArtiX
Posts: 1,356
Rep:
Quote:
Originally Posted by Jay1969
@AB49K @Rickkkk I just browsed the cloned HDD's structure and cannot find the VM files, which are supposed to be located at "/var/lib/vz/images/<VM ID>" — There is no 'vz' folder... No wonder why the virtual server won't start.
My guess is that the parameters were tweaked in order to store the VMs on the data drives (Disk 3&4), which I didn't clone (4TB).
If I do clone the 4TB, I am gonna have a problem trying to restore the image since Clonezilla needs a target drive as big or bigger than the source. I do not have such a drive on hands.
Should I try to extract the VMs from the 4TB through copy/paste booting on a Knoppix Live and saving the /var/lib/vz/images folder to an external HDD? Do I need to create a special partition/format the HDD to ext3 to accept the VMs?
Any thoughts?
Hey Jay,
If your VMs are on those other disks and you want to just copy them, I see no problem. You could either do it while logged into the server itself or by (safer) booting a live ISO and doing it from there.
For the destination disk, you don't actually have to format it as ext3 or 4 unless there is a reason that is escaping me (not impossible ...). Could be any file system format your live ISO can read and write (often FAT32/vfat, ntfs ...). The VM files will be agnostic as to which file system format you choose to copy them to.
That said, if there is a reason (perhaps related to ProxMox ...) you need to format to ext3 or 4, you could easily do that using a live ISO of GParted (or if I understand right and you have a knoppix live ISO, maybe GParted is already included on that ..). Just make sure you choose the external disk you are going to use as a destination to operate on, and not some other data or system disk, such as the one(s) on the computer you will be using to do this ...
@AB49K @Rickkkk I just browsed the cloned HDD's structure and cannot find the VM files, which are supposed to be located at "/var/lib/vz/images/<VM ID>" — There is no 'vz' folder... No wonder why the virtual server won't start.
My guess is that the parameters were tweaked in order to store the VMs on the data drives (Disk 3&4), which I didn't clone (4TB).
If I do clone the 4TB, I am gonna have a problem trying to restore the image since Clonezilla needs a target drive as big or bigger than the source. I do not have such a drive on hands.
Should I try to extract the VMs from the 4TB through copy/paste booting on a Knoppix Live and saving the /var/lib/vz/images folder to an external HDD? Do I need to create a special partition/format the HDD to ext3 to accept the VMs?
Any thoughts?
It doesn't need to be EXT3, any format you can mount will be fine.
okay, it sounds like the VM's are on the 4tb disk, just FYI in clonezilla you actually CAN restore to a smaller disk if you take a backup of the partition (not a disk image), in clonezilla you can choose -icds in the advanced options (off the top of my head don't quote me on that one ) and that will resize the partitions as long as there is not more data on the partition(s) you are restoring than is on the disk you are restoring to.
I would try to manually track down the VM disk image files before imaging a disk though.
You can find where the VM files are currently mounted and stored if you go into datacentre -> Storage, It should list it there under path/target. See the attached image for what it looks like on my proxmox server.
Further to the conservation above, I was able to successfully clone one of the HDD on which Proxmox (PM) and the VMs reside. I then used one of the old computers and a spare HDD to restore the Clonezilla image.
I can reasonably assume it worked since I formatted the HDD prior to restoring the image. When Clonezilla finished his job, computer booted PM without any problems. Darn good news!
I was then presented with the PM command line interface. PM advised using a browser and log to the server’s IP address to manage the VMs, i.e. https://AAA.BB.CC.DD:8006/. I am used to this since this is how I reboot/shutdown the VM.
I then punched in my credentials and PM advised that it could not communicate with the UPS, which is normal since it is a new hardware in a new setup. It all leads me to believe that the restoration was perfect.
Now the tricky part is that I cannot—in my view—get the Clonezilla-restored server online since it uses the same IP address as our actual server—which is still online.
To circumvent this, I directly hooked my laptop to the Clonezilla-restored server using an Ethernet cable. I did not use any router, etc. Still, I cannot access the PM GUI. I am lost here. I am sure it is a silly little setting that keeps me from accessing PM’s GUI.
Any thoughts?
Thank you!
Also, Before putting the proxmox server online (plugging in the ethernet) log in on the terminal and edit the file "/etc/network/interfaces" the interface you want *should* be called vmbr0, just change the address to a new static IP. save the file reboot the new machine and plug in your ethernet cable. then browse to the new IP
You won't be able to access the panel just by plugging the laptop into the computer without manually adding an address in that range on your laptop.
I have found where the VMs are installed. See attachment.
I just came back from the office to try to extract the files from the server. I shutdown the server, plugged in a 2TB USB and booted on latest Knoppix live. I see the datapool partition, but I get an error message when clicking on it. I believe it had something to do with ***/usr.
I tried mounting the USB in order to create a stop backup and saving it directly on the USB and it did not work (cannot find the thread I used for now--will post the link later).
Can I use a command line I can run asking PM to take file vzdump-qemu-100-2016_11_11-09_30_41.vma.lzo and ship it on the USB device? We also have a NAS connected to the server. I assume I would have to mount it before being able to save anything?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.