LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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


Reply
  Search this Thread
Old 03-27-2017, 09:58 AM   #16
Jay1969
Member
 
Registered: Mar 2017
Posts: 35

Original Poster
Rep: Reputation: Disabled

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!
 
Old 03-27-2017, 10:00 AM   #17
Rickkkk
Senior Member
 
Registered: Dec 2014
Location: Montreal, Quebec and Dartmouth, Nova Scotia CANADA
Distribution: Arch, AntiX, ArtiX
Posts: 1,364

Rep: Reputation: 511Reputation: 511Reputation: 511Reputation: 511Reputation: 511Reputation: 511
Quote:
Originally Posted by Jay1969 View Post
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 ?
 
Old 03-27-2017, 10:10 AM   #18
Jay1969
Member
 
Registered: Mar 2017
Posts: 35

Original Poster
Rep: Reputation: Disabled
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.

It is a nice Saturday morning project!
 
Old 03-27-2017, 10:27 AM   #19
AB49K
LQ Newbie
 
Registered: Mar 2017
Location: Australia
Distribution: CentOS, OpenSuse, Ubuntu, Debian.
Posts: 26

Rep: Reputation: Disabled
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.
 
1 members found this post helpful.
Old 03-27-2017, 10:31 AM   #20
Jay1969
Member
 
Registered: Mar 2017
Posts: 35

Original Poster
Rep: Reputation: Disabled
Thanks very, very much AB49K. I will look into this. Your thoughts are mostly appreciated.
 
Old 03-27-2017, 10:38 AM   #21
Rickkkk
Senior Member
 
Registered: Dec 2014
Location: Montreal, Quebec and Dartmouth, Nova Scotia CANADA
Distribution: Arch, AntiX, ArtiX
Posts: 1,364

Rep: Reputation: 511Reputation: 511Reputation: 511Reputation: 511Reputation: 511Reputation: 511
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.

Let us know how it goes !
 
Old 03-27-2017, 10:43 AM   #22
AB49K
LQ Newbie
 
Registered: Mar 2017
Location: Australia
Distribution: CentOS, OpenSuse, Ubuntu, Debian.
Posts: 26

Rep: Reputation: Disabled
I'd personally avoid doing any kind of disk formatting on a VM host. Accidental fat fingers can mean you have a really bad day.
 
Old 03-27-2017, 10:45 AM   #23
Jay1969
Member
 
Registered: Mar 2017
Posts: 35

Original Poster
Rep: Reputation: Disabled
Sir, yes, sir! Understood!
 
Old 03-31-2017, 01:11 PM   #24
Jay1969
Member
 
Registered: Mar 2017
Posts: 35

Original Poster
Rep: Reputation: Disabled
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!
 
Old 03-31-2017, 01:19 PM   #25
Rickkkk
Senior Member
 
Registered: Dec 2014
Location: Montreal, Quebec and Dartmouth, Nova Scotia CANADA
Distribution: Arch, AntiX, ArtiX
Posts: 1,364

Rep: Reputation: 511Reputation: 511Reputation: 511Reputation: 511Reputation: 511Reputation: 511
Quote:
Originally Posted by Jay1969 View Post
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 !
 
Old 03-31-2017, 04:06 PM   #26
Jay1969
Member
 
Registered: Mar 2017
Posts: 35

Original Poster
Rep: Reputation: Disabled
@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).

Disk1-OS
Disk2-OS (RAID)
Disk3-DATA
Disk4-DATA (RAID)

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?
 
Old 03-31-2017, 04:35 PM   #27
Rickkkk
Senior Member
 
Registered: Dec 2014
Location: Montreal, Quebec and Dartmouth, Nova Scotia CANADA
Distribution: Arch, AntiX, ArtiX
Posts: 1,364

Rep: Reputation: 511Reputation: 511Reputation: 511Reputation: 511Reputation: 511Reputation: 511
Quote:
Originally Posted by Jay1969 View Post
@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).

Disk1-OS
Disk2-OS (RAID)
Disk3-DATA
Disk4-DATA (RAID)

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 ...

Cheers !

Last edited by Rickkkk; 03-31-2017 at 04:39 PM.
 
Old 04-01-2017, 12:45 PM   #28
AB49K
LQ Newbie
 
Registered: Mar 2017
Location: Australia
Distribution: CentOS, OpenSuse, Ubuntu, Debian.
Posts: 26

Rep: Reputation: Disabled
Quote:
Originally Posted by Jay1969 View Post
@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).

Disk1-OS
Disk2-OS (RAID)
Disk3-DATA
Disk4-DATA (RAID)

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.
Attached Thumbnails
Click image for larger version

Name:	Screenshot_20170402_034228.png
Views:	17
Size:	26.2 KB
ID:	24651  
 
Old 04-01-2017, 12:55 PM   #29
AB49K
LQ Newbie
 
Registered: Mar 2017
Location: Australia
Distribution: CentOS, OpenSuse, Ubuntu, Debian.
Posts: 26

Rep: Reputation: Disabled
Quote:
Originally Posted by Jay1969 View Post
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.

Last edited by AB49K; 04-01-2017 at 12:57 PM.
 
Old 04-01-2017, 01:01 PM   #30
Jay1969
Member
 
Registered: Mar 2017
Posts: 35

Original Poster
Rep: Reputation: Disabled
Thanks for your reply, AB49K.

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?

I will work on the static IP in the meantime.
Attached Thumbnails
Click image for larger version

Name:	Backup Name And Extension Proxmox.PNG
Views:	16
Size:	7.7 KB
ID:	24652   Click image for larger version

Name:	Save Path Proxmox.PNG
Views:	19
Size:	28.1 KB
ID:	24653  
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Why are user credentials not being passed to server at time of login? rajevar Linux - Newbie 2 09-24-2009 03:57 PM
Using C API; first query passed passed by program to MySQL is successful, second quer weibullguy Programming 2 06-12-2007 10:45 PM
vpn passed from RH9 firewall to OS X server - not quite MadTurki Linux - Networking 4 02-25-2004 03:55 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 02:42 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration