Ask Your Question
3

Customize libvirt.xml for an instance

asked 2013-09-25 11:26:41 -0600

It's possible to modify some options for a specific instance in libvirt.xml file ?

I have tried to alter this file but when i start VM my custom settings was not applied.

Does anyone know why ?

Thanks

Salvo.

edit retag flag offensive close merge delete

3 answers

Sort by ยป oldest newest most voted
1

answered 2013-09-25 13:08:01 -0600

rz2p gravatar image

updated 2013-09-25 13:08:50 -0600

I had the same problem, you need to destroy and redifine your instance.

So, go into nova/instances/#INSTANCE ID#/libvirt.xml

Make your change.

Now run these commands:

  • (Open up the console on the VM to figure out the "XX"..)

  • virsh destroy instance-000000xx (No this will not terminate or remove your instance..Don't worry)

  • virsh undefine instance-000000xx
  • virsh define libvirt.xml (This will re-register your instance-000000xx)
  • virsh start instance-000000xx

In OpenStack Dashboard, your VM will be POWERED OFF/SHUTDOWN. Simply do a soft reboot on it and it will re-sync.

edit flag offensive delete link more

Comments

Ok...it's work...thank you ^_^

salvorapi gravatar imagesalvorapi ( 2013-09-26 07:53:17 -0600 )edit
0

answered 2014-04-11 05:10:33 -0600

emanuele gravatar image

Hello guys

I followed step by step the above procedure, adding these lines to libvirt.xml

<serial type='tcp'>
<source mode='bind' host='127.0.0.1' service='2223'/>
<protocol type='telnet'/>
<target port='0'/>
<alias name='serial0'/>
</serial>

However after soft rebooting the instance from the Horizon GUI, those lines were not there anymore

Any suggestion ?

edit flag offensive delete link more

Comments

This really needs to be a new question. Soft reboot should not be rebuilding the xml. Hard rebooting does rebuild the XML however. Please open a new question and link back to this one for more help.

SamYaple gravatar imageSamYaple ( 2014-04-11 12:40:27 -0600 )edit

No problem, I have just opened https://ask.openstack.org/en/question/27156/how-to-customize-libvirtxml-for-an-instance/ (https://ask.openstack.org/en/question...)

emanuele gravatar imageemanuele ( 2014-04-12 07:18:47 -0600 )edit
0

answered 2014-04-12 07:04:06 -0600

emanuele gravatar image

Hello

I'm on Havana, and following those steps I was not able to save the changes.

To be clear I have added these lines to libvirt.xml

<serial type='tcp'>
      <source mode='bind' host='127.0.0.1' service='2223'/>
      <protocol type='telnet'/>
      <target port='0'/>
      <alias name='serial0'/>
</serial>

But after soft rebooting the instance from the Horizon GUI, those lines were not there anymore

Any suggestion ?

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

3 followers

Stats

Asked: 2013-09-25 11:26:41 -0600

Seen: 8,704 times

Last updated: Apr 12 '14