Virt Module Questions

37 views
Skip to first unread message

Andrew Niemantsverdriet

unread,
Apr 5, 2013, 7:29:54 PM4/5/13
to salt-...@googlegroups.com
Hi All,

I have a couple questions about the virt module. The documentation is
a little sparse on a couple functions.

First what is the difference between virt.purge (when run with
defaults) and virt.undefine to me those commands seem to do the exact
same thing. The only time it changes is when you pass dirs=true to
virt.purge. Am I wrong about this? Why have the two commands that do
the same thing?

Next, what is the difference between virt.migrate_non_shared and
virt.migrate_non_shared_inc? The documentation has the same
description for each command.

Thanks,

--
_
/-\ ndrew Niemantsverdriet
Linux System Administrator
Academic Computing
(406) 238-7360
Rocky Mountain College
1511 Poly Dr.
Billings MT, 59102

Tor Hveem

unread,
Apr 6, 2013, 5:23:31 AM4/6/13
to salt-...@googlegroups.com
virt.undefine removes the defined VM from libvirt.
virt.purge removes the defined VM from libvirt _and_ tried to delete all the files it used

virt.migrate_non_shared_inc uses incremental migration
virt.migrate_non_shared doesn't use incremental migration
See the libvirt docs for the difference

Hope that helps.


2013/4/6 Andrew Niemantsverdriet <and...@rocky.edu>

--
You received this message because you are subscribed to the Google Groups "Salt-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to salt-users+...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.



Andrew Niemantsverdriet

unread,
Apr 9, 2013, 6:22:37 PM4/9/13
to salt-...@googlegroups.com
Thanks Tor,

How about a better example on how to use: virt.seed_non_shared_migrate as well?

Andrew Niemantsverdriet

unread,
Apr 10, 2013, 11:24:41 AM4/10/13
to salt-...@googlegroups.com
After some discussion on IRC this morning and reading of
virt.seed_non_shared_migrate function in the code I am realizing that
it there is not an easy way to call virt.seed_non_shared_migrate from
the command line.

Thomas do you have a concrete example of how to actually use this from
the command line?

Thomas S Hatch

unread,
Apr 10, 2013, 1:35:53 PM4/10/13
to salt-...@googlegroups.com
This is a tricky one and was mostly made to be used in a programmatic way, have you looked at how it is called in the virt runner?
Basically the dists data structure needs to be passed in, and it can be passed in on the command line because those options get read in as yaml/json when executed from the salt command

Thomas S. Hatch  |  Founder, CTO


5272 South College Drive, Suite 301 | Murray, UT 84123

Andrew Niemantsverdriet

unread,
Apr 10, 2013, 5:08:50 PM4/10/13
to salt-...@googlegroups.com
Thanks for the reply, that is exactly what I was thinking but wanted to make sure. I am not entirely sure at this point but it appears that passing the json data through salt-api doesn't work either. So I am kinda stuck. Any ideas on how to pass the <disks> through salt-api?

Thomas S Hatch

unread,
Apr 10, 2013, 5:12:08 PM4/10/13
to salt-...@googlegroups.com
Hmm, I think that what we should do is allow salt-api to handle json/yaml as arguments, I imagine this just needs to be added in. I will talk to Seth about it. Running it directly via the command line should work though.

Thomas S. Hatch  |  Founder, CTO


5272 South College Drive, Suite 301 | Murray, UT 84123


Andrew Niemantsverdriet

unread,
Apr 10, 2013, 5:13:48 PM4/10/13
to salt-...@googlegroups.com
I may be doing something stupid, I have a talent for that. But I agree 100% being able to run it from the command line would be great.

Thomas S Hatch

unread,
Apr 10, 2013, 5:20:44 PM4/10/13
to salt-...@googlegroups.com
Cool I opened an issue to investigate this one:

Thomas S. Hatch  |  Founder, CTO


5272 South College Drive, Suite 301 | Murray, UT 84123


Andrew Niemantsverdriet

unread,
Apr 10, 2013, 5:38:42 PM4/10/13
to salt-...@googlegroups.com
Thanks Thomas, I am watching that issue and will happily test it when the time comes :)
Reply all
Reply to author
Forward
0 new messages