Re: Volatile VM disks?

2024-03-22 Thread Leo Leung
Thanks Harikrishna!

If I understand this correctly, this will only reset the disk only when the VM 
is rebooted via the CloudStack API. I was able to confirm that the disk was 
indeed reset if I send the reboot API call.

What confused me based on what is written in the documentation is that the VM 
disk would not reset in the following cases:
 1. The user powers down the VM (via the shutdown/poweroff commands in the OS) 
and at a later time turns the VM back on using the CloudStack 'start 
virtualmachine' API command.
 2. The user powers down the VM via the 'stop virtualmachine' CloudStack API 
call and at a later time turns the VM back on using the CloudStack 'start 
virtualmachine' API command.
 3. The user reboots the VM (via the reboot command)

Is it a bug that the disk doesn't get reset in the first 2 cases? That is, 
shouldn't the 'start virtualmachine' command trigger the disk to reset on a 
volatile VM?

Thank-you,
-Leo



> On 03/17/2024 9:53 PM MDT Harikrishna Patnala 
>  wrote:
> 
>  
> Previous link may not open for you, please check this snippet
> 
> https://github.com/apache/cloudstack/blob/2df68021761adbd93eecda20114894c8f2edb8bd/server/src/main/java/com/cloud/vm/UserVmManagerImpl.java#L3239-L3248
> 
> 
> 
> From: Harikrishna Patnala 
> Date: Monday, 18 March 2024 at 9:19 AM
> To: users@cloudstack.apache.org 
> Subject: Re: Volatile VM disks?
> Hi Leo,
> 
> Here is the code snippet which handles the volume reset on reboot VM. 
> https://github.com/shapeblue/cloudstack/blob/2df68021761adbd93eecda20114894c8f2edb8bd/server/src/main/java/com/cloud/vm/UserVmManagerImpl.java#L3239-L3248
> 
> May I know how did you test the volume reset, please try reboot after having 
> some data in the volume which is created after the volume creation. From UI 
> if you look at the volume name and details there won’t be any change, it’s 
> the data which gets reset inside the volume.
> 
> Thanks,
> Harikrishna
> 
> From: Leo Leung 
> Date: Saturday, 16 March 2024 at 2:50 AM
> To: users@cloudstack.apache.org 
> Subject: Volatile VM disks?
> Hello everyone,
> 
> I am trying to use the 'volatile VM' feature. According to the documentation, 
> it should "have their root disks reset upon reboot".
> 
> I created a new compute offering with 'volatile' enabled and then deployed a 
> VM on a KVM node using a template image. The VM root disk is not resetting on 
> shutdown/reboot.  I looked through the CloudStack source code but don't see 
> anything obvious as to what would make the disks reset on shutdown/reboot.
> 
> Is there something else I need to do to make this work? Is this a feature 
> only on specific hypervisors?
> 
> Thank-you,
> -Leo


Re: Volatile VM disks?

2024-03-17 Thread Harikrishna Patnala
Previous link may not open for you, please check this snippet

https://github.com/apache/cloudstack/blob/2df68021761adbd93eecda20114894c8f2edb8bd/server/src/main/java/com/cloud/vm/UserVmManagerImpl.java#L3239-L3248



From: Harikrishna Patnala 
Date: Monday, 18 March 2024 at 9:19 AM
To: users@cloudstack.apache.org 
Subject: Re: Volatile VM disks?
Hi Leo,

Here is the code snippet which handles the volume reset on reboot VM. 
https://github.com/shapeblue/cloudstack/blob/2df68021761adbd93eecda20114894c8f2edb8bd/server/src/main/java/com/cloud/vm/UserVmManagerImpl.java#L3239-L3248

May I know how did you test the volume reset, please try reboot after having 
some data in the volume which is created after the volume creation. From UI if 
you look at the volume name and details there won’t be any change, it’s the 
data which gets reset inside the volume.

Thanks,
Harikrishna

From: Leo Leung 
Date: Saturday, 16 March 2024 at 2:50 AM
To: users@cloudstack.apache.org 
Subject: Volatile VM disks?
Hello everyone,

I am trying to use the 'volatile VM' feature. According to the documentation, 
it should "have their root disks reset upon reboot".

I created a new compute offering with 'volatile' enabled and then deployed a VM 
on a KVM node using a template image. The VM root disk is not resetting on 
shutdown/reboot.  I looked through the CloudStack source code but don't see 
anything obvious as to what would make the disks reset on shutdown/reboot.

Is there something else I need to do to make this work? Is this a feature only 
on specific hypervisors?

Thank-you,
-Leo



 



Re: Volatile VM disks?

2024-03-17 Thread Harikrishna Patnala
Hi Leo,

Here is the code snippet which handles the volume reset on reboot VM. 
https://github.com/shapeblue/cloudstack/blob/2df68021761adbd93eecda20114894c8f2edb8bd/server/src/main/java/com/cloud/vm/UserVmManagerImpl.java#L3239-L3248

May I know how did you test the volume reset, please try reboot after having 
some data in the volume which is created after the volume creation. From UI if 
you look at the volume name and details there won’t be any change, it’s the 
data which gets reset inside the volume.

Thanks,
Harikrishna

From: Leo Leung 
Date: Saturday, 16 March 2024 at 2:50 AM
To: users@cloudstack.apache.org 
Subject: Volatile VM disks?
Hello everyone,

I am trying to use the 'volatile VM' feature. According to the documentation, 
it should "have their root disks reset upon reboot".

I created a new compute offering with 'volatile' enabled and then deployed a VM 
on a KVM node using a template image. The VM root disk is not resetting on 
shutdown/reboot.  I looked through the CloudStack source code but don't see 
anything obvious as to what would make the disks reset on shutdown/reboot.

Is there something else I need to do to make this work? Is this a feature only 
on specific hypervisors?

Thank-you,
-Leo