resize VM HDD to 800GB and my real HDD has only 80GB

what ls -lh /data/images/100/ shows?
 
what ls -lh /data/images/100/ shows?
Sorry for late
I loose connection to proxmox
I see
Code:
root@aal-prox:~#  ls -lh /data/images/100/ showsls: cannot access shows: No such file or directory
/data/images/100/:
total 44G
-rw-r----- 1 root root  60G Oct 30 15:15 vm-100-disk-1.qcow2
-rw-r----- 1 root root 101G Oct 30 14:17 vm-100-disk-2.qcow2
 
Hi,
which format does the vm-hdd have?

Code:
file /data/images/100/vm-100-disk-1.qcow2
ls -lsa  /data/images/100/vm-100-disk-1.qcow2
Looks that you must define the output format
Code:
qemu-img convert -O qcow2  /data/images/100/vm-100-disk-1.raw /data/images/100/vm-100-disk-1.qcow2
If your VM-hdd still is in raw simply rename it before
Code:
mv/data/images/100/vm-100-disk-1.qcow2 /data/images/100/vm-100-disk-1.raw
Udo

when I run
[cmd] file /data/images/100/vm-100-disk-1.qcow2c[/cmd]
I see
Code:
/data/images/100/vm-100-disk-1.qcow2: DOS/MBR boot sector; GRand Unified Bootloader, stage1 version 0x3, boot drive 0x80, 1st sector stage2 0x849fe, GRUB version 0.94
 
What this comando gives you?
Code:
qemu-img check [COLOR=#333333]/data/images/100/[/COLOR][COLOR=#333333]vm-100-disk-1.qcow2
[/COLOR]
 
udo is right you have to define the output format.

the /data/images/100/vm-100-disk-1.qcow2 is a raw file.

Do the following what Udo wrote
Code:
m[COLOR=#333333][I]v /data/images/100/vm-100-disk-1.qcow2 /data/images/100/vm-100-disk-1.raw
[/I][/COLOR]qemu-img convert -O qcow2  /data/images/100/vm-100-disk-1.raw /data/images/100/vm-100-disk-1.qcow2
 
udo is right you have to define the output format.

the /data/images/100/vm-100-disk-1.qcow2 is a raw file.

Do the following what Udo wrote
Code:
m[COLOR=#333333][I]v /data/images/100/vm-100-disk-1.qcow2 /data/images/100/vm-100-disk-1.raw
[/I][/COLOR]qemu-img convert -O qcow2  /data/images/100/vm-100-disk-1.raw /data/images/100/vm-100-disk-1.qcow2
I remove or rm raw file and right now I do not have it
I do everything you type for me.
 
Last edited:
The vm-100-disk-1.qcow is a raw file.
so you shout mv (move rename) it
 
The vm-100-disk-1.qcow is a raw file.
so you shout mv (move rename) it
my boss call me amd ask why local site is stopped . so I have to restore backup and restore backup to big HDD .
but I want still resize VM

How I check I have problem ?
 
Last edited:
Hi,
simply do all steps again - but use the output-flag ( -O qcow2) and all should work.

Udo
my Centos VM was on local and I made backup and restored it on another HDD.
my question is this.
is backup script , create backup from 800GB HDD or only 32GB HDD ?
 
my Centos VM was on local and I made backup and restored it on another HDD.
my question is this.
is backup script , create backup from 800GB HDD or only 32GB HDD ?

Hi,
don't unsterstand you...
You always restore the content which you backed up (800GB).

Do you mean, that you restore the VM to an VM with different VMID? EG. your VM 100 is still there and shut down?

In this case simply do the mv I wrote before - so that the file is named vm-100-disk-1.raw instead of .qcow2 because it's an raw-hdd-fileformat.
After that do the convert again with outputformat...

But this is only valid, if you don't have changes in the VM... if there are (important) changes, you must shutdown the running VM (do backup again) and do all steps...

Udo
 
Hi,
don't unsterstand you...
You always restore the content which you backed up (800GB).

Do you mean, that you restore the VM to an VM with different VMID? EG. your VM 100 is still there and shut down?

In this case simply do the mv I wrote before - so that the file is named vm-100-disk-1.raw instead of .qcow2 because it's an raw-hdd-fileformat.
After that do the convert again with outputformat...

But this is only valid, if you don't have changes in the VM... if there are (important) changes, you must shutdown the running VM (do backup again) and do all steps...

Udo
before start resize VM HDD , I make backup , and after fail , I restore it by Proxmox UI , and my VM work good .
but I do not know what happen for old VM , during restore I choose another destination for restore VM.
I have VM ID 100 and it work.
 
before start resize VM HDD , I make backup , and after fail , I restore it by Proxmox UI , and my VM work good .
but I do not know what happen for old VM , during restore I choose another destination for restore VM.
I have VM ID 100 and it work.

Hi,
just read the posts again - there is nothing, which is not answered...


Udo
 
Thanks all guys I come back after trip
Is this correct I run these commands
Code:
qm stop 100
and
Code:
qemu-img convert raw [COLOR=#333333][I]/data/images/100/vm-100-disk-1.qcow2  [/I][/COLOR][COLOR=#333333][I]/data/images/100/vm-100-disk-1.raw [/I][/COLOR]
and
Code:
qemu-img resize -f raw  [COLOR=#333333][I]/data/images/100/vm-100-disk-1.raw  60G[/I][/COLOR]
and
Code:
qemu-img convert -O qcow2  /data/images/100/vm-100-disk-1.raw /data/images/100/vm-100-disk-1.qcow2
and
Code:
rm  [COLOR=#333333][I]/data/images/100/vm-100-disk-1.raw[/I][/COLOR]
last try failed
I do not want make mistake again .
please check my command , I want start tonight.
 
Last edited:
Don't forget the backup before.
Code:
qemu-img convert raw [COLOR=#333333][I]/data/images/100/vm-100-disk-1.qcow2  [/I][/COLOR][COLOR=#333333][I]/data/images/100/vm-100-disk-1.raw [/I][/COLOR]
and
you miss the -O
Code:
qemu-img convert -O raw [COLOR=#333333][I]/data/images/100/vm-100-disk-1.qcow2  [/I][/COLOR][COLOR=#333333][I]/data/images/100/vm-100-disk-1.raw [/I][/COLOR]

and by the way read man qemu-img.
 
Don't forget the backup before.

you miss the -O
Code:
qemu-img convert -O raw [COLOR=#333333][I]/data/images/100/vm-100-disk-1.qcow2  [/I][/COLOR][COLOR=#333333][I]/data/images/100/vm-100-disk-1.raw [/I][/COLOR]

and by the way read man qemu-img.

Thanks all guys , I resize VM HDD , but when I connect to Cerntos server by ssh

I see this
Code:
root@aal-prox:~# ssh -l root 8.8.8.1root@8.8.8.1's password: 
Last login: Fri Nov  6 22:46:21 2015


********************************************
Welcome to CWP (CentOS WebPanel) server
Restart CWP using: service cwpsrv restart
********************************************


if you can not access CWP try this command: service iptables stop


 22:49:11 up 4 min,  2 users,  load average: 0.02, 0.05, 0.01
USER     TTY      FROM              LOGIN@   IDLE   JCPU   PCPU WHAT
root     tty1     -                22:46    2:50   0.01s  0.01s -bash
root     pts/0    8.8.8.1    22:49    0.00s  0.01s  0.01s -bash


Filesystem            Size  Used Avail Use% Mounted on
/dev/mapper/VolGroup-lv_root
                       28G   18G  9.3G  66% /
tmpfs                 750M     0  750M   0% /dev/shm
/dev/sda1             477M   57M  395M  13% /boot
and when I run df -h , I see
Code:
Filesystem            Size  Used Avail Use% Mounted on/dev/mapper/VolGroup-lv_root
                       28G   18G  9.3G  66% /
tmpfs                 750M     0  750M   0% /dev/shm
/dev/sda1             477M   57M  395M  13% /boot
and 66% of my HDD is used ,
How I add new size to my VM ?
I do not have enough space for my web sever
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!