Peter <peter at pajamian.dhs.org> writes: > On 06/12/2014 05:17 PM, lee wrote: >> I knew before I started that network setup would be a PITA because years >> ago, I set up a VM for someone who didn't have a 64bit system to compile >> a 64bit version of some software. The network setup being so >> ridiculously difficult has kept me from touching VMs ever again for >> years. It's just too difficult and not worth the effort unless you're >> really forced to do it. > > Networking can be confusing until it "clicks" then it all seems to fall > into place, there is a certain amount of understanding of the overall > picture of how bridge networking (or other types of networking) works > that once you get that understanding it becomes a lot simpler. I still don't really understand it. For example, why does the dom0 loose network connectivity when you add the physical interface through which it is connected to the network to a bridge? The bridge supposedly connects networks indiscriminately, and it is illogical that the connection goes away when you connect a network to it. > One thing that probably confuses you is that there are certain parts > of the networking that are done by the dom0 distro, certain parts are > done by Xen scripts and front and backend drivers, and some parts are > done by the domu operating system. Understanding how those parts fit > together and how different distros do the same thing but perhaps with > different configs helps a lot to getting a grasp on the whole. > > Obviously better documentation would help with this, but like anything > of this nature there is a learning curve that you simply have to get > over before you can really become proficient. Well, yes, learning is one of the reasons for setting up what I'm still working on atm. The networking remains a black box, though. It now works the way I want it to, yet it is too complicated to understand without solid documentation. It's not a matter of there being a learning curve but a matter of needing something to learn from because you can't learn it out of thin air or by trial and error. >> As a user, I'm used to get an ISO of an installer or of a life system, >> put that into a DVD drive or write it to an USB stick and to boot from >> that to do the installation. Why can't I do that with xen? > > You can do that with Xen, KVM, and most other types of virtualization. > The idea is that you need to block-attach the disk (or ISO file if you > prefer not to use a physical disk) to the VM and then it can be mounted > and used as install media (or any other type of media for that matter). > This can be done from teh domain config file or from the xm (or xl) > command line. Is somewhere documented how to do that? At some point I understood that once the VM is somehow started, whatever it started from has become inaccessible from inside the VM. Since the centos installer features using something that is reachable through NFS or HTTP, I tried that, but since it was almost impossible to get network access from within a VM, that didn't work so well. > Another quick note specifically for you. I have noticed in past > messages that you seem to be having some confusion with xm vs xl > commands and some explanation about that is probably in order to clear > up that confusion. That's a result of reading documentation. The documentation isn't clear about what to use how, and when virsh is mixed in because it finally allows you to run an installer within a VM, it's even more confusing. Since the documentation randomly refers to various versions of xen and tells you to use xl in one case and xm in another, and perhaps virsh in yet another case, you can only try what the documentation says and see what happens. That's why I said that the documentation is chaotic. > xm and xl are nearly identical commands to use, but xm is the "old" > way and xl the "new" way. Basically put, xm interfaces with a daemon > running in the dom0 (xend) which in turn interfaces with the > hypervisor, while xl uses libraries to interface directly with the > hypervisor and so eliminates the need for xend. How do I switch to the new way without breaking things? I'm running everything on Debian now, and they're using xm. Centos does, too. > You will see documentation refer to one or the other, sometimes almost > interchangeably, because the two tools have almost identical usage, > but what you should be aware of is that you really need to pick one > and stick with it, Xen does not work well if you try to use xm for > some commands and xl for others. Someone new to xen and reading the documentation doesn't know this, and the documentation confuses them. It tells them things that don't work when they try them, preventing them from making any progress. > Since you're new I would recommend xl because xm is deprecated in > newer versions of Xen, so if you want to future-proof your knowledge > xl is the way to go. Also if you're using xl then you should not be > running the xend daemon, this is easily accomplished by using > chkconfig and service to turn xend off. So you're saying I can just stop xend? What about the settings in /etc/xen/xend-config.sxp, where/how do I apply those? Debian comes with xen 4.1, so I should be able to upgrade to using xl. -- Knowledge is volatile and fluid. Software is power.