I have a vm in a logical volume /dev/xen-vg00/myvm-disk and /dev/xen-vg00/myvm-swap. Can I rename this two logical volumes and then restart the vm with no problems? Of course after modify the config file to reflect the new disk names. _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
George Shuklin
2010-Jul-29 11:25 UTC
Re: [Xen-users] Can I rename logical volumes without problems?
Yes, you can. Stop machine, use lvrename, modify config for VM and start it again. В Чтв, 29/07/2010 в 13:15 +0200, Mauro пишет:> I have a vm in a logical volume /dev/xen-vg00/myvm-disk and > /dev/xen-vg00/myvm-swap. > Can I rename this two logical volumes and then restart the vm with no problems? > Of course after modify the config file to reflect the new disk names. >_______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Fajar A. Nugraha
2010-Jul-29 11:26 UTC
Re: [Xen-users] Can I rename logical volumes without problems?
On Thu, Jul 29, 2010 at 6:15 PM, Mauro <mrsanna1@gmail.com> wrote:> I have a vm in a logical volume /dev/xen-vg00/myvm-disk and > /dev/xen-vg00/myvm-swap. > Can I rename this two logical volumes and then restart the vm with no problems? > Of course after modify the config file to reflect the new disk names.short answer: yes, as long as the new names and then one on the config match. And "restart" as in "xm shutdown" and "xm create/xm start", not "init 6" from domU side. -- Fajar _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Mauro
2010-Jul-29 11:28 UTC
Re: [Xen-users] Can I rename logical volumes without problems?
On 29 July 2010 13:26, Fajar A. Nugraha <fajar@fajar.net> wrote:> On Thu, Jul 29, 2010 at 6:15 PM, Mauro <mrsanna1@gmail.com> wrote: >> I have a vm in a logical volume /dev/xen-vg00/myvm-disk and >> /dev/xen-vg00/myvm-swap. >> Can I rename this two logical volumes and then restart the vm with no problems? >> Of course after modify the config file to reflect the new disk names. > > short answer: yes, as long as the new names and then one on the config > match. And "restart" as in "xm shutdown" and "xm create/xm start", not > "init 6" from domU side.I''ve logged in my VM and do shutdown, then I logged into dom0 renamed logical volumes, modify VM config file and do xm create VM.cfg. Is it right? _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
George Shuklin
2010-Jul-29 11:57 UTC
Re: [Xen-users] Can I rename logical volumes without problems?
В Чтв, 29/07/2010 в 13:28 +0200, Mauro пишет:> On 29 July 2010 13:26, Fajar A. Nugraha <fajar@fajar.net> wrote: > > On Thu, Jul 29, 2010 at 6:15 PM, Mauro <mrsanna1@gmail.com> wrote: > >> I have a vm in a logical volume /dev/xen-vg00/myvm-disk and > >> /dev/xen-vg00/myvm-swap. > >> Can I rename this two logical volumes and then restart the vm with no problems? > >> Of course after modify the config file to reflect the new disk names. > > > > short answer: yes, as long as the new names and then one on the config > > match. And "restart" as in "xm shutdown" and "xm create/xm start", not > > "init 6" from domU side. > > I''ve logged in my VM and do shutdown, then I logged into dom0 renamed > logical volumes, modify VM config file and do xm create VM.cfg. > Is it right?Not excactly, I think, you must destroy domU for that VM (it shall not appear in xm list). If shutdown destory domU, that''s fine. If not, you must destroy it manually (after shutdown). _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Fajar A. Nugraha
2010-Jul-29 12:35 UTC
Re: [Xen-users] Can I rename logical volumes without problems?
On Thu, Jul 29, 2010 at 6:57 PM, George Shuklin <george.shuklin@gmail.com> wrote:> В Чтв, 29/07/2010 в 13:28 +0200, Mauro пишет:>> I''ve logged in my VM and do shutdown, then I logged into dom0 renamed >> logical volumes, modify VM config file and do xm create VM.cfg. >> Is it right? > > Not excactly, I think, you must destroy domU for that VM (it shall not > appear in xm list). If shutdown destory domU, that''s fine. If not, you > must destroy it manually (after shutdown).AFAIK the main thing is to make sure that the domU will be using the new config when it''s started. You raise a good point though. If the domU still shows on "xm list" after it''s shutdown beause it''s managed by xend (like what happens if you create it with "xm new", or if you set it up using newer versions of virt-install/virt-manager), then it''s still using the old config. You need to delete it first ("xm delete"). That would not be a problem if you only use old-style domU config (like with RHEL/Centos5 and it''s bundled version of Xen). -- Fajar _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Mauro
2010-Jul-29 18:03 UTC
Re: [Xen-users] Can I rename logical volumes without problems?
2010/7/29 Fajar A. Nugraha <fajar@fajar.net>:> On Thu, Jul 29, 2010 at 6:57 PM, George Shuklin > <george.shuklin@gmail.com> wrote: >> В Чтв, 29/07/2010 в 13:28 +0200, Mauro пишет: > >>> I''ve logged in my VM and do shutdown, then I logged into dom0 renamed >>> logical volumes, modify VM config file and do xm create VM.cfg. >>> Is it right? >> >> Not excactly, I think, you must destroy domU for that VM (it shall not >> appear in xm list). If shutdown destory domU, that''s fine. If not, you >> must destroy it manually (after shutdown). > > AFAIK the main thing is to make sure that the domU will be using the > new config when it''s started. > > You raise a good point though. If the domU still shows on "xm list" > after it''s shutdown beause it''s managed by xend (like what happens if > you create it with "xm new", or if you set it up using newer versions > of virt-install/virt-manager), then it''s still using the old config. > You need to delete it first ("xm delete"). That would not be a problem > if you only use old-style domU config (like with RHEL/Centos5 and it''s > bundled version of Xen).I''m using linux on dom0 and in all my domU. If I do a shutdown wih the command "halt" then xm list doesn''t show my domU so I think it is destroyed. However I do a shutdown, with xm list I don''t see the domU, renamed logical volumes, changed the config file and do a xm create VM.cfg. After a while domU starts and it seems all ok. _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users